Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Ensure origin for AliasOrigin in barrier
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jul 15, 2023
1 parent 4e7b8f5 commit b26da28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xcm/xcm-builder/src/barriers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ impl<T: Contains<MultiLocation>> ShouldExecute for AllowAliasOriginWithdrawPaidE
.skip_inst_while(|inst| matches!(inst, ClearOrigin))?
// TODO:check-parameter - this is only difference with `AllowTopLevelPaidExecutionFrom` - check for AliasOrigin / WithdrawAsset / ClearOrigin
.match_next_inst(|inst| match inst {
AliasOrigin(_) => Ok(()),
// we allow reset origin by AliasOrigin, only iff equals (computed) `origin` here.
AliasOrigin(alias_origin) if alias_origin == origin => Ok(()),
_ => Err(ProcessMessageError::BadFormat),
})?
// TODO:check-parameter - this is only difference with `AllowTopLevelPaidExecutionFrom` - check for AliasOrigin / WithdrawAsset / ClearOrigin
Expand Down

0 comments on commit b26da28

Please sign in to comment.