trustwallet / trust-web3-provider

Web3 javascript wrapper provider for iOS and Android platforms.
https://trustwallet.com
760 stars 423 forks source link

[Bug] Ethereum Provider - Address is not in lower case #505

Open Grinion opened 7 months ago

Grinion commented 7 months ago

Hello,

At runtime, this.address parameter contains a value that is not in the lowercase - therefore this condition cannot be true. https://github.com/trustwallet/trust-web3-provider/blob/2bfd36ade2ac2275782969dcae5ac6bf3d608054/src/ethereum_provider.js#L305

In the method setAddress that sets this value, it is converted to lowercase. There may be other places where this value is set. https://github.com/trustwallet/trust-web3-provider/blob/2bfd36ade2ac2275782969dcae5ac6bf3d608054/src/ethereum_provider.js#L31C3-L31C13