53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
import React, { useState } from 'react'
|
|
import Head from 'next/head'
|
|
import { ThemeProvider } from '@material-ui/core/styles'
|
|
import CssBaseline from '@material-ui/core/CssBaseline'
|
|
import { theme } from '../lib/theme'
|
|
import type { AppProps } from 'next/app'
|
|
import { ValidatorClientContext } from '../contexts/ValidatorClient'
|
|
// TODO: should it perhaps be pulled from some config or also user provided?
|
|
export const BONDING_CONTRACT_ADDRESS: string =
|
|
'punk10pyejy66429refv3g35g2t7am0was7yalwrzen'
|
|
export const VALIDATOR_URLS: string[] = [
|
|
'https://testnet-milhon-validator1.nymtech.net',
|
|
'https://testnet-milhon-validator2.nymtech.net',
|
|
]
|
|
export const ADDRESS_LENGTH: number = 43
|
|
export const ADMIN_ADDRESS: string =
|
|
'punk1h3w4nj7kny5dfyjw2le4vm74z03v9vd4dstpu0'
|
|
export const DENOM: string = 'punk' // used everywhere else
|
|
export const KEY_LENGTH: number = 32
|
|
export const UDENOM: string = 'upunk' // required for client and coin construction
|
|
|
|
export default function Application(props: AppProps) {
|
|
const { Component, pageProps } = props
|
|
|
|
const [client, setClient] = useState(null)
|
|
|
|
React.useEffect(() => {
|
|
const jssStyles = document.querySelector('#jss-server-side')
|
|
if (jssStyles) {
|
|
jssStyles.parentElement.removeChild(jssStyles)
|
|
}
|
|
}, [])
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<Head>
|
|
<meta charSet="utf-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="minimum-scale=1, initial-scale=1, width=device-width"
|
|
/>
|
|
<title>Nym</title>
|
|
</Head>
|
|
<ValidatorClientContext.Provider value={{ client, setClient }}>
|
|
<ThemeProvider theme={theme}>
|
|
<CssBaseline />
|
|
<Component {...pageProps} />
|
|
</ThemeProvider>
|
|
</ValidatorClientContext.Provider>
|
|
</React.Fragment>
|
|
)
|
|
}
|