Skip to content

Commit

Permalink
Encode as GeneralIndex directly without parachain prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Nov 30, 2021
1 parent c7eb1be commit 9747694
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pallets/salp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,8 @@ pub mod pallet {
TryInto::<u128>::try_into(amount).map_err(|_| Error::<T>::ConvertFailure)?;
let statemine_asset = MultiAsset {
id: AssetId::Concrete(MultiLocation::new(
1,
Junctions::X2(
Junction::Parachain(1000),
Junction::GeneralIndex(asset_id.into()),
),
0,
Junctions::X1(Junction::GeneralIndex(asset_id.into())),
)),
fun: Fungibility::Fungible(amount_128),
};
Expand Down
6 changes: 6 additions & 0 deletions runtime/common/src/xcm_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ impl<T: Get<ParaId>> Convert<MultiLocation, Option<CurrencyId>> for BifrostCurre
None
}
},

_ => None,
},
MultiLocation { parents, interior } if parents == 0 => match interior {
X1(GeneralIndex(key)) if key == parachains::Statemine::USDT_ID.into() =>
Some(Stable(TokenSymbol::USDT)),
_ => None,
},
_ => None,
Expand Down

0 comments on commit 9747694

Please sign in to comment.