-
Notifications
You must be signed in to change notification settings - Fork 120
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
rpc: unconstrain meta field for MintAssets #559
Conversation
The underlying |
Aren't we effectively doing that just with the cast? |
Yes, but that would just truncate the value and lead to unexpected behavior. I think what @jharveyb meant was to return an error if the value was bigger than |
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.
LGTM pending the mentioned check for value overflow.
Or negative |
Ah, I guess we should at least make it |
Yeah I could find where it was defined as Also may want a test to make sure that the same strict meta type handling isn't also present elsewhere in the minting logic. |
Right, I forgot it was an enum. Looks like gRPC by default uses |
6bb73cc
to
f65d7f0
Compare
In this commit, we stop trying to strictly parse the meta field. Instead, users can set it to w/e they want, with the default being opaque. This lets users start to add structure to the meta field from day one. One example is a set meta with fields that dictate how the asset unit is to be displayed. This can be used to do things like leverage the current fix point format to add decimal places for display.
f65d7f0
to
f39fda2
Compare
In this commit, we stop trying to strictly parse the meta field. Instead, users can set it to w/e they want, with the default being opaque. This lets users start to add structure to the meta field from day one. One example is a set meta with fields that dictate how the asset unit is to be displayed. This can be used to do things like leverage the current fix point format to add decimal places for display.