mobile fixes

This commit is contained in:
tim
2025-04-26 15:00:12 -04:00
parent 2c5116c5de
commit 916c23e092
2 changed files with 4 additions and 2 deletions

View File

@@ -1 +1,3 @@
export let provider = null export let provider = null
export function setProvider(p) {provider = p}

View File

@@ -1,4 +1,4 @@
import {provider} from "@/blockchain/provider.js"; import {provider, setProvider} from "@/blockchain/provider.js";
import {BrowserProvider, ethers} from "ethers"; import {BrowserProvider, ethers} from "ethers";
import {useStore} from "@/store/store"; import {useStore} from "@/store/store";
import {errorSuggestsMissingVault, SingletonCoroutine} from "@/misc.js"; import {errorSuggestsMissingVault, SingletonCoroutine} from "@/misc.js";
@@ -65,7 +65,7 @@ export function onChainChanged(chainId) {
console.log('app chain changed', chainId) console.log('app chain changed', chainId)
store.chainId = chainId store.chainId = chainId
store.account = null store.account = null
provider = new BrowserProvider(window.ethereum, chainId) setProvider(new BrowserProvider(window.ethereum, chainId))
updateAccounts(chainId, provider) updateAccounts(chainId, provider)
} }
else { else {