Skip to content

Commit bb83289

Browse files
enzo-bitflyremoterami
authored andcommitted
refactor: add prop type to set displayCurrencyDefault.main as target-currency in BcFormatAmount.vue
1 parent f8747cb commit bb83289

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

frontend/components/bc/format/BcFormatAmount.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type FormatAmountOptions = (
4242
*
4343
* E.g.: we get mGno values but want to display them in GNO
4444
*/
45-
targetCurrency?: 'clDisplayCurrency' | 'elDisplayCurrency' | CurrencyCode,
45+
targetCurrency?: 'clDisplayCurrency' | 'elDisplayCurrency' | 'mainDisplayCurrency' | CurrencyCode,
4646
targetUnitCrypto?: 'auto',
4747
zeroDisplay?: 'auto' | 'dash',
4848
}
@@ -110,6 +110,7 @@ const signDisplay = computed(() => {
110110
const targetCurrency = computed(() => {
111111
if (props.targetCurrency === 'elDisplayCurrency') return displayCurrencyDefault.executionLayer
112112
if (props.targetCurrency === 'clDisplayCurrency') return displayCurrencyDefault.consensusLayer
113+
if (props.targetCurrency === 'mainDisplayCurrency') return displayCurrencyDefault.main
113114
if (!props.targetCurrency) return selectedCurrencyMain.value
114115
return props.targetCurrency
115116
})

frontend/components/dashboard/DashboardValidatorManagementModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,13 @@ const inputValidator = ref('')
578578
<BcFormatAmount
579579
:value="latestEffectiveBalance ?? '0'"
580580
:maximum-fraction-digits="0"
581-
:target-currency="displayCurrencyDefault.main"
581+
target-currency="mainDisplayCurrency"
582582
/>
583583
/
584584
<BcFormatAmount
585585
:value="effectiveBalanceLimitPerDashboard || '0'"
586586
:maximum-fraction-digits="0"
587-
:target-currency="displayCurrencyDefault.main"
587+
target-currency="mainDisplayCurrency"
588588
/>
589589
</span>
590590
</div>

0 commit comments

Comments
 (0)