mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-11 15:17:25 -04:00
Merge pull request #147
6914656 Fix sum of selected transactions being slighty off (moneromooo.monero)
This commit is contained in:
@@ -53,13 +53,19 @@ Rectangle {
|
||||
for (var i = 0; i < count; ++i) {
|
||||
var idx = model.index(i, 0)
|
||||
var isout = model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
|
||||
var amount = model.data(idx, TransactionHistoryModel.TransactionAmountRole);
|
||||
var amount = model.data(idx, TransactionHistoryModel.TransactionAtomicAmountRole);
|
||||
if (isout)
|
||||
total -= amount
|
||||
total = walletManager.subi(total, amount)
|
||||
else
|
||||
total += amount
|
||||
total = walletManager.addi(total, amount)
|
||||
}
|
||||
return count + qsTr(" selected: ") + total;
|
||||
|
||||
var sign = ""
|
||||
if (total < 0) {
|
||||
total = -total
|
||||
sign = "-"
|
||||
}
|
||||
return count + qsTr(" selected: ") + sign + walletManager.displayAmount(total);
|
||||
}
|
||||
|
||||
onModelChanged: {
|
||||
|
||||
Reference in New Issue
Block a user