-
Notifications
You must be signed in to change notification settings - Fork 12
Try to auto-detect token type used in runtime transactions #1279
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
Conversation
Deployed to Cloudflare Pages
|
1da61cb to
ebe0ff5
Compare
Use tx.data to figure out if it's something special, or the default native token.
ebe0ff5 to
a16157b
Compare
| ), | ||
| Denomination: getTokensForScope({ network, layer: runtime })[0].ticker, // TODO find this out from event data | ||
| Denomination: | ||
| event.body?.Denomination ?? |
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.
This doesn't exist. event.body?.amount.Denomination exists.
But event.body.amount.Denomination === '' above means that it is empty
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.
I have seen both existing on different data, IIRC.
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.
Well, maybe not.
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.
Right, when this code is executed, it's always empty. Removed useless condition in #1285.
Use
tx.bodyto figure out if it's something special, or the default native token.