1
1
import { PageUIProvider , PersonaContext } from '@masknet/shared'
2
- import { jsxCompose , MaskMessages , PopupRoutes } from '@masknet/shared-base'
2
+ import { MaskMessages , PopupRoutes } from '@masknet/shared-base'
3
3
import { PopupSnackbarProvider } from '@masknet/theme'
4
4
import { EVMWeb3ContextProvider } from '@masknet/web3-hooks-base'
5
5
import { ProviderType } from '@masknet/web3-shared-evm'
6
6
import { Box } from '@mui/material'
7
- import { Suspense , cloneElement , lazy , memo , useEffect , useMemo , useState , type ReactNode } from 'react'
7
+ import { Suspense , lazy , memo , useEffect , useMemo , useState , type ReactNode } from 'react'
8
8
import { useIdleTimer } from 'react-idle-timer'
9
9
import {
10
10
createHashRouter ,
@@ -30,6 +30,7 @@ import { WalletFrame, walletRoutes } from './pages/Wallet/index.js'
30
30
import { ContactsFrame , contactsRoutes } from './pages/Friends/index.js'
31
31
import { ErrorBoundaryUIOfError } from '../../shared-base-ui/src/components/ErrorBoundary/ErrorBoundary.js'
32
32
import { TraderFrame , traderRoutes } from './pages/Trader/index.js'
33
+ import { InteractionWalletContext } from './pages/Wallet/Interaction/InteractionContext.js'
33
34
34
35
const personaInitialState = {
35
36
queryOwnedPersonaInformation : Services . Identity . queryOwnedPersonaInformation ,
@@ -108,23 +109,31 @@ export default function Popups() {
108
109
throttle : 10000 ,
109
110
} )
110
111
111
- return jsxCompose (
112
- < PersistQueryClientProvider client = { queryClient } persistOptions = { queryPersistOptions } /> ,
113
- // eslint-disable-next-line react-compiler/react-compiler
114
- < PageUIProvider useTheme = { usePopupTheme } /> ,
115
- < PopupSnackbarProvider children = { null ! } /> ,
116
- < EVMWeb3ContextProvider providerType = { ProviderType . MaskWallet } /> ,
117
- < PopupContext /> ,
118
- < PageTitleContext value = { titleContext } /> ,
119
- ) (
120
- cloneElement ,
121
- < >
122
- { /* https://github.com/TanStack/query/issues/5417 */ }
123
- { process . env . NODE_ENV === 'development' ?
124
- < ReactQueryDevtools buttonPosition = "bottom-right" />
125
- : null }
126
- < RouterProvider router = { router } fallbackElement = { pending } future = { { v7_startTransition : true } } />
127
- </ > ,
112
+ return (
113
+ < PersistQueryClientProvider client = { queryClient } persistOptions = { queryPersistOptions } >
114
+ { /* eslint-disable-next-line react-compiler/react-compiler */ }
115
+ < PageUIProvider useTheme = { usePopupTheme } >
116
+ < PopupSnackbarProvider >
117
+ < EVMWeb3ContextProvider providerType = { ProviderType . MaskWallet } >
118
+ < InteractionWalletContext >
119
+ < PopupContext >
120
+ < PageTitleContext value = { titleContext } >
121
+ { /* https://github.com/TanStack/query/issues/5417 */ }
122
+ { process . env . NODE_ENV === 'development' ?
123
+ < ReactQueryDevtools buttonPosition = "bottom-right" />
124
+ : null }
125
+ < RouterProvider
126
+ router = { router }
127
+ fallbackElement = { pending }
128
+ future = { { v7_startTransition : true } }
129
+ />
130
+ </ PageTitleContext >
131
+ </ PopupContext >
132
+ </ InteractionWalletContext >
133
+ </ EVMWeb3ContextProvider >
134
+ </ PopupSnackbarProvider >
135
+ </ PageUIProvider >
136
+ </ PersistQueryClientProvider >
128
137
)
129
138
}
130
139
0 commit comments