Specifying tolerance_bps causes single-swap quotes to fail
As described in this Discord thread, tolerance_bps
being set for a single-swap quote results in a panic error.
I currently predict this to be due to this line:
feelessEmit := amount.Mul(fromPool.BalanceRune).Quo(fromPool.BalanceAsset).Mul(toPool.BalanceAsset).Quo(toPool.BalanceRune)
which is within a
if len(params[toleranceBasisPointsParam]) > 0 {
conditional block.
I currently propose breaking this up into separate lines, each conditional on the asset in question not satisfying IsRune
.