Add nullables
MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItems/ActionableItem.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItems/ActionableItem.cs
@@ -7,7 +7,7 @@ namespace WalletWasabi.Fluent.ViewModels.SearchBar.SearchItems;
public class ActionableItem : IActionableItem
{
- public ActionableItem(string name, string description, Func<Task> onExecution, string category, IEnumerable<string>? keywords = null)
+ public ActionableItem(string name, string description, Func<Task>? onExecution, string category, IEnumerable<string>? keywords = null)
{
Name = name;
Description = description;
@@ -16,7 +16,7 @@ public class ActionableItem : IActionableItem
Keywords = keywords ?? Enumerable.Empty<string>();
}
- public Func<Task> OnExecution { get; }
+ public Func<Task>? OnExecution { get; }
public string Name { get; }
public string Description { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItems/IActionableItem.cs
WalletWasabi.Fluent/ViewModels/SearchBar/SearchItems/IActionableItem.cs
@@ -4,5 +4,5 @@ namespace WalletWasabi.Fluent.ViewModels.SearchBar.SearchItems;
public interface IActionableItem : ISearchItem
{
- Func<Task> OnExecution { get; }
+ Func<Task>? OnExecution { get; }
}

MODIFY
WalletWasabi/Rpc/JsonRpcResponse.cs
WalletWasabi/Rpc/JsonRpcResponse.cs
@@ -15,7 +15,7 @@ public class JsonRpcResponse
[JsonRpcErrorCodes.InternalError] = "Internal error",
};
- private JsonRpcResponse(string id, object result, object error)
+ private JsonRpcResponse(string id, object? result, object? error)
{
Id = id;
Result = result;
@@ -26,10 +26,10 @@ public class JsonRpcResponse
public string JsonRpc => "2.0";
[JsonProperty("result", Order = 1)]
- public object Result { get; }
+ public object? Result { get; }
[JsonProperty("error", Order = 1)]
- public object Error { get; }
+ public object? Error { get; }
[JsonProperty("id", Order = 3)]
public string Id { get; }
@@ -39,7 +39,7 @@ public class JsonRpcResponse
return new JsonRpcResponse(id, result, null);
}
- public static JsonRpcResponse CreateErrorResponse(string id, JsonRpcErrorCodes code, string message = null)
+ public static JsonRpcResponse CreateErrorResponse(string id, JsonRpcErrorCodes code, string? message = null)
{
var error = new
{

Add nullables