vault fixes; order total fill reactivity fix; provider fix

This commit is contained in:
Tim
2024-04-11 15:07:02 -04:00
parent 6d9cd4c748
commit b0daa446b3
8 changed files with 60 additions and 42 deletions

View File

@@ -63,14 +63,15 @@ export const useStore = defineStore('app', ()=> {
const chainId = computed({
get() {return _chainId.value},
set(v) {
console.log('setting chainid',_chainId.value, v)
if (_chainId.value!==v) {
console.log('setting app chainid',_chainId.value, v)
const changed = _chainId.value!==v;
if (changed) {
console.log('do set')
_chainId.value = v
account.value = null
}
if (_chainId.value!==v || _provider.value === null) {
console.log('update provider')
if (changed || _provider.value === null) {
console.log('invalidating provider')
_provider.value = UNKNOWN_PROVIDER
}
}