Skip to content

Conversation

@anton-lisanin
Copy link
Contributor

After this Metamask will correctly display gas limit for Neon transfer to non existing account

@anton-lisanin anton-lisanin self-assigned this Mar 14, 2022
@anton-lisanin anton-lisanin changed the title Fix eth_estimageGas for Metamask transfer Fix eth_estimateGas for Metamask transfer Mar 14, 2022
self.data = request.get('data', '0x')[2:]
self.sender = request.get('from') or '0x0000000000000000000000000000000000000000'
if self.sender:
self.sender = self.sender[2:]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, the previous realization is the same, but shorter

Copy link
Contributor Author

@anton-lisanin anton-lisanin Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the same, but it is not.
request.get('data', '0x') can return valid hex string, empty string, '0x', or None
And if it is empty string or None it will cause exception

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.

4 participants