Skip to content

Commit

Permalink
fix(quote): exclusiveResolver and gasCost types
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Mar 20, 2024
1 parent 2adb2dd commit b621415
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
25 changes: 20 additions & 5 deletions src/api/quoter/quoter.api.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {QuoterApi} from './quoter.api'
import {QuoterRequest} from './quoter.request'
import {Quote} from './quote'
import {PresetEnum} from './types'
import {PresetEnum, QuoterResponse} from './types'
import {QuoterCustomPresetRequest} from './quoter-custom-preset.request'
import {HttpProviderConnector} from '../../connector'

Expand Down Expand Up @@ -46,7 +46,12 @@ describe('Quoter API', () => {
}
],
allowPartialFills: true,
allowMultipleFills: true
allowMultipleFills: true,
exclusiveResolver: null,
gasCost: {
gasBumpEstimate: 0,
gasPriceEstimate: '0'
}
},
medium: {
auctionDuration: 180,
Expand All @@ -63,7 +68,12 @@ describe('Quoter API', () => {
}
],
allowPartialFills: true,
allowMultipleFills: true
allowMultipleFills: true,
exclusiveResolver: null,
gasCost: {
gasBumpEstimate: 0,
gasPriceEstimate: '0'
}
},
slow: {
auctionDuration: 600,
Expand All @@ -80,7 +90,12 @@ describe('Quoter API', () => {
}
],
allowPartialFills: true,
allowMultipleFills: true
allowMultipleFills: true,
exclusiveResolver: null,
gasCost: {
gasBumpEstimate: 0,
gasPriceEstimate: '0'
}
}
},
toTokenAmount: '626772029219852913',
Expand All @@ -103,7 +118,7 @@ describe('Quoter API', () => {
'0xcfa62f77920d6383be12c91c71bd403599e1116f'
],
bankFee: 0
}
} as QuoterResponse

const QuoterResponseMock = new Quote(params, ResponseMock)

Expand Down
4 changes: 2 additions & 2 deletions src/api/quoter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export type PresetData = {
points: AuctionPoint[]
allowPartialFills: boolean
allowMultipleFills: boolean
gasCost?: {
gasCost: {
gasBumpEstimate: number
gasPriceEstimate: string
}
exclusiveResolver?: string
exclusiveResolver: string | null
}

export type AuctionPoint = {
Expand Down

0 comments on commit b621415

Please sign in to comment.