diff --git a/WalletWasabi.Fluent/Models/Wallets/WalletTransactionsModel.cs b/WalletWasabi.Fluent/Models/Wallets/WalletTransactionsModel.cs index 4e7442e67bb..6b9e9522100 100644 --- a/WalletWasabi.Fluent/Models/Wallets/WalletTransactionsModel.cs +++ b/WalletWasabi.Fluent/Models/Wallets/WalletTransactionsModel.cs @@ -149,7 +149,7 @@ public async Task SendAsync(BuildTransactionResult transaction) private IEnumerable BuildSummary() { - var orderedRawHistoryList = _wallet.BuildHistorySummary(sortForUI: true); + var orderedRawHistoryList = _wallet.BuildHistorySummary(sortForUi: true); var transactionModels = _treeBuilder.Build(orderedRawHistoryList); return transactionModels; } diff --git a/WalletWasabi/Wallets/Wallet.cs b/WalletWasabi/Wallets/Wallet.cs index f54d5534056..2f8f8a0ba7a 100644 --- a/WalletWasabi/Wallets/Wallet.cs +++ b/WalletWasabi/Wallets/Wallet.cs @@ -119,7 +119,7 @@ private set public PaymentBatch BatchedPayments { get; } public int AnonScoreTarget => KeyManager.AnonScoreTarget; - public bool ConsolidationMode { get; set; } = false; + public bool ConsolidationMode { get; set; } public bool IsMixable => State == WalletState.Started // Only running wallets @@ -164,9 +164,9 @@ public IEnumerable GetTransactions() /// /// Get all wallet transactions along with corresponding amounts ordered by blockchain. /// - /// true to sort by "first seen", "height", and "block index", false to sort by "height", "block index", and "first seen". + /// true to sort by "first seen", "height", and "block index", false to sort by "height", "block index", and "first seen". /// Transaction amount specifies how it affected your final wallet balance (spend some bitcoin, received some bitcoin, or no change). - public List BuildHistorySummary(bool sortForUI = false) + public List BuildHistorySummary(bool sortForUi = false) { Dictionary mapByTxid = new(); @@ -196,7 +196,7 @@ public List BuildHistorySummary(bool sortForUI = false) } } - return sortForUI + return sortForUi ? mapByTxid.Values.OrderBy(x => x.FirstSeen).ThenBy(x => x.Height).ThenBy(x => x.BlockIndex).ToList() : mapByTxid.Values.OrderByBlockchain().ToList(); } @@ -433,11 +433,6 @@ private async void IndexDownloader_NewFiltersAsync(object? sender, IEnumerable x.Height <= bestTurboSyncHeight)); @@ -535,7 +528,7 @@ private async Task LoadDummyMempoolAsync() foreach (var tx in BitcoinStore.TransactionStore.MempoolStore.GetTransactions()) { uint256 hash = tx.GetHash(); - if (mempoolHashes.Contains(hash.ToString()[..compactness])) + if (mempoolHashes.Contains(hash.ToString()?[..compactness] ?? string.Empty)) { txsToProcess.Add(tx); Logger.LogInfo($"'{WalletName}': Transaction was successfully tested against the backend's mempool hashes: {hash}.");