blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
831 stars 492 forks source link

[Feature]: Use EIP55 when displaying and returning public address #1586

Open kabaluyot opened 1 year ago

kabaluyot commented 1 year ago

Is your request related to a problem?

Atm, web3-onboard (in access control or rpc) returns lowered case public address. For consistency with smart contracts and other evm tools, it should be returning the EIP55 checksum address.

Feature Description

No response

Alternative Solutions

No response

Anything else?

No response

Adamj1232 commented 1 year ago

@kabaluyot thanks for this request! I will discuss with the team and get it prioritized in our backlog. Is the current behavior causing any issues in usage? This will help with prioritizing. Thank you!

kabaluyot commented 1 year ago

Hi Adam. Not a blocker issue cause anytime when doing comparison check with address from contract we can just use to lower case etc. or with ether.utils.getAddress(>web3onboard returned address>) to get EIP55 address, but it would be nice that it returns the standard EIP55 address so it we consistent with most wallets and other evm tools.

One possible usecase here is when saving connected wallet to a database (say a dapp that returns auth token). Without explicitly converting to EIP55 address, the record in database will be a all-small letter address. When verifying signatures, the address is also needed to be converted ..

ricardo-cavalheiro commented 1 year ago

One possible usecase here is when saving connected wallet to a database (say a dapp that returns auth token). Without explicitly converting to EIP55 address, the record in database will be a all-small letter address. When verifying signatures, the address is also needed to be converted ..

Today our team faced the exact same problem you described. I guess it's a good thing to be EIP-55 compliant.