Skip to content

Commit

Permalink
Remove platform context based on review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
simoarpe committed Nov 9, 2023
1 parent c5cc648 commit 4b88a6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
14 changes: 0 additions & 14 deletions components/brave_wallet_ui/common/context/platform.context.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
CardHeaderContentWrapper
} from './wallet-page-wrapper.style'

import { PlatformContext } from '../../../common/context/platform.context'
import { loadTimeData } from '../../../../common/loadTimeData'

export interface Props {
wrapContentInBox?: boolean
Expand Down Expand Up @@ -78,7 +78,7 @@ export const WalletPageWrapper = (props: Props) => {
useDarkBackground
} = props

const { isAndroid } = React.useContext(PlatformContext)
const isAndroid = loadTimeData.getBoolean('isAndroid') || false

// Wallet Selectors (safe)
const isWalletCreated = useSafeWalletSelector(WalletSelectors.isWalletCreated)
Expand Down
10 changes: 1 addition & 9 deletions components/brave_wallet_ui/page/wallet_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import 'emptykit.css'
import { setIconBasePath } from '@brave/leo/react/icon'
setIconBasePath('chrome://resources/brave-icons')

import { PlatformContext } from '../common/context/platform.context'

function App () {

React.useEffect(() => {
Expand All @@ -56,10 +54,6 @@ function App () {
removeDeprecatedLocalStorageKeys()
}, [])

const platformInfo = {
isAndroid: loadTimeData.getBoolean('isAndroid') || false
}

return (
<Provider store={store}>
<BrowserRouter>
Expand All @@ -69,9 +63,7 @@ function App () {
>
<ApiProxyContext.Provider value={walletPageApiProxy}>
<LibContext.Provider value={Lib}>
<PlatformContext.Provider value={platformInfo}>
<Container />
</PlatformContext.Provider>
<Container />
</LibContext.Provider>
</ApiProxyContext.Provider>
</BraveCoreThemeProvider>
Expand Down

0 comments on commit 4b88a6f

Please sign in to comment.