Skip to content

fix: "createSlice.extraReducers" warning #33030

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HowardBraham
Copy link
Contributor

@HowardBraham HowardBraham commented May 16, 2025

Description

Fixes this warning that happens in almost every unit test

console.warn
      The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice

      15 | import confirmAlertsReducer from './confirm-alerts/confirm-alerts';
      16 |
    > 17 | export default combineReducers({
         |                               ^
      18 |   [AlertTypes.invalidCustomNetwork]: invalidCustomNetwork,
      19 |   [AlertTypes.unconnectedAccount]: unconnectedAccount,
      20 |   activeTab: (s) => (s === undefined ? null : s),

      at buildReducer (node_modules/@reduxjs/toolkit/src/createSlice.ts:356:21)
      at reducer (node_modules/@reduxjs/toolkit/src/createSlice.ts:379:23)
      at node_modules/redux/lib/redux.js:476:24
          at Array.forEach (<anonymous>)
      at assertReducerShape (node_modules/redux/lib/redux.js:474:25)
      at combineReducers (node_modules/redux/lib/redux.js:539:5)
      at Object.<anonymous> (ui/ducks/index.js:17:31)
      at Object.require (ui/store/store.ts:4:1)
      at Object.require (ui/components/multichain/account-list-item/account-list-item.test.js:6:1)

Open in GitHub Codespaces

Copy link
Contributor

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.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label May 16, 2025
@HowardBraham HowardBraham marked this pull request as ready for review May 16, 2025 18:27
@metamaskbot
Copy link
Collaborator

Builds ready [18e0261]
UI Startup Metrics (1210 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1210111014375812441309
load105095211865410821146
domContentLoaded104494811815510741141
domInteractive16133131624
firstPaint67973115541710571128
backgroundConnect84335823
firstReactRender20145062038
getState1463571927
initialActions001001
loadScripts80571293553837907
setupStore85243812
WebpackHomeuiStartup22141785259617923492529
load17301355221615318221965
domContentLoaded17231352221015218191954
domInteractive15124981444
firstPaint1597135855175274
backgroundConnect2910212233462
firstReactRender15344361107263338
getState1353771831
initialActions319146
loadScripts17181350220815118171929
setupStore207184242238
FirefoxBrowserifyHomeuiStartup13611181200112714251594
load1202103414679912751391
domContentLoaded1202103414679912751391
domInteractive1074127337121178
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2513259312271
firstReactRender25195692355
getState11521327812
initialActions001001
loadScripts1181101713859412521359
setupStore9420320720
WebpackHomeuiStartup15381363196413115981826
load13211178172311713911571
domContentLoaded13211178172311813911571
domInteractive79351371886123
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21144352333
firstReactRender34294543542
getState95345922
initialActions102111
loadScripts13021157170911813751552
setupStore85344820
Benchmark value 24 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2215 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1731 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1724 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1719 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2529 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 71 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Sum of mean exceeds: 85ms | Sum of p95 exceeds: 82ms
Sum of all benchmark exceeds: 167ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 14 Bytes (0%)

@HowardBraham HowardBraham enabled auto-merge May 16, 2025 19:57
@HowardBraham HowardBraham requested review from seaona and chloeYue May 16, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-extension-platform Extension Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants