mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Fix HRMP Sibling Location (#318)
* Fix HRMP Location * Add call to xcm handler
This commit is contained in:
@@ -305,7 +305,7 @@ construct_runtime! {
|
|||||||
ParachainSystem: cumulus_parachain_system::{Module, Call, Storage, Inherent, Event},
|
ParachainSystem: cumulus_parachain_system::{Module, Call, Storage, Inherent, Event},
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||||
ParachainInfo: parachain_info::{Module, Storage, Config},
|
ParachainInfo: parachain_info::{Module, Storage, Config},
|
||||||
XcmHandler: xcm_handler::{Module, Event<T>, Origin},
|
XcmHandler: xcm_handler::{Module, Call, Event<T>, Origin},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,10 +122,11 @@ impl<T: Config> HrmpMessageHandler for Module<T> {
|
|||||||
frame_support::debug::print!("Processing HRMP XCM: {:?}", &hash);
|
frame_support::debug::print!("Processing HRMP XCM: {:?}", &hash);
|
||||||
match VersionedXcm::decode(&mut &msg.data[..]).map(Xcm::try_from) {
|
match VersionedXcm::decode(&mut &msg.data[..]).map(Xcm::try_from) {
|
||||||
Ok(Ok(xcm)) => {
|
Ok(Ok(xcm)) => {
|
||||||
match T::XcmExecutor::execute_xcm(
|
let location = (
|
||||||
Junction::Parachain { id: sender.into() }.into(),
|
Junction::Parent,
|
||||||
xcm,
|
Junction::Parachain { id: sender.into() },
|
||||||
) {
|
);
|
||||||
|
match T::XcmExecutor::execute_xcm(location.into(), xcm) {
|
||||||
Ok(..) => RawEvent::Success(hash),
|
Ok(..) => RawEvent::Success(hash),
|
||||||
Err(e) => RawEvent::Fail(hash, e),
|
Err(e) => RawEvent::Fail(hash, e),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user