@visualizevalue/mint-app-base 0.1.110 → 0.1.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,13 @@ const breadcrumbs = computed(() => {
39
39
 
40
40
  return all
41
41
  })
42
+
43
+ const store = useOnchainStore()
44
+ watchEffect(() => {
45
+ if (! isConnected.value) {
46
+ store.clearAllTokenBalances()
47
+ }
48
+ })
42
49
  </script>
43
50
 
44
51
  <style scoped>
@@ -387,6 +387,14 @@ export const useOnchainStore = () => {
387
387
  }
388
388
  },
389
389
 
390
+ clearTokenBalance (token: Token) {
391
+ this.tokenBalances[token.collection] = {}
392
+ },
393
+
394
+ clearAllTokenBalances () {
395
+ this.tokenBalances = {}
396
+ },
397
+
390
398
  async fetchTokenBalance (token: Token, address: `0x${string}`) {
391
399
  const client = getPublicClient($wagmi, { chainId })
392
400
  const mintContract = getContract({
@@ -396,7 +404,7 @@ export const useOnchainStore = () => {
396
404
  })
397
405
 
398
406
  if (! this.tokenBalances[token.collection]) {
399
- this.tokenBalances[token.collection] = {}
407
+ this.clearTokenBalance(token)
400
408
  }
401
409
 
402
410
  this.tokenBalances[token.collection][`${token.tokenId}`] =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.110",
3
+ "version": "0.1.112",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {