Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mclyk committed Mar 21, 2024
1 parent 738b23f commit 2482b8f
Showing 1 changed file with 29 additions and 32 deletions.
61 changes: 29 additions & 32 deletions pallets/xcm-helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
xcm_weight_fee_misc.fee,
)?;

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

let call = RelaychainCall::<T>::Proxy(Box::new(ProxyCall::Proxy(ProxyProxyCall {
real,
force_proxy_type: None,
Expand All @@ -554,14 +561,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
},
)),
})));

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);

if let Err(_e) = send_xcm::<T::XcmSender>(MultiLocation::parent(), msg) {
Expand Down Expand Up @@ -594,6 +593,14 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
Self::refund_location(),
xcm_weight_fee_misc.fee,
)?;

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

let call = RelaychainCall::<T>::Utility(Box::new(UtilityCall::AsDerivative(
UtilityAsDerivativeCall {
index,
Expand All @@ -604,14 +611,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
})),
},
)));

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);

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

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

let call = RelaychainCall::<T>::Utility(Box::new(UtilityCall::AsDerivative(
UtilityAsDerivativeCall {
index,
Expand All @@ -652,14 +658,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
)),
},
)));

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);

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

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

let call = RelaychainCall::Utility(Box::new(UtilityCall::AsDerivative(
UtilityAsDerivativeCall {
index,
Expand All @@ -781,14 +786,6 @@ impl<T: Config> XcmHelper<T, BalanceOf<T>, AccountIdOf<T>> for Pallet<T> {
)),
},
)));

let query_id = Self::report_outcome_notify(
&mut msg,
MultiLocation::parent(),
notify,
T::NotifyTimeout::get(),
)?;

Self::append_transact(&mut msg, call.encode().into(), xcm_weight_fee_misc.weight);

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

0 comments on commit 2482b8f

Please sign in to comment.