add transaction result destination amount calculation.
MODIFY
WalletWasabi.Fluent/Helpers/CurrencyUtils.cs
WalletWasabi.Fluent/Helpers/CurrencyUtils.cs
@@ -15,6 +15,22 @@ namespace WalletWasabi.Fluent.Helpers
NumberDecimalSeparator = "."
};
+ public static Money CalculateDestinationAmount(this BuildTransactionResult result)
+ {
+ var isNormalPayment = result.OuterWalletOutputs.Any();
+
+ if (isNormalPayment)
+ {
+ return result.OuterWalletOutputs.Sum(x => x.Amount);
+ }
+ else
+ {
+ return result.InnerWalletOutputs
+ .Where(x => !x.HdPubKey.IsInternal)
+ .Select(x => x.Amount)
+ .Sum();
+ }
+ }
public static string FormattedBtc(this Money amount)
{

add transaction result destination amount calculation.