Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
remove todos
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Nov 2, 2023
1 parent 3caee92 commit 0686da9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,9 @@ pub mod bridging {
),
NetworkExportTableItem::new(
EthereumNetwork::get(),
None, // TODO add Ethereum network / gateway contract
Some(sp_std::vec![
EthereumLocation::get().interior,
]),
SiblingBridgeHub::get(),
Some((
XcmBridgeHubRouterFeeAssetId::get(),
Expand All @@ -913,10 +915,6 @@ pub mod bridging {
// and nothing else
];

pub AllowedReserveTransferAssetsToEthereum: sp_std::vec::Vec<MultiAssetFilter> = sp_std::vec![
Wild(AllOf { fun: WildFungible, id: Concrete(EthereumLocation::get()) }),
];

/// Universal aliases
pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter(
sp_std::vec![
Expand Down
8 changes: 6 additions & 2 deletions cumulus/parachains/runtimes/assets/common/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ pub struct FromNetwork<SelfNetworkId>(sp_std::marker::PhantomData<SelfNetworkId>
impl<SelfNetworkId: Get<NetworkId>> ContainsPair<MultiLocation, MultiLocation>
for FromNetwork<SelfNetworkId>
{
fn contains(&a: &MultiLocation, _b: &MultiLocation) -> bool {
// TODO: check that a.starts_with(b)
fn contains(&a: &MultiLocation, b: &MultiLocation) -> bool {
// `a` needs to be from `b` at least
if !a.starts_with(b) {
return false
}

match a {
MultiLocation { parents: 2, interior } => {
matches!(interior.first(), Some(GlobalConsensus(network)) if *network == SelfNetworkId::get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter {
destination,
message,
)
.map(|result| ((Ethereum { chain_id: 15 }, result.0), result.1)) // TODO get network ID
.map(|result| ((location, result.0), result.1))
},
_ => unimplemented!("Unsupported network: {:?}", network),
}
Expand Down

0 comments on commit 0686da9

Please sign in to comment.