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

Avoid rendering Approve screen before token data has been retrieved. #10606

Merged
merged 1 commit into from Mar 8, 2021

Conversation

NiranjanaBinoy
Copy link
Contributor

Fixes: #10088

Explanation:

Issue: The approve screen gets rendered before the token Data was retrieved, resulting in errors in the console and white screen flashing before the original page renders.
Fix: The fix is to check for the tokenSymbol value before rendering the <ConfirmTransactionBase/> from confirm-approve.container.js, which in turn calls <ConfirmApproveContent/>. The check is using tokenSymbol as it is the only token data that is being used in the first rendering of <ConfirmApproveContent/>

Manual testing steps:

  • Go to test-dapp
  • Click on Create token, and approve the deploy transaction (ideally on a testnet)
  • Wait for the transaction to be confirmed
  • Click Approve tokens
  • The notification window should pop up, the Approve confirmation screen renders with proper values on the first call and there is no error in the console.

@NiranjanaBinoy NiranjanaBinoy self-assigned this Mar 8, 2021
@NiranjanaBinoy NiranjanaBinoy requested a review from a team as a code owner March 8, 2021 20:32
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2021

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@NiranjanaBinoy NiranjanaBinoy force-pushed the approve-renders-before-tokendata branch from 371e188 to 1b6bb53 Compare March 8, 2021 21:15
@metamaskbot
Copy link
Collaborator

Builds ready [1b6bb53]
Page Load Metrics (573 ± 33 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43815594
domContentLoaded3646495716933
load3666515736933
domInteractive3646495716933

Copy link
Member

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2021
@brad-decker brad-decker reopened this Mar 8, 2021
@NiranjanaBinoy NiranjanaBinoy merged commit 85181aa into develop Mar 8, 2021
@NiranjanaBinoy NiranjanaBinoy deleted the approve-renders-before-tokendata branch March 8, 2021 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Approve screen renders before token data has been retrieved
3 participants