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

Allow insights object to be null in onTransactionResponse #929

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Nov 8, 2022

This changes the onTransactionResponse type to allow the insights object to be null.

Fixes: #901
See: MetaMask/metamask-extension#16416

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner November 8, 2022 11:34
@Mrtenz
Copy link
Member

Mrtenz commented Nov 8, 2022

What happens if a Snap just returns null, rather than { insights: null }?

@GuillaumeRx
Copy link
Contributor Author

What happens if a Snap just returns null, rather than { insights: null }?

Infinite loading :/ Might want to also catch that even if the types don't allow it

@Mrtenz
Copy link
Member

Mrtenz commented Nov 8, 2022

Yes, we definitely need to handle that.

@GuillaumeRx
Copy link
Contributor Author

Yes, we definitely need to handle that.

Added in MetaMask/metamask-extension@36fcf0c (#16416)

@GuillaumeRx GuillaumeRx merged commit d017ab0 into main Nov 8, 2022
@GuillaumeRx GuillaumeRx deleted the gr/allow-null-on-transaction branch November 8, 2022 14:10
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

Successfully merging this pull request may close these issues.

Add empty/error state for transaction insights
3 participants