Skip to content

fix(send): don't treat ETH as the native coin on chains where it isn't - #126

Open
Ehsan-saradar wants to merge 1 commit into
zeriontech:mainfrom
Ehsan-saradar:fix/send-eth-non-eth-native-chains
Open

Ehsan-saradar wants to merge 1 commit into
zeriontech:mainfrom
Ehsan-saradar:fix/send-eth-non-eth-native-chains

Conversation

@Ehsan-saradar

@Ehsan-saradar Ehsan-saradar commented Sep 22, 2026 •

Copy link
Copy Markdown

Fixes #125

send ETH on polygon was sending POL. The ETH alias in resolve-token.js had the native asset address, so on any chain where the native coin is not ETH (polygon, bsc, avalanche, ...) it was treated as a native transfer of that coin.

Now the alias has no address. The native check from the chain catalog already decides if ETH is the native coin, so on polygon send ETH resolves the ETH token contract for that chain like other tokens do, or gives a no_contract error if there is none.

Chains where ETH is native (ethereum, base, arbitrum, ...) are not changed, they still match in the native lookup.

The "ETH" alias in resolve-token.js carried the native-asset sentinel
address, so on polygon (POL), bsc (BNB), avalanche (AVAX) and similar
chains `send ETH` built a plain value transfer of the chain's own coin
and labelled it ETH.

The catalog lookup already decides whether ETH is the chain's native
asset. The alias now leaves `address` unset, so on those chains send
resolves the chain's ETH token contract like any other token (or fails
with no_contract). Chains where ETH is native are unchanged.

Fixes zeriontech#125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

send ETH on polygon sends POL instead of ETH

1 participant