Skip to content

Commit

Permalink
integer typecasting update
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnukumavat committed Dec 22, 2023
1 parent 5b75679 commit ced9898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/liquidity/amm/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func MatchableAmount(order Order, price sdkmath.LegacyDec) (matchableAmt sdkmath
remainingOfferCoinAmt := order.GetOfferCoinAmount().Sub(order.GetPaidOfferCoinAmount())
matchableAmt = sdkmath.MinInt(
order.GetOpenAmount(),
sdkmath.LegacyNewDec(remainingOfferCoinAmt.Int64()).QuoTruncate(price).TruncateInt(),
remainingOfferCoinAmt.ToLegacyDec().QuoTruncate(price).TruncateInt(),
)
case Sell:
matchableAmt = order.GetOpenAmount()
Expand Down

0 comments on commit ced9898

Please sign in to comment.