Skip to content

Commit

Permalink
fix: usdt tx fee
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivanov N committed Nov 24, 2024
1 parent f986b0d commit 397e565
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/transactions/Erc20Transaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 397e565

Please sign in to comment.