Skip to content

Commit

Permalink
fix: attribute invalidation on wallet change
Browse files Browse the repository at this point in the history
  • Loading branch information
micwallace committed Dec 1, 2024
1 parent 93b73d7 commit b977d58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class NewViewer {
if (!this.myTokenScripts[id].tokenScript)
continue;

this.myTokenScripts[id].tokenScript.getAttributes().invalidate(["walletAddress"]);
this.myTokenScripts[id].tokenScript.getAttributes().invalidate(["walletAddress", "ownerAddress"]);
this.myTokenScripts[id].tokenScript.getCards().getAllCards().forEach((card) => {
card.getAttributes().invalidate(["walletAddress", "ownerAddress"]);
})

this.myTokenScripts[id].tokenScript.getTokenMetadata(true);
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export class ViewerPopover {
this.tokenScript = tokenScript;

this.tokenScript.on("TOKENS_UPDATED", async (data) => {
this.tokenScript.getAttributes().invalidate(["walletAddress"])
await this.loadOnboardingCards();
}, "onboarding");

Expand Down

0 comments on commit b977d58

Please sign in to comment.