diff --git a/wallets/react-wallet-v2/public/main.css b/wallets/react-wallet-v2/public/main.css index ab997f5..3615e4a 100644 --- a/wallets/react-wallet-v2/public/main.css +++ b/wallets/react-wallet-v2/public/main.css @@ -2,14 +2,6 @@ box-sizing: border-box; } -body, -html { - position: fixed; - height: 100vh; - width: 100vw; - overflow: hidden; -} - .routeTransition { width: 100%; height: 100%; diff --git a/wallets/react-wallet-v2/src/data/EIP155Data.ts b/wallets/react-wallet-v2/src/data/EIP155Data.ts index efc5cee..c9ecf2d 100644 --- a/wallets/react-wallet-v2/src/data/EIP155Data.ts +++ b/wallets/react-wallet-v2/src/data/EIP155Data.ts @@ -43,6 +43,33 @@ export const EIP155_CHAINS = { } } +export const EIP155_TEST_CHAINS = { + 'eip155:4': { + chainId: 4, + name: 'Ethereum Rinkeby', + logo: LOGO_BASE_URL + 'eip155:1.png', + rgb: '99, 125, 234' + }, + 'eip155:69': { + chainId: 69, + name: 'Optimism Kovan', + logo: LOGO_BASE_URL + 'eip155:10.png', + rgb: '233, 1, 1' + }, + 'eip155:80001': { + chainId: 80001, + name: 'Polygon Mumbai', + logo: LOGO_BASE_URL + 'eip155:137.png', + rgb: '130, 71, 229' + }, + 'eip155:421611': { + chainId: 421611, + name: 'Arbitrum Rinkeby', + logo: LOGO_BASE_URL + 'eip155:42161.png', + rgb: '44, 55, 75' + } +} + /** * Methods */ diff --git a/wallets/react-wallet-v2/src/pages/settings.tsx b/wallets/react-wallet-v2/src/pages/settings.tsx index 87de47c..22e64f5 100644 --- a/wallets/react-wallet-v2/src/pages/settings.tsx +++ b/wallets/react-wallet-v2/src/pages/settings.tsx @@ -1,12 +1,15 @@ import PageHeader from '@/components/PageHeader' +import SettingsStore from '@/store/SettingsStore' import { wallet } from '@/utils/WalletUtil' import { Card, Divider, Row, Switch, Text, useTheme } from '@nextui-org/react' import { useTheme as useNextTheme } from 'next-themes' import { Fragment } from 'react' +import { useSnapshot } from 'valtio' export default function SettingsPage() { const { setTheme } = useNextTheme() const { isDark, type } = useTheme() + const { testNets } = useSnapshot(SettingsStore.state) return ( @@ -29,7 +32,8 @@ export default function SettingsPage() { Testnets - Dissabled + + {testNets ? 'Enabled' : 'Disabled'} @@ -38,7 +42,7 @@ export default function SettingsPage() { Theme - setTheme(e.target.checked ? 'dark' : 'light')} />{' '} + setTheme(e.target.checked ? 'dark' : 'light')} /> {type} diff --git a/wallets/react-wallet-v2/src/store/SettingsStore.ts b/wallets/react-wallet-v2/src/store/SettingsStore.ts new file mode 100644 index 0000000..2771f4e --- /dev/null +++ b/wallets/react-wallet-v2/src/store/SettingsStore.ts @@ -0,0 +1,28 @@ +import { proxy } from 'valtio' + +/** + * Types + */ +interface State { + testNets: boolean +} + +/** + * State + */ +const state = proxy({ + testNets: false +}) + +/** + * Store / Actions + */ +const SettingsStore = { + state, + + toggleTestNets() { + state.testNets = !state.testNets + } +} + +export default SettingsStore