Skip to content

Commit

Permalink
Add DescribeBodyTerminal to DescribeAllTerminal (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
arrudagates authored Feb 16, 2024
1 parent 5e67f1b commit 282485a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions primitives/src/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,22 @@ impl DescribeLocation for DescribeAccountKey20Terminal {

pub type DescribeAccountIdTerminal = (DescribeAccountId32Terminal, DescribeAccountKey20Terminal);

pub struct DescribeBodyTerminal;
impl DescribeLocation for DescribeBodyTerminal {
fn describe_location(l: &MultiLocation) -> Option<Vec<u8>> {
match (l.parents, &l.interior) {
(0, X1(Plurality { id, part })) => Some((b"Body", id, part).encode()),
_ => return None,
}
}
}

pub type DescribeAllTerminal = (
DescribeTerminus,
DescribePalletTerminal,
DescribeAccountId32Terminal,
DescribeAccountKey20Terminal,
DescribeBodyTerminal,
);

pub struct DescribeFamily<DescribeInterior>(PhantomData<DescribeInterior>);
Expand Down

0 comments on commit 282485a

Please sign in to comment.