-
Notifications
You must be signed in to change notification settings - Fork 20
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
Balance conversion for balance types #376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's possible please refactor the method transformParams. Both scenarios mentioned in the description work fine 👍
The refactor is in, very inspired by your code, thank you very much. I chose to only extract to functions some logic when
This means that things like for instance the Balance handling is still on several lines, because I didn't want to duplicate the |
// console.log('getTypeDef', getTypeDef(arg.type.toString())) | ||
// const instance = api.registry.createType(arg.type as unknown as 'u32') | ||
// console.log('instance', instance) | ||
// const raw = getTypeDef(instance.toRawType()) | ||
// console.log('raw', raw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we maybe move it to the log method and comment it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After offline discussion we're keeping this around for a bit.
closes #375
This adds the token at the end of the field for manual extrinsics in case the field is expecting a balance. It will then convert the value in plank with the right amount of 0s.
To test:
balances.transfer
orbounties.proposeBounty
Submitting
Verifying