kodadot / nft-gallery

Generative Art Marketplace
https://kodadot.xyz
MIT License
613 stars 351 forks source link

Make Balance in Teleport Page reactive #6227

Open daiagi opened 1 year ago

daiagi commented 1 year ago

after teleporting asset from one chain to another, the balance on the page does not change in order to trigger change, it is currently required to refresh / open the wallet modal

image

related with

roiLeo commented 1 year ago

IMO chainBalances shoul refer to cumputed value, you can try something like this:

const chainBalances = {
  [Chain.KUSAMA]: computed(() => identityStore.multiBalances.chains.kusama?.ksm?.balance),
  [Chain.BASILISK]: computed(() =>
    identityStore.multiBalances.chains.basilisk?.ksm?.balance),
  [Chain.STATEMINE]: computed(() =>
    identityStore.multiBalances.chains.statemine?.ksm?.balance),
}
daiagi commented 1 year ago

Hi @roiLeo Thank you for the tip it didn't work however :disappointed: