GetTransactionRequest returns incorrect transactionHash

14 views
Skip to first unread message

Likho Jiba

unread,
Apr 30, 2020, 8:00:39 AM4/30/20
to Protocol Buffers
Hi, I am not sure if this is the correct platform for this question, please assist if you can. I am using gRPC's GetTransactionRequest in a laravel app . I am sending through a transaction_hash as a parameter. when I do serializeToJsonString on  GetTransactionRequest the value of the hash is not what I sent through - it looks like GetTransactionRequest hashes the value which then does not work with the WalletService/GetTransaction. 


 

Likho Jiba

unread,
Apr 30, 2020, 8:05:04 AM4/30/20
to Protocol Buffers
I forgot to mention I am using laravel with PHP 7.3

Likho Jiba

unread,
Apr 30, 2020, 8:25:18 AM4/30/20
to Protocol Buffers
Please see more info on this issue

I am using dcrwallet from https://github.com/decred/dcrwallet/blob/master/rpc/documentation/api.md to get a transaction by hash. 

$request = new Grpc\GetTransactionRequest(['transaction_hash' => 'my-hash-value']);
$response = $this->client->GetTransaction($request, []);

where GetTransaction is a function that takes a GetTransactionRequest object. when I debug GetTransactionRequest in that functions it seems GetTransactionRequest does some kind of encoding to the transaction. Is there any way I could avoid this or reverse the encoding? 



On Thursday, April 30, 2020 at 2:00:39 PM UTC+2, Likho Jiba wrote:
Reply all
Reply to author
Forward
0 new messages