1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/pages/confirm-add-suggested-token
Mark Stacey 22f931e6b2
Prevent automatic rejection of confirmations (#13194)
* Prevent automatic rejection of confirmations

Confirmations are now only automatically rejected if a user explicitly
closes the notification window. If we close the window programmatically
because there are no notifications left to show, nothing gets rejected.

This partially avoids a race condition where a confirmation gets
rejected automatically without the user having seen the confirmation
first. This could happen if the confirmation was processed just as the
notification window was being closed.

It's still possible for a confirmation that the user has never seen to
get rejected as a result of the user closing the window. But at least
now it's no longer possible for a confirmation to get rejected in this
manner after the user resolves the last confirmation in the queue.

* Fix bug that prevented automatic closure detection

All windows were being detected as explicit window closures,
essentially just as they were previously, because this variable was
cleared too soon.

* Re-open popup when necessary

After the window is automatically closed, a confirmation may have been
queued up while the window was closing. If so, the popup is now re-
opened.
2022-01-05 13:39:19 -03:30
..
confirm-add-suggested-token.component.js Prevent automatic rejection of confirmations (#13194) 2022-01-05 13:39:19 -03:30
confirm-add-suggested-token.container.js Integrate TokensController (#11552) 2021-09-10 12:37:19 -05:00
confirm-add-suggested-token.stories.js Organizing storybook to echo app folder structure (#12796) 2021-12-01 11:27:57 -08:00
index.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00