ToS; persistent pref store; package upgrade
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {BrowserProvider, ethers} from "ethers";
|
||||
import {useStore} from "@/store/store";
|
||||
import {socket} from "@/socket.js";
|
||||
import {SingletonCoroutine, uuid} from "@/misc.js";
|
||||
import {SingletonCoroutine} from "@/misc.js";
|
||||
import {newContract, vaultAddress, vaultContract} from "@/blockchain/contract.js";
|
||||
import {defineStore} from "pinia";
|
||||
import {ref} from "vue";
|
||||
@@ -418,18 +418,18 @@ function doSendTransaction(sender, signer, errHandler) {
|
||||
export async function detectUpgrade() {
|
||||
if (!provider) {
|
||||
console.log('no provider!')
|
||||
return 0
|
||||
return null
|
||||
}
|
||||
const s = useStore()
|
||||
if (!s.vault) {
|
||||
console.log('no vault logged in')
|
||||
return 0
|
||||
return null
|
||||
}
|
||||
|
||||
const info = version.chainInfo[s.chainId]
|
||||
if (!info) {
|
||||
console.log(`couldn't get chainInfo for ${s.chainId}`)
|
||||
return 0
|
||||
return null
|
||||
}
|
||||
try {
|
||||
console.log('factory', info.factory)
|
||||
@@ -451,7 +451,7 @@ export async function detectUpgrade() {
|
||||
catch (e) {
|
||||
console.log('ignorable error while querying for an upgrade', e)
|
||||
}
|
||||
return 0
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user