Merchant: fix confirmations

This commit is contained in:
selsta 2020-04-22 22:05:20 +02:00
parent 3af99e91e4
commit 2102e4be0d
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -593,7 +593,6 @@ Item {
var model = appWindow.currentWallet.historyModel var model = appWindow.currentWallet.historyModel
var count = model.rowCount() var count = model.rowCount()
var nTransactions = 0 var nTransactions = 0
var blockchainHeight = null
var txs = [] var txs = []
// Currently selected subaddress as per Receive page // Currently selected subaddress as per Receive page
@ -616,15 +615,12 @@ Item {
var in_txpool = false; var in_txpool = false;
var confirmations = 0; var confirmations = 0;
var displayAmount = 0; var displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
if (blockHeight == 0) { if (blockHeight === undefined) {
in_txpool = true; in_txpool = true;
} else { } else {
if (blockchainHeight == null) confirmations = model.data(idx, TransactionHistoryModel.TransactionConfirmationsRole);
blockchainHeight = walletManager.blockchainHeight()
confirmations = blockchainHeight - blockHeight - 1
displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
} }
txs.push({ txs.push({