Deep link inside Metamask mobile browser

Of course support)

You should declare a device check function if you don’t have one in your code:

function isMobileDevice() {
  return "ontouchstart" in window || "onmsgesturechange" in window;
}

And based on the result of its execution, declare the following redirection logic:

  <Button
        onClick={() => {
                      if (isMobileDevice()) {
                      window.open(metamaskAppDeepLink);
                       } else {
                        window.open("https://metamask.io/", "_blank");
                      }
                    }}
                  >
                    Launch
 </Button>

Please let me know what results these actions bring to you :wink:

6 Likes