Skip to content

Fix UI getting stuck in Reveal Seed screen#4004

Merged
danfinlay merged 1 commit intomasterfrom
i3955-reveal-seed
Apr 18, 2018
Merged

Fix UI getting stuck in Reveal Seed screen#4004
danfinlay merged 1 commit intomasterfrom
i3955-reveal-seed

Conversation

@alextsg
Copy link
Copy Markdown
Contributor

@alextsg alextsg commented Apr 18, 2018

Fixes #3955

Utilizes an existing flag called isRevealingSeedWords that was not being used and persists it using the ConfigManager. The flag gets set to true only when the user initiates the action to reveal his seed words, and is false during the first time flow. In the seed phrase page, if isRevealingSeedWords is true then the user can hit the "Done" button (as opposed to "Next" in the first time flow) to skip the confirmation screen.

reveal-seed

Furthermore, previously if the user was stuck in the seed phrase page and tried reloading the UI, nothing would happen since the seedWords property in state was still populated with the seed words which redirects the user back to the same page. This PR adds a check when the app is mounted to clear the seed words if isRevealingSeedWords is true, so the user should get redirected to the account detail page instead.

@alextsg alextsg force-pushed the i3955-reveal-seed branch from 1d84400 to 2c8156e Compare April 18, 2018 17:18
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [2c8156e]: mascara, chrome, firefox, edge, opera

@danfinlay danfinlay merged commit 0a14ced into master Apr 18, 2018
@danfinlay danfinlay deleted the i3955-reveal-seed branch April 18, 2018 18:44
pedronfigueiredo added a commit that referenced this pull request Mar 26, 2024
## **Description**

The temporary solution is to:

- Prevent two network controller requests by:
- Patch the network controller so that the lookup on
initializeProvidercan be avoided.
- Call that initializeProvider with the lookup: false argument right
after the network controller is constructed
- Call await this.networkController.lookupNetwork(); at the end of the
metamask controller if the onboarding has been completed
- Call await this.networkController.lookupNetwork(); once the onboarding
complete state changes
- Prevent one accounts tracker request by:
- Moving the blockTracker event listener from the constructor of the
controller to the start function

The long term solution will be
[#23005](#23005)
(currently blocked by [#4004 on
core](MetaMask/core#4004).


## **Related issues**

Fixes: MetaMask/MetaMask-planning#881

## **Manual testing steps**

1. Add `await new Promise((resolve) => setTimeout(resolve, 10000));` to
the top of initialize on the background.js file
2. Build the app
3. Load extension and immediately open the network tab on the background
console before the app initializes
4. No requests should happen

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**




https://github.com/MetaMask/metamask-extension/assets/7499938/73513327-90fb-4e9f-8af2-aa41c731b647





### **After**



https://github.com/MetaMask/metamask-extension/assets/7499938/d6dee1c6-fa13-48c8-9fe2-520e3d43d0b3



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
pedronfigueiredo added a commit that referenced this pull request Mar 26, 2024
## **Description**

The temporary solution is to:

- Prevent two network controller requests by:
- Patch the network controller so that the lookup on
initializeProvidercan be avoided.
- Call that initializeProvider with the lookup: false argument right
after the network controller is constructed
- Call await this.networkController.lookupNetwork(); at the end of the
metamask controller if the onboarding has been completed
- Call await this.networkController.lookupNetwork(); once the onboarding
complete state changes
- Prevent one accounts tracker request by:
- Moving the blockTracker event listener from the constructor of the
controller to the start function

The long term solution will be
[#23005](#23005)
(currently blocked by [#4004 on
core](MetaMask/core#4004).


## **Related issues**

Fixes: MetaMask/MetaMask-planning#881

## **Manual testing steps**

1. Add `await new Promise((resolve) => setTimeout(resolve, 10000));` to
the top of initialize on the background.js file
2. Build the app
3. Load extension and immediately open the network tab on the background
console before the app initializes
4. No requests should happen

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**




https://github.com/MetaMask/metamask-extension/assets/7499938/73513327-90fb-4e9f-8af2-aa41c731b647





### **After**



https://github.com/MetaMask/metamask-extension/assets/7499938/d6dee1c6-fa13-48c8-9fe2-520e3d43d0b3



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
pedronfigueiredo added a commit that referenced this pull request Mar 26, 2024
…) (#23730)

## **Description**

The temporary solution is to:

- Prevent two network controller requests by:
- Patch the network controller so that the lookup on
initializeProvidercan be avoided.
- Call that initializeProvider with the lookup: false argument right
after the network controller is constructed
- Call await this.networkController.lookupNetwork(); at the end of the
metamask controller if the onboarding has been completed
- Call await this.networkController.lookupNetwork(); once the onboarding
complete state changes
- Prevent one accounts tracker request by:
- Moving the blockTracker event listener from the constructor of the
controller to the start function

The long term solution will be
[#23005](#23005)
(currently blocked by [#4004 on
core](MetaMask/core#4004).


## **Related issues**

Fixes: MetaMask/MetaMask-planning#881

## **Manual testing steps**

1. Add `await new Promise((resolve) => setTimeout(resolve, 10000));` to
the top of initialize on the background.js file
2. Build the app
3. Load extension and immediately open the network tab on the background
console before the app initializes
4. No requests should happen

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**





https://github.com/MetaMask/metamask-extension/assets/7499938/73513327-90fb-4e9f-8af2-aa41c731b647





### **After**




https://github.com/MetaMask/metamask-extension/assets/7499938/d6dee1c6-fa13-48c8-9fe2-520e3d43d0b3



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------


<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23730?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
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.

4 participants