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

Fixes mew #57

Merged
merged 2 commits into from
Dec 16, 2022
Merged

Fixes mew #57

merged 2 commits into from
Dec 16, 2022

Conversation

KillariDev
Copy link
Contributor

Fixes #51

  • Fixes bug that Interceptor only supports single window.ethereum.on() callbacks, now it supports arbitrary many
  • Add window.ethereum.removeListener to remove callback functions
  • Adds eth_getTransactionCount
  • When DApp asks to switch chain, and we are already on that chain, do not ask anything from user and just return

@KillariDev KillariDev added the bug Something isn't working label Dec 16, 2022
@KillariDev KillariDev marked this pull request as ready for review December 16, 2022 15:41
const removeListener = async (kind: OnMessage, callback: any) => {
switch (kind) {
case 'accountsChanged':
window.interceptor.onAccountsChangedCallBacks.delete(callback)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: I'm still not a fan of using globals and would like to see something like dependency injection via function parameters used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MyEtherWallet does not work, figure out why
2 participants