diff --git a/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte b/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte
index 784fd28641..4c401df701 100644
--- a/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte
+++ b/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte
@@ -55,6 +55,10 @@
}
}
$: preparedTransaction.gasPrice = Converter.bigIntToHex(gasPrices?.[selectedGasSpeed] ?? gasPrices.required)
+ $: baseCoinTransfer = {
+ token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
+ rawAmount: Converter.bigIntLikeToBigInt(preparedTransaction.value),
+ }
setParsedContractData()
function setParsedContractData(): void {
@@ -217,13 +221,10 @@
/>
- {#if !preparedTransaction.data}
- {@const baseCoinTransfer = {
- token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
- rawAmount: Converter.bigIntLikeToBigInt(preparedTransaction.value),
- }}
+ {#if preparedTransaction.value}
- {:else if parsedData?.type === ParsedSmartContractType.CoinTransfer}
+ {/if}
+ {#if parsedData?.type === ParsedSmartContractType.CoinTransfer}
{@const baseCoinTransfer = {
token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
rawAmount: parsedData.rawAmount,
diff --git a/packages/shared/src/lib/core/wallet/types/token-transfer-data.type.ts b/packages/shared/src/lib/core/wallet/types/token-transfer-data.type.ts
index 96306d010e..e40f6ea570 100644
--- a/packages/shared/src/lib/core/wallet/types/token-transfer-data.type.ts
+++ b/packages/shared/src/lib/core/wallet/types/token-transfer-data.type.ts
@@ -2,6 +2,6 @@ import { IToken } from '@core/token/interfaces'
export type TokenTransferData = {
rawAmount: bigint
- token: IToken
+ token?: IToken
unit?: string
}