Skip to content

Commit 471db71

Browse files
authored
fix: cp-7.46.0 add navigation to activity page before solana tx submission (#15082)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Navigate to activity tab before solana tx submission to ensure submission state doesn't get stuck. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to swaps 2. Get quote 3. Click "continue" 4. Get navigated to activity page before snap is confirmed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 3ba772b commit 471db71

File tree

1 file changed

+7
-0
lines changed
  • app/components/UI/Bridge/Views/BridgeView

1 file changed

+7
-0
lines changed

app/components/UI/Bridge/Views/BridgeView/index.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
setSlippage,
3737
selectIsSubmittingTx,
3838
setIsSubmittingTx,
39+
selectIsSolanaToEvm,
3940
} from '../../../../../core/redux/slices/bridge';
4041
import {
4142
useNavigation,
@@ -114,6 +115,7 @@ const BridgeView = () => {
114115

115116
const isEvmSolanaBridge = useSelector(selectIsEvmSolanaBridge);
116117
const isSolanaSwap = useSelector(selectIsSolanaSwap);
118+
const isSolanaToEvm = useSelector(selectIsSolanaToEvm);
117119
// inputRef is used to programmatically blur the input field after a delay
118120
// This gives users time to type before the keyboard disappears
119121
// The ref is typed to only expose the blur method we need
@@ -241,6 +243,11 @@ const BridgeView = () => {
241243
const handleContinue = async () => {
242244
if (activeQuote) {
243245
dispatch(setIsSubmittingTx(true));
246+
// TEMPORARY: If tx originates from Solana, navigate to transactions view BEFORE submitting the tx
247+
// Necessary because snaps prevents navigation after tx is submitted
248+
if (isSolanaSwap || isSolanaToEvm) {
249+
navigation.navigate(Routes.TRANSACTIONS_VIEW);
250+
}
244251
await submitBridgeTx({
245252
quoteResponse: activeQuote,
246253
});

0 commit comments

Comments
 (0)