mycelium-com / wallet-android

Mycelium Bitcoin Wallet for Android
http://mycelium.com
Other
660 stars 320 forks source link

Ethereum address checksum (suggestion) #553

Open Querela opened 4 years ago

Querela commented 4 years ago

Many other wallets show the ethereum receive address with some upper case letters that work like a checksum for other services to validate the address (if anyone would manually copy each letter...)

The EIP55 shows how an address can be updates to include those checksum letters: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md

As it is only a letter case change and Ethereum addresses are case insensitive, it would only be an enhancement. Maybe also provide an setting for disabling it if needed.

Querela commented 4 years ago

It might suffice to only update the EthAccount constructor with receivingAddress in https://github.com/mycelium-com/wallet-android/blob/master/walletcore/src/main/java/com/mycelium/wapi/wallet/eth/EthAccount.kt But then it might be necessary to lowercase the address in other lookup functions ...

Or an method in https://github.com/mycelium-com/wallet-android/blob/master/walletcore/src/main/java/com/mycelium/wapi/wallet/eth/EthAddress.kt like toString?

Giszmo commented 3 years ago

Thank you. That is an interesting approach. PRs are welcome. It looks like this could be fit into UI part, only, so that internal lookup logic won't get confused.