Skip to content

Commit

Permalink
loosing the logic for bridged assets
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgunozerk committed Oct 22, 2024
1 parent e254dee commit 88fc959
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions evm-template/runtime/src/configs/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@ impl Reserve for BridgedAssetReserveProvider {

let asset_hub_reserve = AssetHubLocation::get();

match location.interior() {
X1(arc) if arc.as_ref() == &[GlobalConsensus(Ethereum { chain_id: 1 })] =>
Some(asset_hub_reserve), // if the location is ethereum, we use AssetHub as the reserve
match location {
Location { parents, interior: X1(arc) }
if *parents > 1 && matches!(arc.as_ref().first(), Some(GlobalConsensus(_))) =>
Some(asset_hub_reserve),
_ if location == &asset_hub_reserve => Some(asset_hub_reserve), // if the location is AssetHub, we use AssetHub
_ => None, // Asset doesn't match any known reserve.
}
Expand Down

0 comments on commit 88fc959

Please sign in to comment.