Remove redundant .ToString() calls
MODIFY
WalletWasabi.Tests/ExternalApiTests.cs
WalletWasabi.Tests/ExternalApiTests.cs
@@ -80,8 +80,8 @@ namespace WalletWasabi.Tests
Assert.InRange(response.MediumFee.FeePerK, response.LowFee.FeePerK, response.HighFee.FeePerK);
Assert.InRange(response.HighFee.FeePerK, response.MediumFee.FeePerK, Money.Coins(0.1m));
Assert.True(response.Height >= 491999);
- Assert.Equal(new Uri(client.BaseAddress.ToString().Replace("http", "https") + "/blocks/" + response.Hash.ToString()), response.LatestUrl);
- Assert.Equal(new Uri(client.BaseAddress.ToString().Replace("http", "https") + "/blocks/" + response.PreviousHash.ToString()), response.PreviousUrl);
+ Assert.Equal(new Uri(client.BaseAddress.ToString().Replace("http", "https") + "/blocks/" + response.Hash), response.LatestUrl);
+ Assert.Equal(new Uri(client.BaseAddress.ToString().Replace("http", "https") + "/blocks/" + response.PreviousHash), response.PreviousUrl);
if (network == Network.Main)
{
Assert.Equal("BTC.main", response.Name);

MODIFY
WalletWasabi/Backend/Models/FilterModel.cs
WalletWasabi/Backend/Models/FilterModel.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.Backend.Models
if (Filter != null) // bech found here
{
builder.Append(":");
- builder.Append(Filter.ToString());
+ builder.Append(Filter);
}
return builder.ToString();

MODIFY
WalletWasabi/Exceptions/TorSocks5FailureResponseException.cs
WalletWasabi/Exceptions/TorSocks5FailureResponseException.cs
@@ -8,7 +8,7 @@ namespace WalletWasabi.Exceptions
{
public RepField RepField;
- public TorSocks5FailureResponseException(RepField rep) : base($"Tor SOCKS5 proxy responded with {rep.ToString()}.")
+ public TorSocks5FailureResponseException(RepField rep) : base($"Tor SOCKS5 proxy responded with {rep}.")
{
RepField = Guard.NotNull(nameof(rep), rep);
}

MODIFY
WalletWasabi/Http/Models/HttpProtocol.cs
WalletWasabi/Http/Models/HttpProtocol.cs
@@ -42,7 +42,7 @@ namespace WalletWasabi.Http.Models
}
// HTTP-name "/" DIGIT "." DIGIT
- public override string ToString() => $"{Protocol}/{Version.ToString()}";
+ public override string ToString() => $"{Protocol}/{Version}";
#region Equality

MODIFY
WalletWasabi/Http/Models/RequestLine.cs
WalletWasabi/Http/Models/RequestLine.cs
@@ -20,7 +20,7 @@ namespace WalletWasabi.Http.Models
URI = uri;
Protocol = protocol;
- StartLineString = Method.Method + SP + URI.AbsolutePath + URI.Query + SP + Protocol.ToString() + CRLF;
+ StartLineString = Method.Method + SP + URI.AbsolutePath + URI.Query + SP + Protocol + CRLF;
}
public static RequestLine CreateNew(string requestLineString)

MODIFY
WalletWasabi/Http/Models/StatusLine.cs
WalletWasabi/Http/Models/StatusLine.cs
@@ -14,7 +14,7 @@ namespace WalletWasabi.Http.Models
Protocol = protocol;
StatusCode = status;
- StartLineString = Protocol.ToString() + SP + (int)StatusCode + SP + StatusCode.ToReasonString() + CRLF;
+ StartLineString = Protocol + SP + (int)StatusCode + SP + StatusCode.ToReasonString() + CRLF;
}
public static StatusLine CreateNew(string statusLineString)

Remove redundant .ToString() calls