Skip to content

Commit 2482b8f

Browse files
committed
Update lib.rs
1 parent 738b23f commit 2482b8f

File tree

1 file changed

+29
-32
lines changed

1 file changed

+29
-32
lines changed

pallets/xcm-helper/src/lib.rs

+29-32
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
543543
xcm_weight_fee_misc.fee,
544544
)?;
545545

546+
let query_id = Self::report_outcome_notify(
547+
&mut msg,
548+
MultiLocation::parent(),
549+
notify,
550+
T::NotifyTimeout::get(),
551+
)?;
552+
546553
let call = RelaychainCall::<T>::Proxy(Box::new(ProxyCall::Proxy(ProxyProxyCall {
547554
real,
548555
force_proxy_type: None,
@@ -554,14 +561,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
554561
},
555562
)),
556563
})));
557-
558-
let query_id = Self::report_outcome_notify(
559-
&mut msg,
560-
MultiLocation::parent(),
561-
notify,
562-
T::NotifyTimeout::get(),
563-
)?;
564-
565564
Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);
566565

567566
if let Err(_e) = send_xcm::<T::XcmSender>(MultiLocation::parent(), msg) {
@@ -594,6 +593,14 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
594593
Self::refund_location(),
595594
xcm_weight_fee_misc.fee,
596595
)?;
596+
597+
let query_id = Self::report_outcome_notify(
598+
&mut msg,
599+
MultiLocation::parent(),
600+
notify,
601+
T::NotifyTimeout::get(),
602+
)?;
603+
597604
let call = RelaychainCall::<T>::Utility(Box::new(UtilityCall::AsDerivative(
598605
UtilityAsDerivativeCall {
599606
index,
@@ -604,14 +611,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
604611
})),
605612
},
606613
)));
607-
608-
let query_id = Self::report_outcome_notify(
609-
&mut msg,
610-
MultiLocation::parent(),
611-
notify,
612-
T::NotifyTimeout::get(),
613-
)?;
614-
615614
Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);
616615

617616
if let Err(_err) = send_xcm::<T::XcmSender>(MultiLocation::parent(), msg) {
@@ -644,6 +643,13 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
644643
xcm_weight_fee_misc.fee,
645644
)?;
646645

646+
let query_id = Self::report_outcome_notify(
647+
&mut msg,
648+
MultiLocation::parent(),
649+
notify,
650+
T::NotifyTimeout::get(),
651+
)?;
652+
647653
let call = RelaychainCall::<T>::Utility(Box::new(UtilityCall::AsDerivative(
648654
UtilityAsDerivativeCall {
649655
index,
@@ -652,14 +658,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
652658
)),
653659
},
654660
)));
655-
656-
let query_id = Self::report_outcome_notify(
657-
&mut msg,
658-
MultiLocation::parent(),
659-
notify,
660-
T::NotifyTimeout::get(),
661-
)?;
662-
663661
Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);
664662

665663
if let Err(_err) = send_xcm::<T::XcmSender>(MultiLocation::parent(), msg) {
@@ -770,6 +768,13 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
770768
xcm_weight_fee_misc.fee,
771769
)?;
772770

771+
let query_id = Self::report_outcome_notify(
772+
&mut msg,
773+
MultiLocation::parent(),
774+
notify,
775+
T::NotifyTimeout::get(),
776+
)?;
777+
773778
let call = RelaychainCall::Utility(Box::new(UtilityCall::AsDerivative(
774779
UtilityAsDerivativeCall {
775780
index,
@@ -781,14 +786,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
781786
)),
782787
},
783788
)));
784-
785-
let query_id = Self::report_outcome_notify(
786-
&mut msg,
787-
MultiLocation::parent(),
788-
notify,
789-
T::NotifyTimeout::get(),
790-
)?;
791-
792789
Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);
793790

794791
if let Err(_err) = send_xcm::<T::XcmSender>(MultiLocation::parent(), msg) {

0 commit comments

Comments
 (0)