From 397e5654c1d98ecd6835ae6f698060db4369f193 Mon Sep 17 00:00:00 2001 From: Ivanov N Date: Sun, 24 Nov 2024 19:08:11 +0300 Subject: [PATCH] fix: usdt tx fee --- src/components/transactions/Erc20Transaction.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/transactions/Erc20Transaction.vue b/src/components/transactions/Erc20Transaction.vue index 012af7424..ef66b6435 100644 --- a/src/components/transactions/Erc20Transaction.vue +++ b/src/components/transactions/Erc20Transaction.vue @@ -22,6 +22,7 @@ import { useStore } from 'vuex' import TransactionTemplate from './TransactionTemplate.vue' import { getExplorerTxUrl } from '@/config/utils' import { Cryptos, CryptoSymbol } from '@/lib/constants' +import { AllCryptos } from '@/lib/constants/cryptos' import { useCryptoAddressPretty } from './hooks/address' import { useBlockHeight } from '@/hooks/queries/useBlockHeight' import { useTransactionStatus } from './hooks/useTransactionStatus' @@ -96,7 +97,13 @@ export default defineComponent({ return transaction.value?.confirmations }) - const fee = computed(() => transaction.value?.fee) + const fee = computed(() => { + const ethFee = transaction.value?.fee || 0 + const currentCurrency = store.state.options.currentRate + const currentRate = store.state.rate.rates[`${AllCryptos.ETH}/${currentCurrency}`] + const feeRate = (ethFee * currentRate).toFixed(2) + return +feeRate + }) return { refetch,