Skip to content
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

Fix: Automatic WC redirect back to browser is broken on iOS 17 #5127

Merged
merged 11 commits into from
Oct 20, 2023
5 changes: 4 additions & 1 deletion src/screens/WalletConnectApprovalSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,11 @@ export default function WalletConnectApprovalSheet() {
const handleConnect = useCallback(() => {
handled.current = true;
goBack();
navigate(Routes.WALLET_CONNECT_REDIRECT_SHEET, {
type: 'connect',
});
handleSuccess(true);
}, [handleSuccess, goBack]);
}, [handleSuccess, goBack, navigate]);

const handleCancel = useCallback(() => {
handled.current = true;
Expand Down
6 changes: 5 additions & 1 deletion src/walletConnect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,11 @@ export async function onSessionProposal(
dappUrl: proposer.metadata.url,
});

maybeGoBackAndClearHasPendingRedirect();
// NOTE: iOS 17 broke our minimizer.goBack functionality so guard this until we can fix it
// ref: https://stackoverflow.com/questions/42516357/how-does-googles-custom-ios-keyboard-gboard-programmatically-dismiss-the-fron
if (IS_ANDROID) {
maybeGoBackAndClearHasPendingRedirect();
}
} else {
await rejectProposal({
proposal,
Expand Down
Loading