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

fix: set rpc to call for queryInfo in transaction/fee-estimate #1170

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

TarikGul
Copy link
Member

Switches the use of RPC calls for queryInfo to runtime calls for /transaction/fee-estimate. Will use rpc as a fallback.

@TarikGul TarikGul requested a review from a team as a code owner December 21, 2022 18:11
Copy link
Collaborator

@marshacb marshacb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@TarikGul TarikGul added A0 - Please Review PR is ready for review I8 - Enhancement Additional feature request labels Dec 21, 2022
@@ -32,9 +32,20 @@ export class TransactionFeeEstimateService extends AbstractService {
transaction: string
): Promise<RuntimeDispatchInfo> {
const { api } = this;
const apiAt = await api.at(hash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my understanding, what is the difference of pulling the hash at this point and not inside the try?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No big difference, more so for readability. The try is really just dealing with the async call whereas establishing the api.at() is declaring the runtime api.

Copy link
Contributor

@IkerAlus IkerAlus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TarikGul TarikGul merged commit 7334599 into master Dec 22, 2022
@TarikGul TarikGul deleted the tarik-tx-fee-rpc-call branch December 22, 2022 14:32
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0 - Please Review PR is ready for review I8 - Enhancement Additional feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants