Fix HwIEnumerateEntry warnings
MODIFY
WalletWasabi/Hwi/Models/HwiEnumerateEntry.cs
WalletWasabi/Hwi/Models/HwiEnumerateEntry.cs
@@ -8,7 +8,7 @@ public class HwiEnumerateEntry
public HwiEnumerateEntry(
HardwareWalletModels model,
string path,
- string serialNumber,
+ string? serialNumber,
HDFingerprint? fingerprint,
bool? needsPinSent,
bool? needsPassphraseSent,
@@ -33,7 +33,7 @@ public class HwiEnumerateEntry
public HardwareWalletModels Model { get; }
public string Path { get; }
- public string SerialNumber { get; }
+ public string? SerialNumber { get; }
public HDFingerprint? Fingerprint { get; }
public bool? NeedsPinSent { get; }
public bool? NeedsPassphraseSent { get; }

MODIFY
WalletWasabi/Hwi/Parsers/HwiParser.cs
WalletWasabi/Hwi/Parsers/HwiParser.cs
@@ -116,7 +116,7 @@ public static class HwiParser
return false;
}
- public static bool TryParseHardwareWalletVendor(JToken token, out HardwareWalletModels vendor)
+ public static bool TryParseHardwareWalletVendor(JToken? token, out HardwareWalletModels vendor)
{
vendor = HardwareWalletModels.Unknown;
@@ -220,8 +220,8 @@ public static class HwiParser
public static HwiEnumerateEntry ParseHwiEnumerateEntry(JObject json)
{
- JToken modelToken = json["model"];
- var pathString = json["path"]?.ToString()?.Trim();
+ JToken modelToken = json["model"]!;
+ var pathString = json["path"]!.ToString().Trim();
var serialNumberString = json["serial_number"]?.ToString()?.Trim();
var fingerprintString = json["fingerprint"]?.ToString()?.Trim();
var needsPinSentString = json["needs_pin_sent"]?.ToString()?.Trim();

Fix HwIEnumerateEntry warnings