-
Notifications
You must be signed in to change notification settings - Fork 28
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: unsigned transaction metadata #158
Conversation
Can confirm that this change will fix the issue in polkadot-js/api#4293. Thanks. How soon can we expect a release after this is merged? |
@lcovar Nice! Thanks for checking it out. We will release a patch tomorrow with these fixes. |
@doodles92 Yes can confirm this will be patched immediately, can't say when tomorrow exactly, but the goal is tomorrow regardless. |
* This similar method to txwrapper-registry is used here to | ||
* test getRegistryBase. | ||
*/ | ||
export const knownChainProperties = substrateSS58Registry.reduce( |
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 re-export this via txwrapper-registry so its not duplicated?
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.
It complains about circular dependencies. Being that the registry uses core, if core uses registry it wont build correctly.
@lcovar , @doodles92 - v1.3.2 has been released, and reflects these changes. |
A bug was introduced in 1.3.0 where I changed the
metadataRpc
field in the constructed unsigned transactions to point toregistry.metadata.toHex()
. For further details see polkadot-js/api#4293.This PR introduces a fix in
defineMethod
where I generate the metadata outside ofregistry.setMetadata()
and save it to its own variable so that generated metadata can then be used to be assigned tometadataRpc
. This is important because it allows for a minimized size in transaction when usingasCallsOnlyArg
without tampering with the integrity metadata itself.I also added a test for getRegistryBase that ensures when using
asCallsOnlyArg
that it will also minimize the metadata within the registry.