Skip to content

Commit

Permalink
Ignore pool overflow errors for slippage
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Jul 27, 2023
1 parent d2d01d3 commit 9a7522e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ func (p *TradeProcessor) roundingSlippage(
true,
)
if !ok {
return null.Int{}, errors.New("Liquidity pool overflows from this exchange")
// Temporary workaround for https://github.com/stellar/go/issues/4203
// Given strict receives that would overflow here, minimum slippage
// so they get excluded.
roundingSlippageBips = xdr.Int64(math.MinInt64)
}
return null.IntFrom(int64(roundingSlippageBips)), nil
default:
Expand Down

0 comments on commit 9a7522e

Please sign in to comment.