Skip to content

Commit

Permalink
fix: show asset as unrecognized if so
Browse files Browse the repository at this point in the history
  • Loading branch information
CedrikNikita committed Feb 18, 2025
1 parent 2ea0771 commit fc95116
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/composables/transactionData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { computed, Ref } from 'vue';
import { Tag } from '@aeternity/aepp-sdk';
import { isEmpty } from 'lodash-es';

import type {
AccountAddress,
ITokenResolved,
Expand Down Expand Up @@ -115,9 +117,10 @@ export function useTransactionData({

const isNonTokenContract = computed(
(): boolean => (
!getProtocolAvailableTokens(protocol.value)[innerTx.value?.contractId]
|| innerTxTag.value === Tag.ContractCreateTx
),
!isEmpty(getProtocolAvailableTokens(protocol.value))
&& !getProtocolAvailableTokens(protocol.value)[innerTx.value?.contractId]
)
|| innerTxTag.value === Tag.ContractCreateTx,
);

const isTokenSale = computed(
Expand Down
1 change: 1 addition & 0 deletions src/popup/components/TransactionDetailsBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
:amount="amount"
:symbol="assetSymbol"
:hide-fiat="hideFiat"
:hide-symbol="!assetSymbol"
:protocol="protocol"
:price="price"
high-precision
Expand Down
1 change: 1 addition & 0 deletions src/protocols/ethereum/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function normalizeWeb3EthTransactionStructure(
senderId: from ? toChecksumAddress(from) : undefined,
recipientId: to ? toChecksumAddress(to) : undefined,
type: isEthTransfer ? 'SpendTx' : 'ContractCallTx', // TODO: create own types
tag: (isEthTransfer ? 'SpendTx' : 'ContractCallTx') as any, // TODO: create own types
arguments: [],
callerId: '',
contractId,
Expand Down

0 comments on commit fc95116

Please sign in to comment.