Guards and null checking removed
MODIFY
WalletWasabi.Tests/UnitTests/Transactions/SmartTransactionTests.cs
WalletWasabi.Tests/UnitTests/Transactions/SmartTransactionTests.cs
@@ -199,18 +199,6 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
}
}
}
-
- // Null and empty arguments.
- string? input = $"{txHash}:{txHex}:{height}:{blockHash}:{blockIndex}:{label}:{unixSeconds}:{isReplacement}";
- Network? network = null;
- Assert.Throws<ArgumentNullException>(() => SmartTransaction.FromLine(input, network));
- network = Network.Main;
- input = "";
- Assert.Throws<ArgumentException>(() => SmartTransaction.FromLine(input, network));
- input = " ";
- Assert.Throws<ArgumentException>(() => SmartTransaction.FromLine(input, network));
- input = null;
- Assert.Throws<ArgumentNullException>(() => SmartTransaction.FromLine(input, network));
}
public static IEnumerable<object[]> GetSmartTransactionCombinations()

MODIFY
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
@@ -207,9 +207,6 @@ namespace WalletWasabi.Blockchain.Transactions
public static SmartTransaction FromLine(string line, Network expectedNetwork)
{
- line = Guard.NotNullOrEmptyOrWhitespace(nameof(line), line, trim: true);
- expectedNetwork = Guard.NotNull(nameof(expectedNetwork), expectedNetwork);
-
var parts = line.Split(':', StringSplitOptions.None).Select(x => x.Trim()).ToArray();
var transactionString = parts[1];

Guards and null checking removed