diff --git a/src/components/CheckoutCardNimiq.vue b/src/components/CheckoutCardNimiq.vue index 84cf4b69..34273278 100644 --- a/src/components/CheckoutCardNimiq.vue +++ b/src/components/CheckoutCardNimiq.vue @@ -275,7 +275,7 @@ class CheckoutCardNimiq return balances; } - private onHeadChange(head: Nimiq.BlockHeader | {height: number}) { + private onHeadChange(head: {height: number}) { this.height = head.height; } @@ -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) {