manuelmauro / algonaut

A rusty sdk for Algorand.
MIT License
64 stars 38 forks source link

querying by tx id fails #204

Closed 1m1-github closed 1 year ago

1m1-github commented 1 year ago

Describe the bug querying by tx id fails

To Reproduce Steps to reproduce the behavior:

let indexer_result = Indexer::new("https://algoindexer.testnet.algoexplorerapi.io/");
let indexer = indexer_result.unwrap();
let mut txn_query = QueryTransaction::default();
txn_query.txid = Some("Y5I4TYMKJI3MYJHBQ46DRHEXFW7BTURBKZ7V2NF2OU4QEHLYTKBQ".to_owned());
let txns_result = indexer.transactions(&txn_query).await;

gives an error trying to GET

https://algoindexer.testnet.algoexplorerapi.io/v2/transactions?tx-type=Y5I4TYMKJI3MYJHBQ46DRHEXFW7BTURBKZ7V2NF2OU4QEHLYTKBQ

which is asking for tx-type, whereas the code was filtering on txid.

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

manuelmauro commented 1 year ago

Closed by #208