Merchant: fix confirmations

pull/7/head
selsta 4 years ago
parent 3af99e91e4
commit 2102e4be0d
Signed by untrusted user: selsta
GPG Key ID: 2EA0A99A8B07AE5E

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