Skip to content

Commit

Permalink
chore: update /maker response type
Browse files Browse the repository at this point in the history
  • Loading branch information
krboktv committed Oct 9, 2024
1 parent 2685167 commit e22f265
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
8 changes: 8 additions & 0 deletions src/api/orders/order-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,24 +376,28 @@ describe(__filename, () => {
escrowEvents: [
{
transactionHash: '0x2345',
escrow: '0x123',
action: EscrowEventAction.SrcEscrowCreated,
blockTimestamp: 123,
side: EscrowEventSide.Src
},
{
transactionHash: '0x4234',
escrow: '0x123',
action: EscrowEventAction.DstEscrowCreated,
blockTimestamp: 124,
side: EscrowEventSide.Dst
},
{
transactionHash: '0x6454',
escrow: '0x123',
action: EscrowEventAction.Withdrawn,
side: EscrowEventSide.Dst,
blockTimestamp: 125
},
{
transactionHash: '0x4354',
escrow: '0x123',
action: EscrowEventAction.Withdrawn,
side: EscrowEventSide.Src,
blockTimestamp: 126
Expand Down Expand Up @@ -500,24 +504,28 @@ describe(__filename, () => {
escrowEvents: [
{
transactionHash: '0x2345',
escrow: '0x123',
action: EscrowEventAction.SrcEscrowCreated,
blockTimestamp: 123,
side: EscrowEventSide.Src
},
{
transactionHash: '0x4234',
escrow: '0x123',
action: EscrowEventAction.DstEscrowCreated,
blockTimestamp: 124,
side: EscrowEventSide.Dst
},
{
transactionHash: '0x6454',
escrow: '0x123',
action: EscrowEventAction.Withdrawn,
side: EscrowEventSide.Dst,
blockTimestamp: 125
},
{
transactionHash: '0x4354',
escrow: '0x123',
action: EscrowEventAction.Withdrawn,
side: EscrowEventSide.Src,
blockTimestamp: 126
Expand Down
19 changes: 2 additions & 17 deletions src/api/orders/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ export enum OrderStatus {
Refunded = 'refunded'
}

export type DetailedFill = {
status: FillStatus
txHash: string
filledMakerAmount: string
filledAuctionTakerAmount: string
escrowEvents: DetailedEscrowEventData[]
}

export type Fill = {
status: FillStatus
txHash: string
Expand All @@ -104,16 +96,9 @@ export enum EscrowEventAction {
EscrowCancelled = 'escrow_cancelled'
}

export type DetailedEscrowEventData = {
transactionHash: string
escrow: string
side: EscrowEventSide
action: EscrowEventAction
blockTimestamp: number
}

export type EscrowEventData = {
transactionHash: string
escrow: string
side: EscrowEventSide
action: EscrowEventAction
blockTimestamp: number
Expand All @@ -125,7 +110,7 @@ export type OrderStatusResponse = {
extension: string
points: AuctionPoint[] | null
cancelTx: string | null
fills: DetailedFill[]
fills: Fill[]
createdAt: string
auctionStartDate: number
auctionDuration: number
Expand Down

0 comments on commit e22f265

Please sign in to comment.