aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-03-29 21:30:09 +0200
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:05 +0100
commitb32b308332acf5521c935b056beecdc26180e214 (patch)
treeb0add9440bd3bbccbce561305de93ffadb9855f6
parent011e30132417a92b9b0733435a9d92cb48292c3a (diff)
downloadmonzero-gui-b32b308332acf5521c935b056beecdc26180e214.tar.gz
monzero-gui-b32b308332acf5521c935b056beecdc26180e214.tar.xz
monzero-gui-b32b308332acf5521c935b056beecdc26180e214.zip
Dont use displayAmount, use amount instead
-rw-r--r--components/HistoryTable.qml17
1 files changed, 7 insertions, 10 deletions
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml
index 2fce34f0..87c9be76 100644
--- a/components/HistoryTable.qml
+++ b/components/HistoryTable.qml
@@ -165,18 +165,15 @@ ListView {
font.pixelSize: 18 * scaleRatio
font.bold: true
text: {
- var amount = (displayAmount * 1); // * 1 removes trailing zeros
-
- // sometimes, displayAmount is 0 - no idea why.
- // in that case, we try to get the amount from
- // the `destinations` string.
- if(amount === 0){
- amount = TxUtils.destinationsToAmount(destinations);
- amount = (amount *1);
+ var _amount = amount;
+ if(_amount === 0){
+ // *sometimes* amount is 0, while the 'destinations string'
+ // has the correct amount, so we try to fetch it from that instead.
+ _amount = TxUtils.destinationsToAmount(destinations);
+ _amount = (_amount *1);
}
- // sometimes this destinations string also shows 0 at which point we run out of options.
- return amount + " XMR";
+ return _amount + " XMR";
}
color: isOut ? "white" : "#2eb358"
}