Skip to content

Conversation

@sergii-bo
Copy link

@sergii-bo sergii-bo commented Jul 25, 2025

Summary

React linking canOpenURL does not recognize mailto protocol but it can open the mailto url. I agreed with @633kh4ck that it is less hacky approach then the one I commited previously. Plus it is less code on the client side.

Towards https://github.com/ExodusMovement/exodus-mobile/pull/29519

Test plan

- [ ] Sync it to mobile
- [ ] Apply the following diff 
- [ ] Open spend card feature
- [ ] Open profile
- [ ] Click support link 
- [ ] Assert that the email app is opened
- [ ] Go back to the Exodus app
- [ ] Assert no error
--- a/src/screens/Web3/Browser.js
+++ b/src/screens/Web3/Browser.js
@@ -608,16 +608,23 @@ const Web3Browser = ({ navigation, route }) => {
                       injectedJavaScriptBeforeContentLoadedForMainFrameOnly
                       injectedJavaScriptForMainFrameOnly
                       source={{ uri: dappUrl }}
                       onError={handleError}
                       onLoadStart={handleLoadStart}
                       onLoadEnd={handleLoad}
                       onScroll={onScroll}
                       ref={webview}
+                      deeplinkWhitelist={[
+                        'https:',
+                        'bitcoin:',
+                        'ethereum:',
+                        'exodus:',
+                        'wc:',
+                        'mailto:',
+                      ]}
                       minimumChromeVersion={android}
                       minimumIOSVersion={ios}
                       validateMeta={handleValidateMeta}
                       validateData={handleValidateData}
                       unsupportedVersionComponent={handleUnsupportedVersion}
mailto.link.on.android.mp4

@sergii-bo sergii-bo self-assigned this Jul 25, 2025
@sergii-bo sergii-bo added the bug Something isn't working label Jul 25, 2025
@sergii-bo sergii-bo requested review from a team, 633kh4ck and gutenye July 25, 2025 10:48
Copy link
Author

@sergii-bo sergii-bo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

  • Sync it to mobile
  • Apply the following diff
  • Open spend card feature
  • Open profile
  • Click support link
  • Assert that the email app is opened
  • Go back to the Exodus app
  • Assert no error

Copy link

@gutenye gutenye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link

@kevva kevva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@kevva kevva merged commit d1d8403 into master Jul 28, 2025
4 of 6 checks passed
@kevva kevva deleted the sergii-bo/fix/react-linking-does-not-recognize-mailto-protocol branch July 28, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants