Skip to content

Commit

Permalink
fix alias origin
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Nov 7, 2024
1 parent 89a157d commit e814b29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bridges/snowbridge/primitives/router/src/inbound/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ where
BuyExecution { fees: fee, weight_limit: Unlimited },
DescendOrigin(PalletInstance(InboundQueuePalletInstance::get()).into()),
UniversalOrigin(GlobalConsensus(network)),
AliasOrigin(origin_location.into()),
];

for asset in &message.assets {
Expand Down Expand Up @@ -147,10 +146,9 @@ where
instructions.push(SetAssetClaimer { location: claimer_location });
}

// TODO not sure this is correct, should the junction be prefixed with
// GlobalConsensus(EthereumNetwork::get()?
instructions
.push(DescendOrigin(AccountKey20 { key: message.origin.into(), network: None }.into()));
// Set the alias origin to the original sender on Ethereum. Important to be before the
// arbitrary XCM that is appended to the message on the next line.
instructions.push(AliasOrigin(origin_location.into()));

// Add the XCM sent in the message to the end of the xcm instruction
instructions.extend(message_xcm.0);
Expand Down

0 comments on commit e814b29

Please sign in to comment.