rwadurian/backend/services/wallet-service/src/domain/events/withdrawal-requested.event.ts

23 lines
505 B
TypeScript

import { DomainEvent } from './domain-event.base';
export interface WithdrawalRequestedPayload {
userId: string;
walletId: string;
amount: string;
assetType: string;
toAddress: string;
}
export class WithdrawalRequestedEvent extends DomainEvent {
constructor(private readonly payload: WithdrawalRequestedPayload) {
super({
aggregateId: payload.walletId,
aggregateType: 'WalletAccount',
});
}
getPayload(): WithdrawalRequestedPayload {
return this.payload;
}
}