From 2f0205cd9fafd5b980e4a9ef5f03c3f5bfff91e9 Mon Sep 17 00:00:00 2001 From: migbash <20924663+migbash@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:43:41 +0000 Subject: [PATCH] fix: #1020 (mobile); --- src/lib/components/_main_/auth/Auth_Widget.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/_main_/auth/Auth_Widget.svelte b/src/lib/components/_main_/auth/Auth_Widget.svelte index 2288b21a3..e0fd28aa8 100644 --- a/src/lib/components/_main_/auth/Auth_Widget.svelte +++ b/src/lib/components/_main_/auth/Auth_Widget.svelte @@ -492,7 +492,8 @@ COMPONENT JS (w/ TS) // NOTE: detect mobile device // if (typeof screen.orientation !== 'undefined') { - if (navigator?.userAgentData?.mobile) { + // if (navigator?.userAgentData?.mobile) { + if (/Mobi/i.test(window.navigator.userAgent)) { // [ℹ] navigate to MetaMask in-app browser // await goto('https://metamask.app.link/dapp/scores.betarena.com/?dappLogin=true') // ✅ works // await goto('https://metamask.app.link/dapp/http://192.168.0.28:3050/') // does not work