-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 updates #2856
Merged
Merged
EIP-1193 updates #2856
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Another solution is to add `isEIP1193' property to Web3EthereumProvider class. @nivida What do you think? |
nivida
changed the title
Resolve Web3EthereumProvider intead of CustomProvider for Eth and Shh module
EIP-1193 updates
May 29, 2019
nivida
suggested changes
May 30, 2019
nivida
added
Bug
Addressing a bug
In Progress
Currently being worked on
and removed
On Ice
Important but no longer pursued for the near future
labels
May 30, 2019
JunichiSugiura
force-pushed
the
hotfix/provider-resolver
branch
from
June 1, 2019 05:51
1869c19
to
f2b3082
Compare
@nivida I applied your change request and added a test for the resolver logic. Could you review this again? |
nivida
approved these changes
Jun 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, if we instantiate Web3 with EIP1193 compatible provider, the provider resolver resolves CustomProvider for Eth and Shh module. This causes that the provider's send method receives payload as the first argument and callback function as the second argument when a dapp calls
web3.eth.getAccounts()
for example.Code to reproduce
I added another condition for the resolver to check if the provider is Web3EthereumProvider then return the provider itself.
I hope this helps.
Type of change
Checklist:
npm run test
in the root folder with success and extended the tests if necessary.npm run build
in the root folder and tested it in the browser and with node.npm run dtslint
in the root folder and tested that all my types are correct