Try parse psbt output (probably it'll be it.)
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -257,12 +257,15 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
MainWindowViewModel.Instance.StatusBar.SetStatusAndDoUpdateActions("Signing transaction...");
+ SmartTransaction signedTransaction = result.Transaction;
+
if (IsHardwareWallet && !result.Signed) // If hardware but still has a privkey then it's password, then meh.
{
try
{
IsHardwareBusy = true;
- await HwiProcessManager.SignTxAsync(KeyManager.HardwareWalletInfo, result.Psbt);
+ var signedPsbt = await HwiProcessManager.SignTxAsync(KeyManager.HardwareWalletInfo, result.Psbt);
+ signedTransaction = new SmartTransaction(signedPsbt.ExtractTX(), result.Transaction.Height);
}
finally
{

MODIFY
WalletWasabi/Hwi/HwiProcessManager.cs
WalletWasabi/Hwi/HwiProcessManager.cs
@@ -32,17 +32,16 @@ namespace WalletWasabi.Hwi
Network = Network.Main;
}
- public static async Task<string> SignTxAsync(HardwareWalletInfo hardwareWalletInfo, PSBT psbt)
+ public static async Task<PSBT> SignTxAsync(HardwareWalletInfo hardwareWalletInfo, PSBT psbt)
{
var psbtString = psbt.ToString();
var networkString = Network == Network.Main ? "" : "--testnet ";
JToken jtok = await SendCommandAsync($"{networkString}--device-type \"{hardwareWalletInfo.Type.ToString().ToLowerInvariant()}\" --device-path \"{hardwareWalletInfo.Path}\" signtx {psbtString}");
JObject json = jtok as JObject;
- string xpub = json.Value<string>("xpub");
-
- ExtPubKey extpub = ExtPubKey.Parse(xpub);
+ var signedPsbtString = json.Value<string>("psbt");
+ var signedPsbt = PSBT.Parse(signedPsbtString);
- return "";
+ return signedPsbt;
}
/// <summary>

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -1285,6 +1285,8 @@ namespace WalletWasabi.Services
}
}
+ psbt.AddCoins(spentCoins.Select(x => x.GetCoin()).ToArray());
+
Logger.LogInfo<WalletService>($"Transaction is successfully built: {tx.GetHash()}.");
return new BuildTransactionResult(new SmartTransaction(tx, Height.Unknown), psbt, spendsUnconfirmed, sign, fee, feePc, outerWalletOutputs, innerWalletOutputs, spentCoins);

Try parse psbt output (probably it'll be it.)