fix debt price in usd

This commit is contained in:
Georges KABBOUCHI 2021-09-07 21:35:52 +03:00
parent 8e198e5ae7
commit cfd957648f
2 changed files with 8 additions and 1 deletions

View File

@ -122,6 +122,10 @@ export function useReflexerPosition(
});
const debt = computed(() => ensureValue(safe.value.debt).toFixed());
const debtUsd = computed(() =>
times(debt.value, raiInUsd.value).toFixed()
);
const minDebt = computed(
() => safeTypes.value[0]?.totalDebt?.toString() || "699"
);
@ -197,6 +201,7 @@ export function useReflexerPosition(
liquidationPrice,
liquidationMaxPrice: price,
debt,
debtUsd,
minDebt,
debtCeilingReached
};

View File

@ -135,7 +135,7 @@
<CardReflexer
:amount="debt"
:amount-usd="debt"
:amount-usd="debtUsd"
position-type="borrow"
token-key="rai"
:safe-token-type="safeTokenType"
@ -206,6 +206,7 @@ export default defineComponent({
liquidationPrice,
liquidationMaxPrice,
debt,
debtUsd,
minDebt,
debtCeilingReached,
raiInUsd,
@ -276,6 +277,7 @@ export default defineComponent({
showBorrow,
showSupply,
debt,
debtUsd,
minDebt,
debtCeilingReached,
raiInUsd,