Correct notinitialized enum
MODIFY
WalletWasabi.Tests/HwiTests/DeviceConnectedTests/Katas.cs
WalletWasabi.Tests/HwiTests/DeviceConnectedTests/Katas.cs
@@ -37,6 +37,7 @@ namespace WalletWasabi.Tests.HwiTests.DeviceConnectedTests
// Wipe request: confirm.
// Setup request: refuse.
// Setup request: confirm and setup.
+ // Wipe request: confirm.
//
// --- USER INTERACTIONS ---
@@ -63,7 +64,7 @@ namespace WalletWasabi.Tests.HwiTests.DeviceConnectedTests
Assert.False(entry.NeedsPinSent);
Assert.NotNull(entry.Error);
Assert.NotEmpty(entry.Error);
- Assert.Equal(HwiErrorCode.NotInitialized, entry.Code);
+ Assert.Equal(HwiErrorCode.DeviceNotInitialized, entry.Code);
Assert.Null(entry.Fingerprint);
// User should confirm the device action here.
@@ -74,6 +75,16 @@ namespace WalletWasabi.Tests.HwiTests.DeviceConnectedTests
// User should confirm the device action and setup a new device here.
await client.SetupAsync(deviceType, devicePath, cts.Token);
+
+ // User should confirm the device action here.
+ await client.WipeAsync(deviceType, devicePath, cts.Token);
+
+ // ToDo: Restore
+ // ToDo: Backup
+ // ToDo: getxpub
+ // ToDo: displayaddress
+ // ToDo: signmessage
+ // ToDo: signtx
}
}
}

MODIFY
WalletWasabi.Tests/HwiTests/NoDeviceConnectedTests/MockedDeviceTests.cs
WalletWasabi.Tests/HwiTests/NoDeviceConnectedTests/MockedDeviceTests.cs
@@ -39,7 +39,7 @@ namespace WalletWasabi.Tests.HwiTests.NoDeviceConnectedTests
Assert.False(entry.NeedsPinSent);
Assert.NotNull(entry.Error);
Assert.NotEmpty(entry.Error);
- Assert.Equal(HwiErrorCode.NotInitialized, entry.Code);
+ Assert.Equal(HwiErrorCode.DeviceNotInitialized, entry.Code);
Assert.Null(entry.Fingerprint);
var deviceType = entry.Type.Value;

MODIFY
WalletWasabi/Hwi2/Exceptions/HwiErrorCode.cs
WalletWasabi/Hwi2/Exceptions/HwiErrorCode.cs
@@ -22,6 +22,6 @@ namespace WalletWasabi.Hwi2.Exceptions
ActionCanceled = -14,
DeviceBusy = -15,
NeedToBeRoot = -16,
- NotInitialized = -99
+ DeviceNotInitialized = -18
}
}

MODIFY
WalletWasabi/Hwi2/Parsers/HwiParser.cs
WalletWasabi/Hwi2/Parsers/HwiParser.cs
@@ -61,7 +61,7 @@ namespace WalletWasabi.Hwi2.Parsers
// https://github.com/bitcoin-core/HWI/issues/216
else if (err == "Not initialized")
{
- code = HwiErrorCode.NotInitialized;
+ code = HwiErrorCode.DeviceNotInitialized;
}
if (code.HasValue)

Correct notinitialized enum