From b653ba0a1ca0d6d02ce0544333d9ea751ee30e24 Mon Sep 17 00:00:00 2001 From: xiphon Date: Tue, 16 Oct 2018 18:32:38 +0000 Subject: [PATCH] tracking: query blockchain height only once during update --- pages/Receive.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/Receive.qml b/pages/Receive.qml index 2c55ef17..3a249bc7 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -80,7 +80,7 @@ Rectangle { var count = model.rowCount() var totalAmount = 0 var nTransactions = 0 - var blockchainHeight = 0 + var blockchainHeight = null var txs = [] for (var i = 0; i < count; ++i) { @@ -103,8 +103,8 @@ Rectangle { if (blockHeight == 0) { in_txpool = true; } else { - if (blockchainHeight == 0) - blockchainHeight = walletManager.blockchainHeight() + if (blockchainHeight == null) + blockchainHeight = appWindow.currentWallet.blockChainHeight() confirmations = blockchainHeight - blockHeight - 1 displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole); }