-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: allow for registry override #369
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.
minor nit. LGTM
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.
Overall looks amazing! Small nit, I think we should change the name to overrideRegistry
. In addition to that we need to update the docs in the README.md that go over the AssetTransferApiOpts
.
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, great job :)
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/parity-tech-update-for-february/6630/1 |
Description
Updated
parseRegistry
to allow for overriding entries of the existing registry. This is achieved by adding the optional propertyoverridingRegistry
toAssetTransferApiOpts
. NowpropertyIterator
takes an extra optional argumentoverride
, aboolean
that defines whether we intend to override the registry or not. This value is set onparseRegistry
and depends on the presence of the propertyoverridingRegistry
in theopts
passed to the function. If thechainId
passed inoverridingRegistry
is not present in the registry, it just adds it as if it were aninjectedRegistry
. If both options are present, it first updates the registry withinjectedRegistry
and then makes the changes as peroverridingRegistry
.