Skip to content

Commit

Permalink
Re-add missing head-changed listener in NIM Checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Nov 13, 2023
1 parent 94af73c commit ac5a571
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/CheckoutCardNimiq.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class CheckoutCardNimiq
return balances;
}
private onHeadChange(head: Nimiq.BlockHeader | {height: number}) {
private onHeadChange(head: {height: number}) {
this.height = head.height;
}
Expand All @@ -292,6 +292,10 @@ class CheckoutCardNimiq
this.statusScreenStatus = this.$t('Requesting balances...') as string;
}
});
client.addHeadChangedListener(async (hash) => {
const block = await client.getBlock(hash);
this.onHeadChange(block);
});
}
private async setAccountOrContract(walletId: string, address: string, isFromRequest = false) {
Expand Down

0 comments on commit ac5a571

Please sign in to comment.