mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +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: []
|
||||
|
||||
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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue