mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
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)
This commit is contained in:
commit
11617d2f76
2 changed files with 7 additions and 14 deletions
|
@ -33,6 +33,9 @@ Item {
|
||||||
property var hiddenAmounts: []
|
property var hiddenAmounts: []
|
||||||
|
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
|
if (appWindow.currentWallet) {
|
||||||
|
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
|
||||||
|
}
|
||||||
// prepare tracking
|
// prepare tracking
|
||||||
trackingCheckbox.checked = root.enableTracking
|
trackingCheckbox.checked = root.enableTracking
|
||||||
root.update();
|
root.update();
|
||||||
|
@ -589,9 +592,7 @@ Item {
|
||||||
|
|
||||||
var model = appWindow.currentWallet.historyModel
|
var model = appWindow.currentWallet.historyModel
|
||||||
var count = model.rowCount()
|
var count = model.rowCount()
|
||||||
var totalAmount = 0
|
|
||||||
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
|
||||||
|
@ -607,8 +608,6 @@ Item {
|
||||||
var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole);
|
var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole);
|
||||||
|
|
||||||
if (!isout && subaddrAccount == appWindow.currentWallet.currentSubaddressAccount && subaddrIndex == current_subaddress_table_index) {
|
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
|
nTransactions += 1
|
||||||
|
|
||||||
var txid = model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
var txid = model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
||||||
|
@ -616,21 +615,17 @@ 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({
|
||||||
"amount": displayAmount,
|
"amount": displayAmount,
|
||||||
"confirmations": confirmations,
|
"confirmations": confirmations,
|
||||||
"blockheight": blockHeight,
|
|
||||||
"in_txpool": in_txpool,
|
"in_txpool": in_txpool,
|
||||||
"txid": txid,
|
"txid": txid,
|
||||||
"time_epoch": timeEpoch,
|
"time_epoch": timeEpoch,
|
||||||
|
@ -650,9 +645,7 @@ Item {
|
||||||
txs.forEach(function(tx){
|
txs.forEach(function(tx){
|
||||||
trackingModel.append({
|
trackingModel.append({
|
||||||
"amount": tx.amount,
|
"amount": tx.amount,
|
||||||
"blockheight": tx.blockheight,
|
|
||||||
"confirmations": tx.confirmations,
|
"confirmations": tx.confirmations,
|
||||||
"blockheight": tx.blockHeight,
|
|
||||||
"in_txpool": tx.in_txpool,
|
"in_txpool": tx.in_txpool,
|
||||||
"txid": tx.txid,
|
"txid": tx.txid,
|
||||||
"time_epoch": tx.time_epoch,
|
"time_epoch": tx.time_epoch,
|
||||||
|
|
|
@ -125,7 +125,7 @@ ListView {
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: hide_amount ? "#707070" : "#009F1E"
|
color: hide_amount ? "#707070" : "#009F1E"
|
||||||
text: hide_amount ? '-' : '+' + amount
|
text: hide_amount ? '-' : '+' + amount + (in_txpool ? ' (%1)'.arg(qsTr('unconfirmed')) : '')
|
||||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
Loading…
Reference in a new issue