Skip to content

fix: cp-7.46.0 add navigation to activity page before solana tx submission #15082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/components/UI/Bridge/Views/BridgeView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
setSlippage,
selectIsSubmittingTx,
setIsSubmittingTx,
selectIsSolanaToEvm,
} from '../../../../../core/redux/slices/bridge';
import {
useNavigation,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
});
Expand Down
Loading