Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when sending tip with default token (eth). tokenAddressToDetails for "0x0" token address returns null. #3877

Closed
dylanjw opened this issue Mar 5, 2019 · 0 comments

Comments

@dylanjw
Copy link
Contributor

dylanjw commented Mar 5, 2019

Describe the bug
The issue occurs when sending a tip without clicking the token drop-down and selecting Eth, but instead just letting Eth be the default selection option. In this case, the token address is "0x0" instead of "0x0000000000000000000000000000000000000000". The js function tokenAddressToDetails returns null when the address is 0x0. Javascript console:

> tokenAddressToDetails("0x0");
null
> tokenAddressToDetails("0x0000000000000000000000000000000000000000");
Object { addr: "0x0000000000000000000000000000000000000000", name: "ETH", decimals: 18, priority: 999 }

To Reproduce

I think the real issue is that tokenAddressToDetails returns null. So to reproduce, just run:
tokenAddressToDetails("0x0"); in the console.

Expected behavior
tokenAddressToDetails("0x0"); should return the token details for Eth.

Additional context
I found this issue while working on (#2250) displaying an error message when sending a tip with an insufficient token balance, but there appears to be many places where it looks like `tokenAddressToDetails("0x0"); is assumed to return valid token details.

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

No branches or pull requests

2 participants