From 10879d43d45fd26d97f44db5db6b6e6d9ebd86a3 Mon Sep 17 00:00:00 2001 From: Alexander Evchenko Date: Tue, 20 Feb 2024 15:32:15 +0400 Subject: [PATCH] fix: getDefaultTokenContract --- src/shared/utils/tokenValues.ts | 4 +++- .../ReviewRelayTransaction/ReviewTransactionContainer.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/utils/tokenValues.ts b/src/shared/utils/tokenValues.ts index 38f542512..75a812f60 100644 --- a/src/shared/utils/tokenValues.ts +++ b/src/shared/utils/tokenValues.ts @@ -65,7 +65,9 @@ export const getDefaultFeeRelay = (chainId: ChainID) => getDefaultTokens(chainId)[0] export const getDefaultTokenContract = (chainId: ChainID) => - isRelayWallet ? getDefaultFeeRelay(chainId) : getDefaultFeeEOA() + isRelayWallet + ? getDefaultFeeRelay(chainId).contractAddress + : getDefaultFeeEOA().contractAddress export const getFee = (chainId: ChainID, address?: string) => { switch (isRelayWallet) { diff --git a/src/ux/requestsModal/ReviewRelayTransaction/ReviewTransactionContainer.tsx b/src/ux/requestsModal/ReviewRelayTransaction/ReviewTransactionContainer.tsx index 9f8d68a67..91ca7db77 100644 --- a/src/ux/requestsModal/ReviewRelayTransaction/ReviewTransactionContainer.tsx +++ b/src/ux/requestsModal/ReviewRelayTransaction/ReviewTransactionContainer.tsx @@ -109,7 +109,7 @@ export const ReviewTransactionContainer = ({ } } - return getDefaultTokenContract(chainId).contractAddress + return getDefaultTokenContract(chainId) }, [symbol, chainId, getTokenBySymbol]) const fee = useMemo(() => getFee(chainId, txRequest.to), [chainId, txRequest])