Skip to content

Commit

Permalink
fix: apply default slippage
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Jan 2, 2025
1 parent c66e5b4 commit ad45c77
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/rest-api/src/controllers/bridgeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export const bridgeController = async (req, res) => {
quote.originQuery.tokenOut
)

const { originQuery, destQuery } = Synapse.applyBridgeSlippage(
quote.bridgeModuleName,
quote.originQuery,
quote.destQuery
)

const callData =
destAddress && originUserAddress
? await Synapse.bridge(
Expand All @@ -62,8 +68,8 @@ export const bridgeController = async (req, res) => {
Number(toChain),
fromToken,
amountInWei,
quote.originQuery,
quote.destQuery
originQuery,
destQuery
)
: null

Expand Down

0 comments on commit ad45c77

Please sign in to comment.