Comments (7)
I don't think the server supports setting values to 0, so this bug is more than an SDK/test quirk. The tests are actually enforcing the current server expectations.
from algorand-sdk-testing.
@winder
USDC, currency-greater-than=0
:
https://algoindexer.algoexplorerapi.io/v2/assets/31566704/balances?currency-greater-than=0
This excludes accounts with 0 balance
USDC, currency-greater-than
unset:
https://algoindexer.algoexplorerapi.io/v2/assets/31566704/balances
This includes accounts with 0 balance
But the SDK would not allow the first case currency-greater-than=0
to be queried
from algorand-sdk-testing.
Those JS PRs have been sitting there for almost 3 months now.... 👀
from algorand-sdk-testing.
@winder how do you mean? currency-greater-than=0
works as a query string, it accurately filters out accounts who hold 0 of the asset. It only doesn't work with the algosdk but I use it regularly when consuming the indexer api with other libs.
from algorand-sdk-testing.
This is definitely a bug in at least the JS SDK
This section removes valid zeros
https://github.com/algorand/js-algorand-sdk/blob/18b863be6f4fe435b77c75b62316c0a599d88d68/src/client/client.ts#L25-L33
The work around currently is just to set a string "0" so that it makes it through the checks.
This PR I filed last year was to allow searching valid 0s in the indexer: algorand/indexer#484
from algorand-sdk-testing.
Thanks @barnjamin, I forgot about that! I suppose the testing infrastructure and the SDKs would both need to account for this.
from algorand-sdk-testing.
SDKs need to be able to send 0 for query parameters. There are several transaction endpoints that have this issue/capability.
To solve this, we need to:
- audit our endpoints to make sure we solve it for all affected ones.
- update our cucumber tests for each affected endpoint.
- update each SDK correspondingly (likely all 4 SDKs, but need to confirm that the behavior appears in the Go and Java SDKs as well).
we will complete (1) and (2) as part of this ticket, then (3) with individual tickets for each SDK:
from algorand-sdk-testing.
Related Issues (20)
- Unify approach for cucumber and non-cucumber jobs across SDK's in CI
- New algod endpoint: /v2/block/{round}/hash
- Investigation: Can we refactor indexer integration tests to be deterministic?
- Test > 1 box references in app calls cucumber tests
- Incorrect "golden" for Offline.feature scenario "Sign multisig" HOT 2
- SDK fee per byte tests underestimate txn fee HOT 6
- Add tests for GZIP encoded responses
- Ensure SDKs are compatible with and/or set the header for requesting gzipped responses
- SDKs: Migrate tests from algod v1 to v2 APIs
- Add test for /v2/accountdelta/ endpoint
- Remove logicsig templates from SDKs
- SDKs: Drop algod v1 REST API support
- Revert `sandbox` branch back to `master` HOT 1
- SDKs: Trigger build on upstream dependency change
- accountInformation.json has incorrect test data
- Support simulating unsigned transactions in the SDK HOT 2
- Change how we fund accounts from genesis accounts and wallets
- unify resource directory structure
- Move logic from SDKs + Harness scripts to Sandbox
- Tests for newer simulate options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algorand-sdk-testing.