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: createCalcFee bug #587

Merged
merged 6 commits into from
Jun 23, 2021
Merged

fix: createCalcFee bug #587

merged 6 commits into from
Jun 23, 2021

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Jun 22, 2021

[BUG] Urgent

Using Kusama as an example querying any block with a runtime less than 1062 (the minimum runtime version used to calc fees for kusama) will throw an error because api.query.transactionPayment?.nextFeeMultiplier?.at Multiplier type isnt supported.

Currently there is no check before api.query.transactionPayment?.nextFeeMultiplier?.at to make sure we don't calculate any fees for runtime's less than the least known runtime for fee's.

This PR fixes that by adding a check.

Copy link
Contributor

@insipx insipx left a comment

Choose a reason for hiding this comment

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

LGTM. DQ: Is there a better message than just 'Error', not sure if that bubbles up into something else

@TarikGul
Copy link
Member Author

TarikGul commented Jun 22, 2021

Yea just noticed that, putting a better message in there. Good question for sure! Fixed the error message

@@ -19,6 +20,7 @@ import block7354817 from './7354817.json';
import block7519631 from './7519631.json';

export const kusamaEndpoints = [
['/blocks/9253', JSON.stringify(block9253)], //v1020
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@dvdplm dvdplm merged commit 21a7e08 into master Jun 23, 2021
@dvdplm dvdplm deleted the tarik-fix-fee branch June 23, 2021 14:26
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants