Skip to content

Deeplinks/Buy/Sell: Ref - Prevent to close webView modal from deeplinks handling - #2339

Merged
JohnathanWhite merged 1 commit into
bitpay:developfrom
Gamboster:ref/preventToCloseWebViewWithDeeplinks
Aug 26, 2026
Merged

Deeplinks/Buy/Sell: Ref - Prevent to close webView modal from deeplinks handling#2339
JohnathanWhite merged 1 commit into
bitpay:developfrom
Gamboster:ref/preventToCloseWebViewWithDeeplinks

Conversation

@Gamboster

Copy link
Copy Markdown
Collaborator

The APP.inAppBrowserOpen state in Redux is set to true only when openUrlWithInAppBrowser (app.effects.ts:647) opens a real native session. The block in useDeeplinks.ts called InAppBrowser.close() without checking that state—it only checked isAvailable() (whether the module exists on the device, not whether a session is open). On iOS, close() in react-native-inappbrowser-reborn calls RCTPresentedViewController() and dismisses whatever view controller is currently presented; it's not scoped to a specific IAB session. If the WebView modal (used in buy/sell) is presented as a native modal at that moment, it ends up closing that instead of a real IAB.

@JohnathanWhite
JohnathanWhite merged commit 9daea2e into bitpay:develop Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants