Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/types/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export enum TransactionInfoType {
CREATION = 'Creation',
SWAP_ORDER = 'SwapOrder',
TWAP_ORDER = 'TwapOrder',
SWAP_TRANSFER = 'SwapTransfer',
}

export enum ConflictType {
Expand Down Expand Up @@ -307,6 +308,11 @@ export type SwapOrder = BaseOrder & {
type: TransactionInfoType.SWAP_ORDER
uid: string
}
export type SwapTransferOrder = Omit<Transfer, 'type'> &
BaseOrder & {
type: TransactionInfoType.SWAP_TRANSFER
uid: string
}

// Specific type for TwapOrder
export type TwapOrder = BaseOrder & {
Expand All @@ -325,7 +331,7 @@ export type TwapOrder = BaseOrder & {
}

// Discriminated union type
export type Order = SwapOrder | TwapOrder
export type Order = SwapOrder | SwapTransferOrder | TwapOrder

export type TransactionInfo = Transfer | SettingsChange | Custom | MultiSend | Cancellation | Creation | Order

Expand Down