import { DomainEvent } from './domain-event.base';

export interface SettlementCompletedPayload {
  userId: string;
  walletId: string;
  settlementOrderId: string;
  usdtAmount: string;
  settleCurrency: string;
  receivedAmount: string;
  swapTxHash?: string;
}

export class SettlementCompletedEvent extends DomainEvent {
  constructor(private readonly payload: SettlementCompletedPayload) {
    super({
      aggregateId: payload.walletId,
      aggregateType: 'WalletAccount',
    });
  }

  getPayload(): SettlementCompletedPayload {
    return this.payload;
  }
}
