prep everything for wallet management
This commit is contained in:
parent
6d9e902bbc
commit
5301fd10e4
@ -8,13 +8,19 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@walletconnect/client": "2.0.0-beta.22",
|
||||
"@walletconnect/utils": "2.0.0-beta.22",
|
||||
"@walletconnect/jsonrpc-utils": "1.0.0",
|
||||
"@nextui-org/react": "1.0.2-beta.3",
|
||||
"next": "12.0.10",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
"react-dom": "17.0.2",
|
||||
"ethers": "5.5.4",
|
||||
"keyvaluestorage": "0.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.14",
|
||||
"@walletconnect/types": "2.0.0-beta.22",
|
||||
"@types/node": "17.0.14",
|
||||
"@types/react": "17.0.38",
|
||||
"eslint": "8.8.0",
|
||||
"eslint-config-next": "12.0.10",
|
||||
|
19
wallets/react-wallet-v2/src/components/PageHeader.tsx
Normal file
19
wallets/react-wallet-v2/src/components/PageHeader.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import { Text } from '@nextui-org/react'
|
||||
|
||||
interface Props {
|
||||
children: string
|
||||
}
|
||||
|
||||
export default function PageHeader({ children }: Props) {
|
||||
return (
|
||||
<Text
|
||||
h3
|
||||
css={{
|
||||
textGradient: '45deg, $cyan300 -30%, $green600 100%'
|
||||
}}
|
||||
weight="bold"
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
)
|
||||
}
|
28
wallets/react-wallet-v2/src/contexts/WalletContext.tsx
Normal file
28
wallets/react-wallet-v2/src/contexts/WalletContext.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import { createContext, ReactNode, useState } from 'react'
|
||||
|
||||
/**
|
||||
* Types
|
||||
*/
|
||||
interface State {}
|
||||
|
||||
interface Props {
|
||||
children: ReactNode | ReactNode[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Context
|
||||
*/
|
||||
export const WalletContext = createContext<State>({})
|
||||
|
||||
/**
|
||||
* Provider
|
||||
*/
|
||||
export function WalletContextProvider({ children }: Props) {
|
||||
const [state, setState] = useState<State>({})
|
||||
|
||||
const actions = {
|
||||
async initialise() {}
|
||||
}
|
||||
|
||||
return <WalletContext.Provider value={{ state, actions }}>{children}</WalletContext.Provider>
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import Layout from '@/components/Layout'
|
||||
import { WalletContextProvider } from '@/contexts/WalletContext'
|
||||
import { theme } from '@/utils/ThemeUtil'
|
||||
import { NextUIProvider } from '@nextui-org/react'
|
||||
import { AppProps } from 'next/app'
|
||||
@ -6,9 +7,11 @@ import { AppProps } from 'next/app'
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
<NextUIProvider theme={theme}>
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
<WalletContextProvider>
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
</WalletContextProvider>
|
||||
</NextUIProvider>
|
||||
)
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import PageHeader from '@/components/PageHeader'
|
||||
|
||||
export default function HomePage() {
|
||||
return <h1>Accounts</h1>
|
||||
return <PageHeader>Accounts</PageHeader>
|
||||
}
|
||||
|
0
wallets/react-wallet-v2/src/utils/WalletUtil.ts
Normal file
0
wallets/react-wallet-v2/src/utils/WalletUtil.ts
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user