From ed259e500989443e79da2acaf18fd84cbb0c5975 Mon Sep 17 00:00:00 2001 From: wireless90 <12537739+wireless90@users.noreply.github.com> Date: Fri, 20 Jan 2023 22:54:06 +0800 Subject: [PATCH] Bug fix GetTransaction --- .../GetTransaction/GetTransactionQueryHandler.cs | 3 ++- .../GetTransaction/GetTransactionQueryMessage.cs | 6 +++--- .../GetTransaction/GetTransactionQueryMessageData.cs | 12 ++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessageData.cs diff --git a/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryHandler.cs b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryHandler.cs index ccba262..93689c4 100644 --- a/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryHandler.cs +++ b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryHandler.cs @@ -8,7 +8,8 @@ public class GetTransactionQueryHandler : IRequestHandler Handle(GetTransactionQuery request, CancellationToken cancellationToken) { - GetTransactionQueryMessage message = new GetTransactionQueryMessage(request.Username, request.TransactionId); + GetTransactionQueryMessageData messageData = new GetTransactionQueryMessageData(request.TransactionId); + GetTransactionQueryMessage message = new GetTransactionQueryMessage(request.Username, messageData); string json = JsonConvert.SerializeObject(message); RustBridgeGenericResponse genericResponse = await request.Account.SendMessageAsync(json); diff --git a/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessage.cs b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessage.cs index d5a5866..d23d3f6 100644 --- a/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessage.cs +++ b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessage.cs @@ -2,11 +2,11 @@ namespace IotaWalletNet.Application.AccountContext.Queries.GetTransaction { - public class GetTransactionQueryMessage : AccountMessage + public class GetTransactionQueryMessage : AccountMessage { private const string METHOD_NAME = "getTransaction"; - public GetTransactionQueryMessage(string username, string transactionId) - : base(username, METHOD_NAME, transactionId) + public GetTransactionQueryMessage(string username, GetTransactionQueryMessageData messageData) + : base(username, METHOD_NAME, messageData) { } diff --git a/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessageData.cs b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessageData.cs new file mode 100644 index 0000000..9aa0039 --- /dev/null +++ b/csharp/IotaWalletNet/IotaWalletNet.Application/AccountContext/Queries/GetTransaction/GetTransactionQueryMessageData.cs @@ -0,0 +1,12 @@ +namespace IotaWalletNet.Application.AccountContext.Queries.GetTransaction +{ + public class GetTransactionQueryMessageData + { + public GetTransactionQueryMessageData(string transactionId) + { + TransactionId = transactionId; + } + + public string TransactionId { get; set; } + } +}