From 25e818e7efa8825d9054e08dd935702236d6db0c Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:05:08 +0100 Subject: [PATCH] fix: clear url param after load --- static/scripts/rewards/web3/connect-wallet.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/scripts/rewards/web3/connect-wallet.ts b/static/scripts/rewards/web3/connect-wallet.ts index cbe63baa..6d544dce 100644 --- a/static/scripts/rewards/web3/connect-wallet.ts +++ b/static/scripts/rewards/web3/connect-wallet.ts @@ -6,6 +6,8 @@ export async function connectWallet(): Promise { try { const wallet = new ethers.providers.Web3Provider(window.ethereum); + window.history.pushState({}, "", "/"); + await wallet.send("eth_requestAccounts", []); const signer = wallet.getSigner();