diff --git a/src/components/NftTransfersTable.vue b/src/components/NftTransfersTable.vue index 0936946a..75f62ea1 100644 --- a/src/components/NftTransfersTable.vue +++ b/src/components/NftTransfersTable.vue @@ -11,12 +11,13 @@ import AddressField from 'components/AddressField.vue'; import NftItemField from 'components/NftItemField.vue'; import DateField from 'components/DateField.vue'; import { formatWei, toChecksumAddress } from 'src/lib/utils'; -import { EvmTransactionExtended, Pagination } from 'src/types'; +import { NftTransferProps, NftTransferData } from 'src/types'; -import { loadTransaction } from 'src/lib/transaction-utils'; +import { loadTransaction, getDirection } from 'src/lib/transaction-utils'; import { WEI_PRECISION } from 'src/antelope/wallets/utils'; import { BigNumber } from 'ethers'; import { prettyPrintCurrency } from 'src/antelope/wallets/utils/currency-utils'; +import { Pagination } from 'src/types'; const { t: $t } = useI18n(); @@ -62,30 +63,6 @@ interface TransferData { // --------------------- -export interface NftTransferData { - hash: string; - timestamp: number; - amount: string; - id: string; - value: string; - contract: { - address: string; - name: string; - symbol: string; - decimals: number; - }; - from: string; - to: string; - trx: EvmTransactionExtended | null; -} - -export interface NftTransferProps { - title: string; - tokenType: string; - address: string; - initialPageSize: number; -} - const props = withDefaults(defineProps(), { title: '', tokenType: '', @@ -414,14 +391,10 @@ onMounted(() => { - - {{ $t('components.transaction.out').toUpperCase() }} - - {{ $t('components.transaction.in').toUpperCase() }} + {{ $t(`components.transaction.${getDirection(address, props.row)}`).toUpperCase() }} @@ -532,22 +505,7 @@ onMounted(() => {