diff --git a/src/hooks/use-withdraw-vm.ts b/src/hooks/use-withdraw-vm.ts index b322728..f0e0ec8 100644 --- a/src/hooks/use-withdraw-vm.ts +++ b/src/hooks/use-withdraw-vm.ts @@ -108,6 +108,9 @@ export function useWithdrawVm() { currencyCode, ) const selectedRate = selectedCurrency.withdrawCoinsPerFiatValue || 1 + const selectedExchangeRate = + config.rates.find((rate) => rate.currency === selectedCurrency.code) + ?.diamondsPerFiatUnitValue || selectedRate const sortedPayChannels = useMemo( () => [ @@ -246,7 +249,7 @@ export function useWithdrawVm() { exchangeRateLabel: t('gameDesktop.withdraw.preview.exchangeRate', { currency: selectedCurrency.code, }), - exchangeRateValue: `1:${formatNumber(locale, selectedRate)}`, + exchangeRateValue: `1:${formatNumber(locale, selectedExchangeRate)}`, convertibleLabel: t('gameDesktop.withdraw.preview.convertible', { currency: selectedCurrency.code, }), @@ -260,6 +263,7 @@ export function useWithdrawVm() { locale, selectedCurrency.code, selectedCurrency.label, + selectedExchangeRate, selectedRate, t, ],