From 4c51650e814066a9764eb5a2decdf5c4a521c9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Nieto?= Date: Sun, 26 May 2024 23:09:54 +0200 Subject: [PATCH] Remove TransactionStatus.SpeedUp --- .../Models/Wallets/TransactionStatus.cs | 5 ++-- .../Models/Wallets/TransactionTreeBuilder.cs | 25 +++---------------- .../Columns/IndicatorsColumnView.axaml | 5 ---- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/WalletWasabi.Fluent/Models/Wallets/TransactionStatus.cs b/WalletWasabi.Fluent/Models/Wallets/TransactionStatus.cs index be31015eda0..656c600a657 100644 --- a/WalletWasabi.Fluent/Models/Wallets/TransactionStatus.cs +++ b/WalletWasabi.Fluent/Models/Wallets/TransactionStatus.cs @@ -1,9 +1,8 @@ -namespace WalletWasabi.Fluent.Models.Wallets; +namespace WalletWasabi.Fluent.Models.Wallets; public enum TransactionStatus { Unknown, Confirmed, - Pending, - SpeedUp, + Pending } diff --git a/WalletWasabi.Fluent/Models/Wallets/TransactionTreeBuilder.cs b/WalletWasabi.Fluent/Models/Wallets/TransactionTreeBuilder.cs index d5b11432df7..c0705f6b5e5 100644 --- a/WalletWasabi.Fluent/Models/Wallets/TransactionTreeBuilder.cs +++ b/WalletWasabi.Fluent/Models/Wallets/TransactionTreeBuilder.cs @@ -187,7 +187,7 @@ private TransactionModel CreateSpeedUpGroup(TransactionSummary transactionSummar Status = isConfirmed ? TransactionStatus.Confirmed - : TransactionStatus.SpeedUp, + : TransactionStatus.Pending, }; var dates = children.Select(tx => tx.Date).ToImmutableArray(); @@ -310,26 +310,9 @@ private TransactionType GetItemType(TransactionSummary transactionSummary) return TransactionType.Unknown; } - private TransactionStatus GetItemStatus(TransactionSummary transactionSummary) + private static TransactionStatus GetItemStatus(TransactionSummary transactionSummary) { - var isConfirmed = transactionSummary.IsConfirmed(); - - if (isConfirmed) - { - return TransactionStatus.Confirmed; - } - - if (!isConfirmed && (transactionSummary.IsSpeedup || transactionSummary.IsCPFPd)) - { - return TransactionStatus.SpeedUp; - } - - if (!isConfirmed && !transactionSummary.IsSpeedup) - { - return TransactionStatus.Pending; - } - - return TransactionStatus.Unknown; + return transactionSummary.IsConfirmed() ? TransactionStatus.Confirmed : TransactionStatus.Pending; } private string GetConfirmationToolTip(TransactionStatus status, int confirmations, SmartTransaction smartTransaction) @@ -345,8 +328,6 @@ private string GetConfirmationToolTip(TransactionStatus status, int confirmation return (status, friendlyString != "") switch { - (TransactionStatus.SpeedUp, true) => $"Pending (accelerated, confirming in ≈ {friendlyString})", - (TransactionStatus.SpeedUp, false) => "Pending (accelerated)", (TransactionStatus.Pending, true) => $"Pending (confirming in ≈ {friendlyString})", (TransactionStatus.Pending, false) => "Pending", _ => "Unknown" diff --git a/WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml b/WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml index bb1c47aead9..16a92f9c9a3 100644 --- a/WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml +++ b/WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml @@ -14,7 +14,6 @@ @@ -26,10 +25,6 @@ -