From 50c41ee8f3422784d2f23ee79b048f58d9fad164 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:22:34 +0100 Subject: [PATCH] fix: remove param for mobile only --- static/scripts/rewards/web3/connect-wallet.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/scripts/rewards/web3/connect-wallet.ts b/static/scripts/rewards/web3/connect-wallet.ts index 8fdc2dd7..77b43623 100644 --- a/static/scripts/rewards/web3/connect-wallet.ts +++ b/static/scripts/rewards/web3/connect-wallet.ts @@ -28,7 +28,10 @@ export async function connectWallet(): Promise { try { const wallet = new ethers.providers.Web3Provider(window.ethereum); - window.history.pushState({}, "", "/"); + if (mobileCheck()) { + // the param is too long and prevents a mobile user from connecting their wallet + window.history.pushState({}, "", "/"); + } await wallet.send("eth_requestAccounts", []);