Skip to content
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

Replaced CurrencyId enum by Spacewalk Primitives CurrencyId. #272

Conversation

adelarja
Copy link
Contributor

This PR aims to replace the CurrencyId enum from pendulum's runtime, with the CurrencyId enum from the spacewalk primitives.

We need to do this in order to implement the ZenlinkProtocol Runtime API for pendulum chain in this PR.

zenlink_id_to_currency_id function will be used for the ZenlinkProtocol Runtime API to convert between zenlink assets to spacewalk currencies. The current implementation will be replaced by the same implementation of the zenlink runtime common module which was used for Amplitude and Foucoco in the previous PR.

@adelarja adelarja linked an issue Jul 11, 2023 that may be closed by this pull request
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left some nit-picky comments on how I would prefer the import structure to be.
I know that the PendulumCurrencyId is something that existed before and you just adapted the code to that @adelarja, but while reading through the changes I realized that having that extra type might not be ideal. Again, it's quite minor. Rest LGTM

runtime/pendulum/src/lib.rs Outdated Show resolved Hide resolved
runtime/pendulum/src/xcm_config.rs Outdated Show resolved Hide resolved
runtime/pendulum/src/zenlink.rs Outdated Show resolved Hide resolved
runtime/pendulum/src/zenlink.rs Show resolved Hide resolved
@ebma ebma self-requested a review July 13, 2023 07:55
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for addressing my comments @adelarja. Looks good to me now 👍

@adelarja adelarja changed the title [WIP] Replaced CurrencyId enum by Spacewalk Primitives CurrencyId. Replaced CurrencyId enum by Spacewalk Primitives CurrencyId. Jul 13, 2023
@adelarja adelarja marked this pull request as ready for review July 13, 2023 13:56
Copy link
Member

@TorstenStueber TorstenStueber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections. Looks good.

@ebma ebma merged commit 03d81a5 into main Jul 14, 2023
2 checks passed
@ebma ebma deleted the 271-updatereplace-pendulums-currencyid-with-the-one-defined-in-spacewalk branch July 14, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update/Replace Pendulum's CurrencyId with the one defined in Spacewalk
3 participants