Skip to content

Commit

Permalink
Merge pull request #685 from Adamant-im/fix/usdt-tx-fee
Browse files Browse the repository at this point in the history
fix: usdt tx fee
  • Loading branch information
bludnic authored Nov 25, 2024
2 parents f986b0d + 397e565 commit 9c3cb3b
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 9c3cb3b

Please sign in to comment.