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

onTransaction is called repeatedly #828

Closed
ritave opened this issue Oct 8, 2022 · 4 comments · Fixed by MetaMask/metamask-extension#16205
Closed

onTransaction is called repeatedly #828

ritave opened this issue Oct 8, 2022 · 4 comments · Fixed by MetaMask/metamask-extension#16205
Assignees
Labels
type-bug Something isn't working

Comments

@ritave
Copy link
Contributor

ritave commented Oct 8, 2022

When a user selects the snap tabntje onTransaction is not called once but recalled multiple times into infinity

@FrederikBolding
Copy link
Member

My guess would be that the component rerenders more often than we think and our current hook doesn't expect that.

cc @GuillaumeRx

@FrederikBolding FrederikBolding added the type-bug Something isn't working label Oct 10, 2022
@GuillaumeRx
Copy link
Contributor

Yes, it seems like one of the parent components updates more often then we thought. This may be due to the transaction logic.

Duplicate of #816

@ritave
Copy link
Contributor Author

ritave commented Oct 10, 2022

The call should happen only the first time during the first render and then the data should be cached in the UI

@FrederikBolding
Copy link
Member

The call should happen only the first time during the first render and then the data should be cached in the UI

Opened a PR that fixes this, but have asked for feedback from the extension team

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

Successfully merging a pull request may close this issue.

3 participants