Skip to content

Commit

Permalink
load balances on removal
Browse files Browse the repository at this point in the history
  • Loading branch information
attente committed Nov 5, 2024
1 parent d62e32b commit 4a3c53d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/CollectibleStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,9 @@ export class CollectibleStore {
c.tokenId !== collectibleInfo.collectibleInfoParams.tokenId
)
this.local.userCollectibles.set(filtered)

this.isFetchingCollectibleInfo.set(true)
this.loadBalances()
this.isFetchingCollectibleInfo.set(false)
}
}
8 changes: 8 additions & 0 deletions src/stores/TokenStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ export class TokenStore {
.filter(b => !(b.chainId === token.chainId && b.contractAddress === token.address))

this.balances.set(filteredBalances)

const accountAddress = this.store.get(AuthStore).accountAddress.get()

if (accountAddress) {
this.isFetchingBalances.set(true)
await this.loadUserAddedTokenBalance(accountAddress, token)
this.isFetchingBalances.set(false)
}
}

async getTokenInfo(chainId: number, address: string): Promise<UserAddedTokenInitialInfo> {
Expand Down

0 comments on commit 4a3c53d

Please sign in to comment.