Skip to content

Commit

Permalink
Merge pull request #143 from gnoswap-labs/GSW-733-fix-amount-specifie…
Browse files Browse the repository at this point in the history
…d-is-zero

GSW-733 fix: amountSpecified is zero
  • Loading branch information
notJoon authored Dec 20, 2023
2 parents e523dd8 + 2cc5ab6 commit 7c03783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/router.gno
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func SwapRoute(
// check if route hop is up to 3
require(numHops <= 3, "[ROUTER] router.gno__SwapRoute() || numHops > 3")

toSwap := amountSpecified / bigint(100) * bigint(quote)
toSwap := amountSpecified * bigint(quote) / bigint(100)

if numHops == 1 { // SINGLE
resultAmount += handleSingleSwap(route, toSwap, false)
Expand Down

0 comments on commit 7c03783

Please sign in to comment.