mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 20:40:27 +00:00
Merge pull request #3127
ff51dd0
History: fix amount handling for txex sent to the same account (xiphon)
This commit is contained in:
commit
c601313943
1 changed files with 6 additions and 7 deletions
|
@ -1505,13 +1505,12 @@ Rectangle {
|
||||||
var timestamp = new Date(date + " " + time).getTime() / 1000;
|
var timestamp = new Date(date + " " + time).getTime() / 1000;
|
||||||
var dateHuman = Utils.ago(timestamp);
|
var dateHuman = Utils.ago(timestamp);
|
||||||
|
|
||||||
var displayAmount = amount;
|
if (amount === 0) {
|
||||||
if(displayAmount === 0){
|
// transactions to the same account have amount === 0, while the 'destinations string'
|
||||||
// *sometimes* amount is 0, while the 'destinations string'
|
|
||||||
// has the correct amount, so we try to fetch it from that instead.
|
// has the correct amount, so we try to fetch it from that instead.
|
||||||
displayAmount = TxUtils.destinationsToAmount(destinations);
|
amount = Number(TxUtils.destinationsToAmount(destinations));
|
||||||
displayAmount = Number(displayAmount *1);
|
|
||||||
}
|
}
|
||||||
|
var displayAmount = Utils.removeTrailingZeros(amount.toFixed(12)) + " XMR";
|
||||||
|
|
||||||
var tx_note = currentWallet.getUserNote(hash);
|
var tx_note = currentWallet.getUserNote(hash);
|
||||||
var address = "";
|
var address = "";
|
||||||
|
@ -1527,8 +1526,8 @@ Rectangle {
|
||||||
root.txModelData.push({
|
root.txModelData.push({
|
||||||
"i": i,
|
"i": i,
|
||||||
"isout": isout,
|
"isout": isout,
|
||||||
"amount": Number(amount),
|
"amount": amount,
|
||||||
"displayAmount": Utils.removeTrailingZeros(displayAmount.toFixed(12)) + " XMR",
|
"displayAmount": displayAmount,
|
||||||
"hash": hash,
|
"hash": hash,
|
||||||
"paymentId": paymentId,
|
"paymentId": paymentId,
|
||||||
"address": address,
|
"address": address,
|
||||||
|
|
Loading…
Reference in a new issue