Skip to content

Commit

Permalink
fix(rest-api): apply default slippage (#3489)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi authored Jan 14, 2025
1 parent aaf6978 commit f647a1c
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 f647a1c

Please sign in to comment.