Add fall back mode to Ledger signing
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -50,10 +50,27 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
PSBT signedPsbt = null;
+ try
+ {
try
{
signedPsbt = await client.SignTxAsync(Wallet.KeyManager.MasterFingerprint.Value, result.Psbt, cts.Token);
}
+ catch (PSBTException ex) when (ex.Message.Contains("NullFail"))
+ {
+ NotificationHelpers.Warning("Fall back to Unverified Inputs Mode, trying to sign again.");
+
+ // Ledger Nano S hackfix https://github.com/MetacoSA/NBitcoin/pull/888
+
+ var noinputtx = result.Psbt.Clone();
+ foreach (var input in noinputtx.Inputs)
+ {
+ input.NonWitnessUtxo = null;
+ }
+
+ signedPsbt = await client.SignTxAsync(Wallet.KeyManager.MasterFingerprint.Value, noinputtx, cts.Token);
+ }
+ }
catch (HwiException)
{
await PinPadViewModel.UnlockAsync();

Add fall back mode to Ledger signing