near / near-cli-rs

near CLI is your human-friendly companion that helps to interact with NEAR Protocol from command line.
https://near.cli.rs
Apache License 2.0
98 stars 55 forks source link

feat: improved fetching staking pools #325

Closed frolvanya closed 5 months ago

frolvanya commented 5 months ago

I've noticed that view account summary command was taking too much time. The problems lay in scanning through validators to find if the user’s account id belongs to it. Furthermore, get_validators_stake function didn't give all available validators, only +-240 out of 450 were scannable. To fix this, I used fastnear API to retrieve validators in one request, if this process fails, then it will switch to the previous strategy

before image after image