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

Navigate to Accounts Page when No Account is Available #191

Merged

Conversation

h0ngcha0
Copy link
Member

@h0ngcha0 h0ngcha0 commented Apr 20, 2024

Need to reject the current action before going to the accounts page, otherwise it will end up in a loop, causing black screen.
See discussion here.

@@ -280,7 +280,8 @@ export const ApproveTransactionScreen: FC<ApproveTransactionScreenProps> = ({
}, [selectedAccount, buildResult, onSubmit, onReject, navigate])

if (!selectedAccount) {
throw Error(`No account found for network ${networkId}`)
rejectAction(actionHash)
return <Navigate to={routes.accounts()} />
Copy link
Member

Choose a reason for hiding this comment

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

Why clicking the reset button would trigger this component?

Copy link
Member Author

@h0ngcha0 h0ngcha0 Apr 20, 2024

Choose a reason for hiding this comment

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

I can't reproduce at all with the reset button, even when resetting while we are on this particular component.
Does it end up in this component every time you click the reset button?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is what clicking reset button shows for me, after clicking reset, it goes back to the welcome screen.

image

Copy link
Member

Choose a reason for hiding this comment

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

Nope. Just happened once.

Copy link
Member

@polarker polarker left a comment

Choose a reason for hiding this comment

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

LGTM

@h0ngcha0 h0ngcha0 merged commit 93e96ec into master Apr 20, 2024
2 checks passed
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.

2 participants