New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VDG] [Fluent] Allow Coinjoins to be expanded in the TreeDataGrid #7510
Merged
soosr
merged 22 commits into
zkSNACKs:master
from
wieslawsoltes:vdg/ExpandCoinjoinsTreeDataGrid
Apr 4, 2022
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b46e664
Add IsExpanded property
wieslawsoltes 35d9faa
Use HierarchicalTreeDataGridSource source
wieslawsoltes 9e8cb49
Add Children property
wieslawsoltes 13f699b
Set children selector for HierarchicalExpanderColumn
wieslawsoltes 32b82a9
Add required ctor params
wieslawsoltes 0c4f9de
Implement LoadChildren for CoinJoinsHistoryItemViewModel
wieslawsoltes 4f1bdf6
Update balance
wieslawsoltes cdc49cc
Add CoinJoinHistoryItemViewModel
wieslawsoltes 58f2d63
Merge remote-tracking branch 'upstream/master' into vdg/ExpandCoinjoi…
wieslawsoltes c8cae83
Update labels
wieslawsoltes f684e9f
Display children coinjon transaction when more then one is present
wieslawsoltes 102fa89
Merge branch 'master' into vdg/ExpandCoinjoinsTreeDataGrid
wieslawsoltes 9cc719f
Remove label text
wieslawsoltes 08e8238
Restore old code
wieslawsoltes dde3945
Adjust padding of expander cell for coinjoin transaction rows
wieslawsoltes 6982519
Set history table coinjoin transaction background color
wieslawsoltes 743cc71
Fix selection styles
wieslawsoltes 7f91f81
Merge branch 'master' into vdg/ExpandCoinjoinsTreeDataGrid
wieslawsoltes 6ab1a78
Merge branch 'master' into vdg/ExpandCoinjoinsTreeDataGrid
wieslawsoltes aeec035
Merge branch 'master' into vdg/ExpandCoinjoinsTreeDataGrid
wieslawsoltes 8630539
Merge branch 'master' into vdg/ExpandCoinjoinsTreeDataGrid
wieslawsoltes 559bae6
Remove old code after latest merge
wieslawsoltes File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...asabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinHistoryItemViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reactive; | ||
using NBitcoin; | ||
using ReactiveUI; | ||
using WalletWasabi.Blockchain.Transactions; | ||
using WalletWasabi.Fluent.Extensions; | ||
using WalletWasabi.Fluent.ViewModels.Navigation; | ||
|
||
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems; | ||
|
||
public class CoinJoinHistoryItemViewModel : HistoryItemViewModelBase | ||
{ | ||
public CoinJoinHistoryItemViewModel( | ||
int orderIndex, | ||
TransactionSummary transactionSummary, | ||
WalletViewModel walletViewModel, | ||
Money balance, | ||
IObservable<Unit> updateTrigger) | ||
: base(orderIndex, transactionSummary) | ||
{ | ||
Label = transactionSummary.Label.Take(1).FirstOrDefault(); | ||
FilteredLabel = transactionSummary.Label.Skip(1).ToList(); | ||
IsConfirmed = transactionSummary.IsConfirmed(); | ||
Date = transactionSummary.DateTime.ToLocalTime(); | ||
Balance = balance; | ||
IsCoinJoin = true; | ||
|
||
var amount = transactionSummary.Amount; | ||
if (amount < Money.Zero) | ||
{ | ||
OutgoingAmount = amount * -1; | ||
} | ||
else | ||
{ | ||
IncomingAmount = amount; | ||
} | ||
|
||
ShowDetailsCommand = ReactiveCommand.Create(() => | ||
RoutableViewModel.Navigate(NavigationTarget.DialogScreen).To( | ||
new TransactionDetailsViewModel(transactionSummary, walletViewModel.Wallet, updateTrigger))); | ||
|
||
DateString = $"{Date.ToLocalTime():MM/dd/yy HH:mm}"; | ||
} | ||
|
||
public bool IsCoinJoinTransaction => true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might not need this line if #7604 gets accepted.