From ac5a5713455299da8a8e9620370d9d023b401ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Mon, 13 Nov 2023 08:40:27 -0600 Subject: [PATCH] Re-add missing head-changed listener in NIM Checkout --- src/components/CheckoutCardNimiq.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) {