diff --git a/app/scripts/lib/smart-transaction/smart-transactions.ts b/app/scripts/lib/smart-transaction/smart-transactions.ts index 617b78a73a8d..cf3ba8119db2 100644 --- a/app/scripts/lib/smart-transaction/smart-transactions.ts +++ b/app/scripts/lib/smart-transaction/smart-transactions.ts @@ -379,6 +379,7 @@ class SmartTransactionHook { status: SmartTransactionStatuses.PENDING, creationTime: Date.now(), uuid, + chainId: this.#chainId, }, isDapp: this.#isDapp, txId: this.#transactionMeta.id, diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index 134affc52504..2873680c2fce 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -676,6 +676,7 @@ export const createSwapsMockStore = () => { '0x55ad39634ee10d417b6e190cfd3736098957e958879cffe78f1f00f4fd2654d6', minedTx: 'success', }, + chainId: CHAIN_IDS.MAINNET, }, { uuid: 'uuid2', @@ -689,6 +690,7 @@ export const createSwapsMockStore = () => { '0x55ad39634ee10d417b6e190cfd3736098957e958879cffe78f1f00f4fd2654d6', minedTx: 'success', }, + chainId: CHAIN_IDS.MAINNET, }, ], }, diff --git a/ui/pages/smart-transactions/smart-transaction-status-page/smart-transaction-status-page.tsx b/ui/pages/smart-transactions/smart-transaction-status-page/smart-transaction-status-page.tsx index 491cbcd6bd4e..224c50a14502 100644 --- a/ui/pages/smart-transactions/smart-transaction-status-page/smart-transaction-status-page.tsx +++ b/ui/pages/smart-transactions/smart-transaction-status-page/smart-transaction-status-page.tsx @@ -26,7 +26,6 @@ import { IconColor, } from '../../../helpers/constants/design-system'; import { useI18nContext } from '../../../hooks/useI18nContext'; -import { getCurrentChainId } from '../../../../shared/modules/selectors/networks'; import { getFullTxData } from '../../../selectors'; import { BaseUrl } from '../../../../shared/constants/urls'; import { hideLoadingIndication } from '../../../store/actions'; @@ -296,7 +295,7 @@ export const SmartTransactionStatusPage = ({ smartTransaction?.status?.startsWith(SmartTransactionStatuses.CANCELLED), ); - const chainId: string = useSelector(getCurrentChainId); + const chainId: string | undefined = smartTransaction?.chainId; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: This same selector is used in the awaiting-swap component. const fullTxData = useSelector((state) => getFullTxData(state, txId)) || {};