-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use FromNetwork #80
Use FromNetwork #80
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.
💅🏻
} | ||
|
||
#[test] | ||
fn from_network_contains_works() { |
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.
🥳
Some(sp_std::vec![ | ||
EthereumLocation::get().interior.split_global().expect("invalid configuration for Ethereum").1, | ||
]), | ||
Some(sp_std::vec![Junctions::Here]), |
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.
Is this right? 🤔
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.
Yeah, its basically the equivalent of
EthereumLocation::get().interior.split_global().expect("invalid configuration for Ethereum").1
Because EthereumLocation.get().interior
is GlobalConsensus(Ethereum { chain_id: .. })
, then we split_global()
which strips the first global consensus part, leaving ( GlobalConsensus(Ethereum { chain_id: .. }) , Junctions::Here )
. Then we take the second member of the tuple with .1
.
f5f8155
to
dd71915
Compare
* wip * use from network * add tests
Snowbridge: Snowfork/snowbridge#1075