Page MenuHomePhabricator

[native] Support rainbow url scheme for Android
ClosedPublic

Authored by michal on Dec 29 2022, 4:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 5 2024, 12:49 AM
Unknown Object (File)
Apr 5 2024, 12:49 AM
Unknown Object (File)
Apr 5 2024, 12:49 AM
Unknown Object (File)
Apr 5 2024, 12:48 AM
Unknown Object (File)
Apr 2 2024, 12:41 AM
Unknown Object (File)
Apr 2 2024, 12:22 AM
Unknown Object (File)
Apr 2 2024, 12:22 AM
Unknown Object (File)
Apr 2 2024, 12:22 AM
Subscribers

Details

Summary

SIWE tries to redirect user to Rainbow which fails with a warning. To handle this we need to specify which apps we will interact with in the Android manifest.
More context:
ENG-2571
StackOverflow Post
Documentation

Test Plan

In the logged-out-modal.react.js I replaced onPressSIWE with:

onPressSIWE = () => {
    const url =
      'rainbow://open?_branch_referrer=H4sIAAAAAAAAA8soKSkottLXL8pLKk8sKNBLzs%2FVL08GAO6SbDcWAAAA&link_click_id=1136675358861894366';
    Linking.canOpenURL(url).then(function (supported) {
      if (supported) {
        return Linking.openURL(url);
      }
      console.warn("Can't open url: ".concat(url));
      return undefined;
    });
  };

and checked if the Rainbow app opens correctly.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable