1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-28 09:31:37 +01:00

History: fix failed and pending tx statuses

This commit is contained in:
xiphon 2020-10-15 10:22:29 +00:00
parent cb1f3ad0ce
commit 79ee893499

View File

@ -764,12 +764,18 @@ Rectangle {
font.pixelSize: 15
text: {
if (isout) {
if (isFailed) {
return qsTr("Failed") + translationManager.emptyString;
}
if (isPending) {
return qsTr("Waiting confirmation...") + translationManager.emptyString;
}
if (address) {
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
}
if (amount != 0) {
return (blockheight ? qsTr("Unknown recipient") : qsTr("Waiting confirmation...")) + translationManager.emptyString;
return qsTr("Unknown recipient") + translationManager.emptyString;
} else {
return qsTr("My wallet") + translationManager.emptyString;
}
@ -1489,6 +1495,8 @@ Rectangle {
for (var i = 0; i < count; ++i) {
var idx = _model.index(i, 0);
var isPending = model.data(idx, TransactionHistoryModel.TransactionPendingRole);
var isFailed = model.data(idx, TransactionHistoryModel.TransactionFailedRole);
var isout = _model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
var amount = _model.data(idx, TransactionHistoryModel.TransactionAmountRole);
var hash = _model.data(idx, TransactionHistoryModel.TransactionHashRole);
@ -1525,6 +1533,8 @@ Rectangle {
root.txModelData.push({
"i": i,
"isPending": isPending,
"isFailed": isFailed,
"isout": isout,
"amount": amount,
"displayAmount": displayAmount,