-
Notifications
You must be signed in to change notification settings - Fork 118
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
taprpc: marshal with metareveal of issuance proof #1050
Conversation
ab1d49f
to
e7bc705
Compare
If the meta data isn't JSON when we expect it to be, we return the correct error.
When attempting to fetch the decimal display in a non strict way, we directly return fn.None() if the meta data isn't valid JSON.
e7bc705
to
21c1148
Compare
Was able to reproduce and continued on the fix. Should be all good now. |
rpcserver.go
Outdated
// getDecimalDisplayNonStrict attempts to decode a decimal display value from | ||
// metadata. If no custom decimal display value is decoded, the default value of | ||
// 0 is returned without error. | ||
func getDecimalDisplayNonStrict(meta *proof.MetaReveal) (uint32, error) { |
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 think this should return an fn.Option
instead of defaulting to 0. Later at the callsite, taprpc.MarshalAsset
takes an option anyway.
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.
That's added in a later commit. Perhaps you were looking at an outdated version?
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 don't think I was looking at an outdated version of the commit set. I was going through each commit in order. I think later commits change the changes of earlier commits.
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.
My comment had already been addressed in a later commit.
lgtm 🎉 |
Fixes decoding of issuance proofs from other nodes.
An example issuance proof:
Decode to binary by piping to
xxd -r -p
. If we try to decode withtapcli proofs decode
, we get an error about a metadata lookup failure for this asset.This fixes that by reading the metadata from the metareveal of the proof if present.