Skip to content

Commit

Permalink
refactor: clarify maxBoostFee
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD committed Nov 21, 2024
1 parent dd90aa3 commit e1eb1de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions packages/swapper/src/swappers/ChainflipSwapper/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export const chainflipApi: SwapperApi = {
refundAddress: from,
commissionBps: serviceCommission,
numberOfChunks: step.chainflipNumberOfChunks,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks
boostFee: 0,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks,
maxBoostFee: 0,
})

if (maybeSwapResponse.isErr()) {
Expand Down Expand Up @@ -211,8 +211,8 @@ export const chainflipApi: SwapperApi = {
refundAddress: sendAddress,
commissionBps: serviceCommission,
numberOfChunks: step.chainflipNumberOfChunks,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks
boostFee: step.source === CHAINFLIP_BOOST_SWAP_SOURCE ? 10 : 0,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks,
maxBoostFee: step.source === CHAINFLIP_BOOST_SWAP_SOURCE ? 10 : 0,
})

if (maybeSwapResponse.isErr()) {
Expand Down Expand Up @@ -287,8 +287,8 @@ export const chainflipApi: SwapperApi = {
refundAddress: from,
commissionBps: serviceCommission,
numberOfChunks: step.chainflipNumberOfChunks,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks
boostFee: 0,
chunkIntervalBlocks: step.chainflipChunkIntervalBlocks,
maxBoostFee: 0,
})

if (maybeSwapResponse.isErr()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type GetChainFlipSwapArgs = ChainFlipBrokerBaseArgs & {
sourceAsset: string
destinationAsset: string
destinationAddress: string
boostFee?: number
maxBoostFee?: number
minimumPrice: string
refundAddress: string
retryDurationInBlocks?: number
Expand Down Expand Up @@ -94,7 +94,7 @@ export const getChainFlipSwap = ({
sourceAsset,
destinationAsset,
destinationAddress,
boostFee = 0,
maxBoostFee = 0,
minimumPrice,
refundAddress,
retryDurationInBlocks = 10,
Expand All @@ -110,7 +110,7 @@ export const getChainFlipSwap = ({
`&sourceAsset=${sourceAsset}` +
`&destinationAsset=${destinationAsset}` +
`&destinationAddress=${destinationAddress}` +
`&boostFee=${boostFee}` +
`&boostFee=${maxBoostFee}` +
`&minimumPrice=${minimumPrice}` +
`&refundAddress=${refundAddress}` +
`&retryDurationInBlocks=${retryDurationInBlocks}` +
Expand Down

0 comments on commit e1eb1de

Please sign in to comment.