Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e0f491c
refactor(5566): migrate from v5 &v5-compat to react-router-dom-v6
DDDDDanica Nov 25, 2025
6fd0729
refactor(5566): replace react-router-dom-v5-compat with react-router-…
DDDDDanica Nov 26, 2025
0b7c9c4
refactor(5566): update specific test files to use render-helpers-navi…
DDDDDanica Nov 26, 2025
990cb87
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Nov 26, 2025
19c57f1
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Nov 26, 2025
4a0b352
refactor(5566): fix lint and tests
DDDDDanica Nov 26, 2025
fefb413
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Nov 27, 2025
598f154
refactor(5566): fix lint and tests v2
DDDDDanica Nov 27, 2025
66856c6
Update LavaMoat policies
metamaskbot Nov 27, 2025
f88155d
refactor(5566): fix lint and tests v3
DDDDDanica Nov 27, 2025
d215108
Merge remote-tracking branch 'origin/refactor/5566-v6' into refactor/…
DDDDDanica Nov 27, 2025
9b09b4e
refactor(5566): fix LavaMoat - property "history" of globalThis is in…
DDDDDanica Nov 30, 2025
e0d01da
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Nov 30, 2025
3d65598
refactor(5566): fix lint & tests v4
DDDDDanica Nov 30, 2025
1ce4c35
Update LavaMoat policies
metamaskbot Dec 1, 2025
62cb481
refactor(5566): fix lint & tests v5
DDDDDanica Dec 1, 2025
b8a0521
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Dec 1, 2025
4e70d56
refactor(5566): convert permissions-connect to functional component a…
DDDDDanica Dec 1, 2025
c50c837
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Dec 2, 2025
ca38885
refactor(5566): fix lint & tests v6
DDDDDanica Dec 2, 2025
83b0a5c
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Dec 2, 2025
7cd34dc
refactor(5566): fix lint & tests v7
DDDDDanica Dec 2, 2025
83fd4a1
Merge remote-tracking branch 'origin/main' into refactor/5566-v6
DDDDDanica Dec 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 19 additions & 22 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import localeList from '../app/_locales/index.json';
import * as allLocales from './locales';
import { I18nProvider, LegacyI18nProvider } from './i18n';
import testData from './test-data.js';
import { MemoryRouter } from 'react-router-dom';
import { CompatRouter, Routes, Route } from 'react-router-dom-v5-compat';
import { MemoryRouter, Routes, Route } from 'react-router-dom';
import { setBackgroundConnection } from '../ui/store/background-connection';
import { metamaskStorybookTheme } from './metamask-storybook-theme';
import { DocsContainer } from '@storybook/addon-docs';
Expand Down Expand Up @@ -154,27 +153,25 @@ const metamaskDecorator = (story, context) => {
return (
<Provider store={store}>
<MemoryRouter initialEntries={initialEntries}>
<CompatRouter>
<AlertMetricsProvider
metrics={{
trackAlertActionClicked: () => undefined,
trackAlertRender: () => undefined,
trackInlineAlertClicked: () => undefined,
}}
<AlertMetricsProvider
metrics={{
trackAlertActionClicked: () => undefined,
trackAlertRender: () => undefined,
trackInlineAlertClicked: () => undefined,
}}
>
<I18nProvider
currentLocale={currentLocale}
current={current}
en={allLocales.en}
>
<I18nProvider
currentLocale={currentLocale}
current={current}
en={allLocales.en}
>
<LegacyI18nProvider>
<Routes>
<Route path={path} element={<StoryComponent />} />
</Routes>
</LegacyI18nProvider>
</I18nProvider>
</AlertMetricsProvider>
</CompatRouter>
<LegacyI18nProvider>
<Routes>
<Route path={path} element={<StoryComponent />} />
</Routes>
</LegacyI18nProvider>
</I18nProvider>
</AlertMetricsProvider>
</MemoryRouter>
</Provider>
);
Expand Down
1 change: 1 addition & 0 deletions development/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ async function defineAndRunBuildTasks() {
'HTMLElement',
'HTMLFormElement',
'Element',
'history', // needed by react-router-dom v6 HashRouter
'pageXOffset',
'pageYOffset',
'visualViewport',
Expand Down
1 change: 1 addition & 0 deletions development/webpack/utils/plugins/LavamoatPlugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const lavamoatPlugin = (args: Args) =>
'HTMLElement',
'HTMLFormElement',
'Element',
'history', // needed by react-router-dom v6 HashRouter
'pageXOffset',
'pageYOffset',
'visualViewport',
Expand Down
80 changes: 14 additions & 66 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,7 @@
"@reduxjs/toolkit>reselect": true
}
},
"react-router-dom-v5-compat>@remix-run/router": {
"react-router-dom>@remix-run/router": {
"globals": {
"AbortController": true,
"DOMException": true,
Expand All @@ -2275,7 +2275,8 @@
"URL": true,
"URLSearchParams": true,
"console": true,
"document.defaultView": true
"document.defaultView": true,
"history": true
}
},
"@rive-app/react-canvas>@rive-app/canvas": {
Expand Down Expand Up @@ -3292,7 +3293,7 @@
"pageYOffset": true
},
"packages": {
"react-router-dom>tiny-invariant": true
"react-beautiful-dnd>css-box-model>tiny-invariant": true
}
},
"@material-ui/core>@material-ui/styles>jss-plugin-vendor-prefixer>css-vendor": {
Expand Down Expand Up @@ -3787,27 +3788,7 @@
},
"history": {
"globals": {
"console": true,
"define": true,
"document.defaultView": true,
"document.querySelector": true
}
},
"react-router-dom>history": {
"globals": {
"addEventListener": true,
"confirm": true,
"document": true,
"history": true,
"location": true,
"navigator.userAgent": true,
"removeEventListener": true
},
"packages": {
"react-router-dom>history>resolve-pathname": true,
"react-router-dom>tiny-invariant": true,
"react-router-dom>tiny-warning": true,
"react-router-dom>history>value-equal": true
"history": true
}
},
"@toruslabs/eccrypto>elliptic>hmac-drbg": {
Expand Down Expand Up @@ -4016,13 +3997,13 @@
"@material-ui/core>@material-ui/styles>jss-plugin-nested": {
"packages": {
"@babel/runtime": true,
"react-router-dom>tiny-warning": true
"@material-ui/core>@material-ui/styles>jss>tiny-warning": true
}
},
"@material-ui/core>@material-ui/styles>jss-plugin-rule-value-function": {
"packages": {
"@material-ui/core>@material-ui/styles>jss": true,
"react-router-dom>tiny-warning": true
"@material-ui/core>@material-ui/styles>jss>tiny-warning": true
}
},
"@material-ui/core>@material-ui/styles>jss-plugin-vendor-prefixer": {
Expand All @@ -4040,7 +4021,7 @@
"packages": {
"@babel/runtime": true,
"@material-ui/core>@material-ui/styles>jss>is-in-browser": true,
"react-router-dom>tiny-warning": true
"@material-ui/core>@material-ui/styles>jss>tiny-warning": true
}
},
"ethereumjs-util>ethereum-cryptography>keccak": {
Expand Down Expand Up @@ -4320,11 +4301,6 @@
"process": true
}
},
"serve-handler>path-to-regexp": {
"packages": {
"serve-handler>path-to-regexp>isarray": true
}
},
"crypto-browserify>pbkdf2": {
"globals": {
"crypto": true,
Expand Down Expand Up @@ -4660,11 +4636,6 @@
"console": true
}
},
"react-router-dom>react-router>react-is": {
"globals": {
"console": true
}
},
"react-markdown": {
"globals": {
"console.warn": true
Expand Down Expand Up @@ -4728,16 +4699,6 @@
}
},
"react-router-dom": {
"packages": {
"react-router-dom>history": true,
"prop-types": true,
"react": true,
"react-router-dom>react-router": true,
"react-router-dom>tiny-invariant": true,
"react-router-dom>tiny-warning": true
}
},
"react-router-dom-v5-compat": {
"globals": {
"FormData": true,
"URL": true,
Expand All @@ -4747,7 +4708,7 @@
"confirm": true,
"define": true,
"document": true,
"history.scrollRestoration": true,
"history": true,
"location.href": true,
"removeEventListener": true,
"scrollTo": true,
Expand All @@ -4757,33 +4718,20 @@
"setTimeout": true
},
"packages": {
"react-router-dom-v5-compat>@remix-run/router": true,
"history": true,
"react-router-dom>@remix-run/router": true,
"react": true,
"react-dom": true,
"react-router-dom": true,
"react-router-dom-v5-compat>react-router": true
"react-router-dom>react-router": true
}
},
"react-router-dom>react-router": {
"packages": {
"react-router-dom>history": true,
"react-redux>hoist-non-react-statics": true,
"serve-handler>path-to-regexp": true,
"prop-types": true,
"react": true,
"react-router-dom>react-router>react-is": true,
"react-router-dom>tiny-invariant": true,
"react-router-dom>tiny-warning": true
}
},
"react-router-dom-v5-compat>react-router": {
"globals": {
"console.error": true,
"console.warn": true,
"define": true
},
"packages": {
"react-router-dom-v5-compat>@remix-run/router": true,
"react-router-dom>@remix-run/router": true,
"react": true
}
},
Expand Down Expand Up @@ -5336,7 +5284,7 @@
"process": true
}
},
"react-router-dom>tiny-warning": {
"@material-ui/core>@material-ui/styles>jss>tiny-warning": {
"globals": {
"console": true
}
Expand Down
Loading
Loading