mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Make most XCM APIs accept an Into<MultiLocation> where MultiLocation is accepted (#3627)
* Change send_xcm MultiLocation argument to be generic * Change pallet_xcm::send_xcm MultiLocation and Junctions argument to be generic * Change convert_origin MultiLocation argument to be generic * Change OnResponse MultiLocation arguments to be generic * Change UniversalWeigher MultiLocation argumente to be generic * Change ExecuteXcm MultiLocation argument to be generic * Remove usages of into for the MultiLocation argument in execute_xcm * Make use of generic MultiLocation arguments in rustdocs * Cargo fmt * Remove unused import in tests * Resolve conflicts * cargo fmt * Appease spellcheck * impl Into<MultiLocation> in more places
This commit is contained in:
@@ -91,7 +91,7 @@ impl<XcmExecutor: xcm::latest::ExecuteXcm<C::Call>, C: Config> UmpSink for XcmSi
|
||||
) -> Result<Weight, (MessageId, Weight)> {
|
||||
use parity_scale_codec::DecodeLimit;
|
||||
use xcm::{
|
||||
latest::{Error as XcmError, Junction, MultiLocation, Xcm},
|
||||
latest::{Error as XcmError, Junction, Xcm},
|
||||
VersionedXcm,
|
||||
};
|
||||
|
||||
@@ -111,9 +111,8 @@ impl<XcmExecutor: xcm::latest::ExecuteXcm<C::Call>, C: Config> UmpSink for XcmSi
|
||||
Ok(0)
|
||||
},
|
||||
Ok(Ok(xcm_message)) => {
|
||||
let xcm_junction: Junction = Junction::Parachain(origin.into());
|
||||
let xcm_location: MultiLocation = xcm_junction.into();
|
||||
let outcome = XcmExecutor::execute_xcm(xcm_location, xcm_message, max_weight);
|
||||
let xcm_junction = Junction::Parachain(origin.into());
|
||||
let outcome = XcmExecutor::execute_xcm(xcm_junction, xcm_message, max_weight);
|
||||
match outcome {
|
||||
Outcome::Error(XcmError::WeightLimitReached(required)) => Err((id, required)),
|
||||
outcome => {
|
||||
|
||||
Reference in New Issue
Block a user