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

Close notification UI if no unapproved confirmations #8358

Merged
merged 8 commits into from
Apr 20, 2020

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Apr 17, 2020

Fixes #8348 (well enough)

Attempts to resolve #8348 by ensuring that the notification UI is closed if there are no unapproved confirmations to approve.

Unapproved confirmations include (exhaustively):

  • unapprovedMsgCount
  • unapprovedPersonalMsgCount
  • unapprovedTypedMessagesCount
  • unapprovedDecryptMsgCount
  • unapprovedEncryptionPublicKeyMsgCount
  • unapprovedTxCount
  • suggestedTokenCount
  • permissionsRequestCount

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Aside from the one requested change, I think this looks good! Definitely deserves a QA pass though. I'm going to check this out on Monday locally and use it a bit to ensure it works as expected.

ui/app/pages/home/home.component.js Show resolved Hide resolved
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

There are two things not considered in the current check: connect requests, and suggested tokens. Both of these can already be checked by existing props (firstPermissionRequestId and suggestedTokens), so it should be simple enough to add those to the condition.

ui/app/pages/home/home.component.js Show resolved Hide resolved
@rekmarks rekmarks force-pushed the close-notification branch from b3e258d to a8e8287 Compare April 20, 2020 16:06
@metamaskbot
Copy link
Collaborator

Builds ready [79b96ce]

@rekmarks rekmarks requested a review from Gudahtt April 20, 2020 16:33
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@rekmarks rekmarks merged commit 62777a8 into develop Apr 20, 2020
@rekmarks rekmarks deleted the close-notification branch April 20, 2020 17:21
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Apr 27, 2020
* close notification UI if no pending confirmations

* change benchmark page to 'home'
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Apr 27, 2020
* close notification UI if no pending confirmations

* change benchmark page to 'home'
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Apr 27, 2020
* close notification UI if no pending confirmations

* change benchmark page to 'home'
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Apr 27, 2020
* close notification UI if no pending confirmations

* change benchmark page to 'home'
Gudahtt added a commit that referenced this pull request Apr 28, 2020
The page tested by the benchmark was changed from `notification` to
`home` in #8358, but the announce script was still expecting the
`notification` page to be in the results. It does collect results for
all pages, but the `notification` page was hard-coded to be used for
the benchmark summary.

The announce script now correctly looks for the `home` page results for
the benchmark summary. Variable names have been updated to make it more
clear what's going on here as well.
Gudahtt added a commit that referenced this pull request Apr 28, 2020
The page tested by the benchmark was changed from `notification` to
`home` in #8358, but the announce script was still expecting the
`notification` page to be in the results. It does collect results for
all pages, but the `notification` page was hard-coded to be used for
the benchmark summary.

The announce script now correctly looks for the `home` page results for
the benchmark summary. Variable names have been updated to make it more
clear what's going on here as well.
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.

develop: Notification popup displays home page instead of confirmation
3 participants