add copy button for txid
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
@@ -3,6 +3,8 @@ using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
+using System.Windows.Input;
+using Avalonia;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Analysis.Clustering;
@@ -34,10 +36,23 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
_wallet = wallet;
NextCommand = ReactiveCommand.Create(OnNext);
+ CopyTransactionIdCommand = ReactiveCommand.CreateFromTask(OnCopyTransactionId);
UpdateValues(transactionSummary);
}
+ public ICommand CopyTransactionIdCommand { get; set; }
+
+ private async Task OnCopyTransactionId()
+ {
+ if (TransactionId is null)
+ {
+ return;
+ }
+
+ await Application.Current.Clipboard.SetTextAsync(TransactionId.ToString());
+ }
+
private void UpdateValues(TransactionSummary transactionSummary)
{
Date = transactionSummary.DateTime.ToLocalTime();

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
<!-- Transaction ID -->
<c:PreviewItem Icon="{StaticResource transaction_id}"
- Text="Transaction ID"
- Content="{Binding TransactionId}" />
+ Text="Transaction ID">
+ <DockPanel HorizontalAlignment="Left">
+ <c:AnimatedButton Margin="5 0 0 0"
+ Command="{Binding CopyTransactionIdCommand}"
+ ToolTip.Tip="Copy"
+ NormalIcon="{StaticResource copy_regular}"
+ ClickIcon="{StaticResource copy_confirmed}"
+ InitialOpacity="0.6"
+ DockPanel.Dock="Right"/>
+ <TextBlock Text="{Binding TransactionId}"/>
+ </DockPanel>
+ </c:PreviewItem>
<Separator />

add copy button for txid