-
Notifications
You must be signed in to change notification settings - Fork 470
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
EIP-1193 crash if no ethereum object #545
Comments
Can you provide a code sample? Which line exactly crashes the app? |
The ethereum object is undefined.
It should return an error when the ethereum object is not present. That's line rust-web3/src/transports/eip_1193.rs Line 225 in 2e2d1df
|
Sorry, but this is not specific enough for me. What do you mean by "it should return an error"? Which part of the code should error out? The way I see it is we could change the bindgen to return Can you please share the exact code you are using and how you expect this to be handled? |
Yes, returning an Option is fine, no need for an error.
instead of rust-web3/src/transports/eip_1193.rs Line 233 in 2e2d1df
and
instead of rust-web3/src/transports/eip_1193.rs Line 281 in 2e2d1df
I will send a PR. |
Would be cool if it returned a nice error message when the user has no compatible wallet installed with their browser instead of crashing.
The text was updated successfully, but these errors were encountered: