From cfd957648fab5e54964ada2336e769fa684d146f Mon Sep 17 00:00:00 2001 From: Georges KABBOUCHI Date: Tue, 7 Sep 2021 21:35:52 +0300 Subject: [PATCH] fix debt price in usd --- composables/protocols/useReflexerPosition.ts | 5 +++++ pages/mainnet/reflexer.vue | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/composables/protocols/useReflexerPosition.ts b/composables/protocols/useReflexerPosition.ts index 11007b9..d4124c0 100644 --- a/composables/protocols/useReflexerPosition.ts +++ b/composables/protocols/useReflexerPosition.ts @@ -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 }; diff --git a/pages/mainnet/reflexer.vue b/pages/mainnet/reflexer.vue index eb3d18f..b19b0c7 100644 --- a/pages/mainnet/reflexer.vue +++ b/pages/mainnet/reflexer.vue @@ -135,7 +135,7 @@