Repository navigation
Conversation
sim_fundAccount returned a success-looking result hash but silently credited nothing when passed a lowercase address (e.g. from MetaMask). Ethereum JSON-RPC addresses are case-insensitive, so normalize to checksum format before the lookup. Closes genlayerlabs#1788
|
This PR targeted I retargeted it to |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #1788:
sim_fundAccountreturned a success-looking result hash but silently credited nothing when passed a lowercase address (e.g. from MetaMask). Ethereum JSON-RPC addresses are case-insensitive, so normalize to checksum format before the lookup.Changes
backend/protocol_rpc/endpoints.py: addedto_checksum_addressnormalization after address validationtests/unit/test_simulator_sessions.py: added test for lowercase address normalizationImpact
Wallets such as MetaMask return lowercase addresses from
eth_accounts, so a faucet button that passes the connected address silently did nothing. Now the address is properly normalized before crediting.🤖 Generated with Claude Code
Summary by CodeRabbit