Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Jul 11, 2023
1 parent 02aa9b8 commit 79f67f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtime/common/src/xcm_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ use xcm_executor::{
// substrate
use frame_support::{
log,
traits::{tokens::currency::Currency as CurrencyT, ConstU128, OnUnbalanced as OnUnbalancedT},
traits::{
tokens::currency::Currency as CurrencyT, ConstU128, OnUnbalanced as OnUnbalancedT,
ProcessMessageError,
},
weights::{Weight, WeightToFee as WeightToFeeT},
};
use sp_core::Get;
Expand Down Expand Up @@ -86,7 +89,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
message: &mut [Instruction<RuntimeCall>],
_max_weight: Weight,
_weight_credit: &mut Weight,
) -> Result<(), ()> {
) -> Result<(), ProcessMessageError> {
if message.iter().any(|inst| {
matches!(
inst,
Expand All @@ -100,7 +103,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
}
)
}) {
return Err(()); // Deny
return Err(ProcessMessageError::Unsupported); // Deny
}

// An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve`
Expand Down

0 comments on commit 79f67f0

Please sign in to comment.