aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-05-01 15:03:04 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-05-01 15:03:04 -0500
commit11617d2f76b55811edd0263800af99399b844286 (patch)
treeb502faf2908bc15125c64aa48f02a09df844a057 /pages
parent765e93cfd0c60868a710cc81d9e5a1e01d9effe6 (diff)
parent2102e4be0d0888e66b50ed71150fc9d4b1cb1566 (diff)
downloadmonzero-gui-11617d2f76b55811edd0263800af99399b844286.tar.gz
monzero-gui-11617d2f76b55811edd0263800af99399b844286.tar.xz
monzero-gui-11617d2f76b55811edd0263800af99399b844286.zip
Merge pull request #2846
2102e4b Merchant: fix confirmations (selsta) b245d0a MerchantTrackingList: point out unconfirmed amount (selsta) 07ecca5 Merchant: fix payment URL (selsta) 3af99e9 Merchant: remove unused variables (selsta)
Diffstat (limited to 'pages')
-rw-r--r--pages/merchant/Merchant.qml19
-rw-r--r--pages/merchant/MerchantTrackingList.qml2
2 files changed, 7 insertions, 14 deletions
diff --git a/pages/merchant/Merchant.qml b/pages/merchant/Merchant.qml
index 545ba641..8602945a 100644
--- a/pages/merchant/Merchant.qml
+++ b/pages/merchant/Merchant.qml
@@ -33,6 +33,9 @@ Item {
property var hiddenAmounts: []
function onPageCompleted() {
+ if (appWindow.currentWallet) {
+ appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
+ }
// prepare tracking
trackingCheckbox.checked = root.enableTracking
root.update();
@@ -589,9 +592,7 @@ Item {
var model = appWindow.currentWallet.historyModel
var count = model.rowCount()
- var totalAmount = 0
var nTransactions = 0
- var blockchainHeight = null
var txs = []
// Currently selected subaddress as per Receive page
@@ -607,8 +608,6 @@ Item {
var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole);
if (!isout && subaddrAccount == appWindow.currentWallet.currentSubaddressAccount && subaddrIndex == current_subaddress_table_index) {
- var amount = model.data(idx, TransactionHistoryModel.TransactionAtomicAmountRole);
- totalAmount = walletManager.addi(totalAmount, amount)
nTransactions += 1
var txid = model.data(idx, TransactionHistoryModel.TransactionHashRole);
@@ -616,21 +615,17 @@ 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({
"amount": displayAmount,
"confirmations": confirmations,
- "blockheight": blockHeight,
"in_txpool": in_txpool,
"txid": txid,
"time_epoch": timeEpoch,
@@ -650,9 +645,7 @@ Item {
txs.forEach(function(tx){
trackingModel.append({
"amount": tx.amount,
- "blockheight": tx.blockheight,
"confirmations": tx.confirmations,
- "blockheight": tx.blockHeight,
"in_txpool": tx.in_txpool,
"txid": tx.txid,
"time_epoch": tx.time_epoch,
diff --git a/pages/merchant/MerchantTrackingList.qml b/pages/merchant/MerchantTrackingList.qml
index 4c80b641..360cc644 100644
--- a/pages/merchant/MerchantTrackingList.qml
+++ b/pages/merchant/MerchantTrackingList.qml
@@ -125,7 +125,7 @@ ListView {
font.pixelSize: 14
font.bold: true
color: hide_amount ? "#707070" : "#009F1E"
- text: hide_amount ? '-' : '+' + amount
+ text: hide_amount ? '-' : '+' + amount + (in_txpool ? ' (%1)'.arg(qsTr('unconfirmed')) : '')
selectionColor: MoneroComponents.Style.textSelectionColor
selectByMouse: true
readOnly: true