1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
metamask-extension/test/unit
Mark Stacey 53feb20803
Alert user upon switching to unconnected account (#8312)
An alert is now shown when the user switches from an account that is
connected to the active tab to an account that is not connected. The
alert prompts the user to dismiss the alert or connect the account
they're switching to.

The "loading" state is handled by disabling the buttons, and the error
state is handled by displaying a generic error message and disabling
the connect button.

The new reducer for this alert has been created with `createSlice` from
the Redux Toolkit. This utility is recommended by the Redux team, and
represents a new style of writing reducers that I hope we will use more
in the future (or at least something similar). `createSlice` constructs
a reducer, actions, and action creators automatically. The reducer is
constructed using their `createReducer` helper, which uses Immer to
allow directly mutating the state in the reducer but exposing these
changes as immutable.
2020-04-29 14:10:51 -03:00
..
actions Correctly detect changes to background state (#8435) 2020-04-28 10:40:28 -03:00
app Mark PendingTransactionTracker#resubmitPendingTxs as async (#8399) 2020-04-27 13:24:39 -02:30
migrations Delete Dai/Sai migration notification (#8418) 2020-04-27 16:23:43 -02:30
responsive/components Remove redux-test-utils dependency (#8070) 2020-02-18 14:54:03 -03:30
ui Alert user upon switching to unconnected account (#8312) 2020-04-29 14:10:51 -03:00
balance-formatter-test.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
localhostState.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30