Skip to content

Commit

Permalink
max withdraw amount logic adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
xieqiancaosissi committed Jan 5, 2024
1 parent afcc78c commit ae54ea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redux/selectors/getWithdrawMaxAmount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export const computeWithdrawMaxAmount = (tokenId: string, assets: Assets, portfo
.div(MAX_RATIO);
return sum.add(priceViotility);
}, new Decimal(0));
safePricedDiff = safePricedDiff.div(pricedUnitShare);
const discount = pricedUnitShare.div(assetPrice);
safePricedDiff = safePricedDiff.div(discount);
}
// const safeDiff = safePricedDiff
// .div(assetPrice)
Expand Down

0 comments on commit ae54ea4

Please sign in to comment.