Skip to content

Commit

Permalink
fix display of locked amount
Browse files Browse the repository at this point in the history
  • Loading branch information
levity committed May 21, 2019
1 parent 9a1fc70 commit d7a06ee
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/pages/CDP.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,10 @@ function CDPViewPresentation({ cdp, showSidebar, account }) {
const liquidationRatio = cdp.ilkData.liquidationRatio + '.00%';
const stabilityFee = cdp.ilkData.rate * 100 + '00%';
const collateralAmount = round(cdp.collateral.toNumber(), 2).toFixed(2);
const collateralSymbol = cdp.collateral.symbol;
const collateralUSDValue = round(
cdp.collateral.times(cdp.collateralPrice).toNumber(),
2
);
const minCollateralAmount = round(cdp.minCollateral.toNumber(), 2);
const minCollateralValue = round(
cdp.minCollateral.times(cdp.collateralPrice).toNumber(),
2
).toFixed(2);
const collateralAvailableAmount = round(
cdp.collateralAvailable.toNumber(),
2
Expand All @@ -299,7 +293,6 @@ function CDPViewPresentation({ cdp, showSidebar, account }) {
2
);
const debtAmount = round(cdp.debt.toNumber(), 2).toFixed(2);
const debtSymbol = cdp.debt.symbol;
const daiAvailable = round(cdp.daiAvailable.toNumber(), 2).toFixed(2);

return (
Expand Down Expand Up @@ -351,8 +344,8 @@ function CDPViewPresentation({ cdp, showSidebar, account }) {
<CdpViewCard title={`${gem} ${lang.cdp_page.locked.toLowerCase()}`}>
<ActionContainerRow
title={`${gem} ${lang.cdp_page.locked.toLowerCase()}`}
value={`${minCollateralAmount} ${gem}`}
conversion={`${minCollateralValue} USD`}
value={`${collateralAmount} ${gem}`}
conversion={`${collateralUSDValue} USD`}
button={
<ActionButton
disabled={!account}
Expand Down

1 comment on commit d7a06ee

@levity
Copy link
Contributor Author

@levity levity commented on d7a06ee May 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops @sirromdev i should have caught this in the PR review, but i didn't until i went to clean up linter warnings -- the locked collateral is the total amount, not the "minimum safe" amount

Please sign in to comment.