Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port over all api.query.<pallet>.<method>.at() -> api.at() historic api #698

Closed
10 tasks done
TarikGul opened this issue Oct 7, 2021 · 3 comments
Closed
10 tasks done
Labels
A3 - In Progress PR in progress, not ready for review I8 - Enhancement Additional feature request

Comments

@TarikGul
Copy link
Member

TarikGul commented Oct 7, 2021

All services that use api.query...at() will be deprecated via affa6ab in polkadot-js. It's important to refactor each service to now use a api.at() historicApi.

List of services to refactor:

rel: #697

@TarikGul
Copy link
Member Author

Before I can go any further with this issue, #702 needs to be merged

@jacogr
Copy link

jacogr commented Oct 11, 2021

Just a note - these won't be removed anytime soon (certainly not in the mids of the 6.x range). The reality is that api.at is cleaner and does a whole host of things better, i.e. giving you an actual instance at that point, correctly decorated. Additionally this is used everywhere, so it certainly won't be dropped soon (probably will still live in the 7.x version as well), generally don't like breaking other people's code.

Currently the older versions now use api.at internally so it should yield less breakages, which with the new metadata + types is quite tricky with the (now deprecated) versions.

@TarikGul
Copy link
Member Author

Okay sweet, good to know. I Appreciate the explanation. That helps a lot because I currently see some instances where I might have to leave the api.query.*.*.at in for the time being. I have actually been finding api.at to be a really great upgrade in general as well, having the centralized source of truth in the api is such an incredibly useful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3 - In Progress PR in progress, not ready for review I8 - Enhancement Additional feature request
Projects
None yet
Development

No branches or pull requests

2 participants