Skip to content

Commit

Permalink
Merge pull request #164 from IOTA-NET/Bug-fix-GetTransaction
Browse files Browse the repository at this point in the history
Bug fix GetTransaction
  • Loading branch information
wireless90 authored Jan 20, 2023
2 parents 3b65b1a + ed259e5 commit a8c70ed
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public class GetTransactionQueryHandler : IRequestHandler<GetTransactionQuery, G
{
public async Task<GetTransactionResponse> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace IotaWalletNet.Application.AccountContext.Queries.GetTransaction
{
public class GetTransactionQueryMessage : AccountMessage<string>
public class GetTransactionQueryMessage : AccountMessage<GetTransactionQueryMessageData>
{
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)
{

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace IotaWalletNet.Application.AccountContext.Queries.GetTransaction
{
public class GetTransactionQueryMessageData
{
public GetTransactionQueryMessageData(string transactionId)
{
TransactionId = transactionId;
}

public string TransactionId { get; set; }
}
}

0 comments on commit a8c70ed

Please sign in to comment.