Skip to content

Commit

Permalink
Merge pull request #392 from waves-exchange:l2mp-staking-overflow-fix
Browse files Browse the repository at this point in the history
l2mp staking fix
  • Loading branch information
ridev6 authored Jul 25, 2023
2 parents 9315b81 + 929ff43 commit b0fb47e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ride/l2mp_staking.ride
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func getUserAvailableAssetsToWithdraw(userAddress: String) = {
let userLpAmount = getUserLpAmount(userAddress)
let userAvailableAssetToWithdraw = fraction(userLpAmount, getCurrentPrice(), scale8)

if (userAvailableAssetToWithdraw * scale8 < getCurrentPrice()) then 0 else userAvailableAssetToWithdraw
if (userAvailableAssetToWithdraw < 0) then 0 else userAvailableAssetToWithdraw
}

func getStakeActions(i: Invocation, userAddress: String) = {
Expand Down

0 comments on commit b0fb47e

Please sign in to comment.