Skip to content

Commit

Permalink
fix: Ensure this.sdk.tokens.data.currentInstance is updated during TO…
Browse files Browse the repository at this point in the history
…KEN_UPDATED event
  • Loading branch information
micwallace committed Nov 25, 2024
1 parent 649f594 commit cb5422d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions javascript/card-sdk/src/messaging/PostMessageAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export class PostMessageAdapter implements IEngineAdapter {

switch (event.data?.method) {
case ViewEvent.TOKENS_UPDATED:
params.oldTokens = this.sdk.tokens.data.currentInstance;
this.sdk.tokens.data.currentInstance = params.updatedTokens.currentInstance;
this.sdk.tokens.dataChanged(params.oldTokens, params.updatedTokens, params.cardId);
//this.sdk.emitEvent("DATA_CHANGED", params);
break;
Expand Down
2 changes: 1 addition & 1 deletion javascript/engine-js/src/view/sdk/v1.txt

Large diffs are not rendered by default.

0 comments on commit cb5422d

Please # to comment.