mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Dont use displayAmount, use amount instead
This commit is contained in:
parent
011e301324
commit
b32b308332
1 changed files with 7 additions and 10 deletions
|
@ -165,18 +165,15 @@ ListView {
|
||||||
font.pixelSize: 18 * scaleRatio
|
font.pixelSize: 18 * scaleRatio
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: {
|
text: {
|
||||||
var amount = (displayAmount * 1); // * 1 removes trailing zeros
|
var _amount = amount;
|
||||||
|
if(_amount === 0){
|
||||||
// sometimes, displayAmount is 0 - no idea why.
|
// *sometimes* amount is 0, while the 'destinations string'
|
||||||
// in that case, we try to get the amount from
|
// has the correct amount, so we try to fetch it from that instead.
|
||||||
// the `destinations` string.
|
_amount = TxUtils.destinationsToAmount(destinations);
|
||||||
if(amount === 0){
|
_amount = (_amount *1);
|
||||||
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"
|
color: isOut ? "white" : "#2eb358"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue