Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Dec 23, 2024
1 parent d7b33dc commit 17d98b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ where

// Convert ERC20 token address to a location that can be understood by Assets Hub.
fn convert_token_address(network: NetworkId, token: H160) -> Location {
// If the token is `0x0000000000000000000000000000000000000000` then this return the native
// ETH location.
// If the token is `0x0000000000000000000000000000000000000000` then return the location of
// native Ether.
if token == H160([0; 20]) {
Location::new(2, [GlobalConsensus(network)])
} else {
Expand Down
6 changes: 3 additions & 3 deletions bridges/snowbridge/primitives/router/src/outbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ where
// Get the ERC20 contract address of the token.
(0, [AccountKey20 { network, key }]) if self.network_matches(network) =>
Some((H160(*key), *amount)),
// If there is no ERC20 contract address in the location then signal this is
// native ETH by using `0x0000000000000000000000000000000000000000` as the
// token address.
// If there is no ERC20 contract address in the location then signal to the
// gateway that is a native Ether transfer by using
// `0x0000000000000000000000000000000000000000` as the token address.
(0, []) => Some((H160([0; 20]), *amount)),
_ => None,
},
Expand Down

0 comments on commit 17d98b7

Please sign in to comment.