From ea0dfb4e76642598a3bcb01333f5e4fc97b1ddaa Mon Sep 17 00:00:00 2001 From: Bryan Fullam Date: Fri, 2 May 2025 19:32:45 +0200 Subject: [PATCH] fix: add navigation to activity page before tx submission for solana swaps/beidge --- app/components/UI/Bridge/Views/BridgeView/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/components/UI/Bridge/Views/BridgeView/index.tsx b/app/components/UI/Bridge/Views/BridgeView/index.tsx index 3a5cd4c230df..e1ba158dc7ba 100644 --- a/app/components/UI/Bridge/Views/BridgeView/index.tsx +++ b/app/components/UI/Bridge/Views/BridgeView/index.tsx @@ -36,6 +36,7 @@ import { setSlippage, selectIsSubmittingTx, setIsSubmittingTx, + selectIsSolanaToEvm, } from '../../../../../core/redux/slices/bridge'; import { useNavigation, @@ -114,6 +115,7 @@ const BridgeView = () => { const isEvmSolanaBridge = useSelector(selectIsEvmSolanaBridge); const isSolanaSwap = useSelector(selectIsSolanaSwap); + const isSolanaToEvm = useSelector(selectIsSolanaToEvm); // inputRef is used to programmatically blur the input field after a delay // This gives users time to type before the keyboard disappears // The ref is typed to only expose the blur method we need @@ -241,6 +243,11 @@ const BridgeView = () => { const handleContinue = async () => { if (activeQuote) { dispatch(setIsSubmittingTx(true)); + // TEMPORARY: If tx originates from Solana, navigate to transactions view BEFORE submitting the tx + // Necessary because snaps prevents navigation after tx is submitted + if (isSolanaSwap || isSolanaToEvm) { + navigation.navigate(Routes.TRANSACTIONS_VIEW); + } await submitBridgeTx({ quoteResponse: activeQuote, });