diff --git a/frontend/package.json b/frontend/package.json index 61c2073..0bea260 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,29 +13,30 @@ }, "dependencies": { "@near-js/providers": "^1.0.1", - "@near-wallet-selector/bitte-wallet": "^8.10.0", - "@near-wallet-selector/core": "^8.10.0", - "@near-wallet-selector/ethereum-wallets": "^8.10.0", - "@near-wallet-selector/here-wallet": "^8.10.0", - "@near-wallet-selector/hot-wallet": "^8.10.0", - "@near-wallet-selector/ledger": "^8.10.0", - "@near-wallet-selector/meteor-wallet": "^8.10.0", - "@near-wallet-selector/meteor-wallet-app": "^8.10.0", - "@near-wallet-selector/modal-ui": "^8.10.0", - "@near-wallet-selector/my-near-wallet": "^8.10.0", - "@near-wallet-selector/near-mobile-wallet": "^8.10.0", - "@near-wallet-selector/nightly": "^8.10.0", - "@near-wallet-selector/react-hook": "^8.9.15", - "@near-wallet-selector/sender": "^8.10.0", - "@near-wallet-selector/welldone-wallet": "^8.10.0", - "@reown/appkit": "^1.6.9", - "@reown/appkit-adapter-wagmi": "^1.6.9", + "@near-wallet-selector/bitte-wallet": "^9.0.2", + "@near-wallet-selector/core": "^9.0.2", + "@near-wallet-selector/ethereum-wallets": "^9.0.2", + "@near-wallet-selector/here-wallet": "^9.0.2", + "@near-wallet-selector/hot-wallet": "^9.0.2", + "@near-wallet-selector/ledger": "^9.0.2", + "@near-wallet-selector/meteor-wallet": "^9.0.2", + "@near-wallet-selector/meteor-wallet-app": "^9.0.2", + "@near-wallet-selector/modal-ui": "^9.0.2", + "@near-wallet-selector/my-near-wallet": "^9.0.2", + "@near-wallet-selector/near-mobile-wallet": "^9.0.2", + "@near-wallet-selector/nightly": "^9.0.2", + "@near-wallet-selector/react-hook": "^9.0.2", + "@near-wallet-selector/sender": "^9.0.2", + "@near-wallet-selector/welldone-wallet": "^9.0.2", + "@reown/appkit": "^1.7.7", + "@reown/appkit-adapter-wagmi": "^1.7.7", + "@wagmi/core": "^2.17.2", "bootstrap": "^5", "bootstrap-icons": "^1.11.3", - "near-api-js": "^5.0.1", "next": "15.2.1", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "viem": "^2.30.5" }, "devDependencies": { "encoding": "^0.1.13", diff --git a/frontend/src/wallets/web3modal.js b/frontend/src/wallets/web3modal.js index 55f4ba0..fe14448 100644 --- a/frontend/src/wallets/web3modal.js +++ b/frontend/src/wallets/web3modal.js @@ -43,4 +43,12 @@ export const web3Modal = createAppKit({ socials: false, // Smart accounts (Safe contract) not available on NEAR Protocol, only EOA. }, coinbasePreference: "eoaOnly", // Smart accounts (Safe contract) not available on NEAR Protocol, only EOA. + allWallets: "SHOW", }); + +// force reconnecting if the user has already signed in with an ethereum wallet +// this is a workaround until `ethereum-wallets` supports the `reconnect` method +if (typeof window !== "undefined") { + const recentWallets = localStorage.getItem("near-wallet-selector:recentlySignedInWallets"); + recentWallets && recentWallets.includes("ethereum-wallets") && reconnect(wagmiAdapter.wagmiConfig) +} \ No newline at end of file