Hi,
I am using V2 api and my transaction does go through successfully but when I try to get the status I get the following error:
Error: Parser is unable to parse the response
at Request.<anonymous> (client.js:402)
at Request.push../node_modules/component-emitter/index.js.Emitter.emit (index.js:145)
at XMLHttpRequest.xhr.onreadystatechange (client.js:707)
The error is generated at
const pendingInfo = await algodclient.pendingTransactionInformation(txId).do();
I am using algosdk version 1.6.2
const api = "https://testnet-algorand.api.purestake.io/ps2";
const algodclient = new algosdk.Algodv2(
token,
api,
port
);
The problem seems that the call to algodclient.pendingTransactionInformation() goes to /node_modules/algosdk/src/client/algod.js
which in turn calls
await c.get("/v1/transactions/pending/" + txid, {}, headers);
Now here it says “v1” … I guess this is causing the error
FYI, I can not use the more latest version of the sdk 1.7.0 as I have a bigger error there.
Any thoughts on how to resolve this?
