mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 18:41:38 +01:00
53feb20803
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. |
||
---|---|---|
.. | ||
add-token | ||
confirm-add-suggested-token | ||
confirm-add-token | ||
confirm-approve | ||
confirm-decrypt-message | ||
confirm-deploy-contract | ||
confirm-encryption-public-key | ||
confirm-send-ether | ||
confirm-send-token | ||
confirm-token-transaction-base | ||
confirm-transaction | ||
confirm-transaction-base | ||
confirm-transaction-switch | ||
connected-sites | ||
create-account | ||
error | ||
first-time-flow | ||
home | ||
keychains | ||
lock | ||
mobile-sync | ||
permissions-connect | ||
routes | ||
send | ||
settings | ||
unlock-page | ||
index.js | ||
index.scss |