Skip to content

Commit

Permalink
Show fee rate at preview transaction when sending (WalletWasabi#13387)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahiheb authored Sep 17, 2024
1 parent 9c9dacb commit f178b2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using NBitcoin;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionBuilding;
using WalletWasabi.Fluent.Extensions;
Expand All @@ -20,6 +21,7 @@ public partial class TransactionSummaryViewModel : ViewModelBase
[AutoNotify] private LabelsArray _recipient = LabelsArray.Empty;
[AutoNotify] private Amount? _fee;
[AutoNotify] private Amount? _amount;
[AutoNotify] private FeeRate? _feeRate;
[AutoNotify] private double? _amountDiff;
[AutoNotify] private double? _feeDiff;

Expand Down Expand Up @@ -53,6 +55,7 @@ public void UpdateTransaction(BuildTransactionResult transactionResult, Transact

Amount = UiContext.AmountProvider.Create(destinationAmount);
Fee = UiContext.AmountProvider.Create(_transaction.Fee);
FeeRate = info.FeeRate;

Recipient = info.Recipient;
IsCustomFeeUsed = info.IsCustomFeeUsed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@
</MultiBinding>
</Classes.Dimmed>
</PreviewItem>

<!-- Fee Rate-->
<PreviewItem Icon="{StaticResource paper_cash_regular}"
Label="Fee Rate"
CopyableContent="{Binding FeeRate.SatoshiPerByte}">
<PrivacyContentControl>
<TextBlock Text="{Binding FeeRate.SatoshiPerByte, StringFormat='{}{0:F1} sat/vByte'}" />
</PrivacyContentControl>
</PreviewItem>
</StackPanel>
</DockPanel>
</StackPanel>
Expand Down

0 comments on commit f178b2d

Please sign in to comment.