Remove addresses, display non-refundable warning (#3403)

This commit is contained in:
Jaco Greeff 2016-11-12 22:28:50 +01:00 committed by Gav Wood
parent c57738b9b6
commit 3ff9c3e6d6
6 changed files with 44 additions and 13 deletions

View File

@ -49,3 +49,15 @@
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }
} }
.warning {
background: #f80;
bottom: 0;
color: #fff;
left: 0;
opacity: 1;
padding: 1.5em;
position: fixed;
right: 50%;
z-index: 100;
}

View File

@ -53,6 +53,7 @@ export default class Application extends Component {
}; };
render () { render () {
const { api } = window.parity;
const { const {
actions, actions,
accounts, contacts, accounts, contacts,
@ -60,9 +61,11 @@ export default class Application extends Component {
lookup, lookup,
events events
} = this.props; } = this.props;
let warning = null;
return ( return (
<div> <div>
{ warning }
<div className={ styles.header }> <div className={ styles.header }>
<h1>RΞgistry</h1> <h1>RΞgistry</h1>
<Accounts { ...accounts } actions={ actions.accounts } /> <Accounts { ...accounts } actions={ actions.accounts } />
@ -70,13 +73,11 @@ export default class Application extends Component {
{ contract && fee ? ( { contract && fee ? (
<div> <div>
<Lookup { ...lookup } accounts={ accounts.all } contacts={ contacts } actions={ actions.lookup } /> <Lookup { ...lookup } accounts={ accounts.all } contacts={ contacts } actions={ actions.lookup } />
{ this.renderActions() } { this.renderActions() }
<Events { ...events } accounts={ accounts.all } contacts={ contacts } actions={ actions.events } /> <Events { ...events } accounts={ accounts.all } contacts={ contacts } actions={ actions.events } />
<p className={ styles.address }> <div className={ styles.warning }>
The Registry is provided by the contract at <code>{ contract.address }.</code> WARNING: The name registry is experimental. Please ensure that you understand the risks, benefits & consequences of registering a name before doing so. A non-refundable fee of { api.util.fromWei(fee).toFormat(3) }<small>ETH</small> is required for all registrations.
</p> </div>
</div> </div>
) : ( ) : (
<CircularProgress size={ 60 } /> <CircularProgress size={ 60 } />

View File

@ -20,3 +20,15 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.warning {
background: #f80;
bottom: 0;
color: #fff;
left: 0;
opacity: 1;
padding: 1.5em;
position: fixed;
right: 50%;
z-index: 100;
}

View File

@ -17,6 +17,8 @@
import React, { Component, PropTypes } from 'react'; import React, { Component, PropTypes } from 'react';
import getMuiTheme from 'material-ui/styles/getMuiTheme'; import getMuiTheme from 'material-ui/styles/getMuiTheme';
import { api } from '../parity';
import Loading from '../Loading'; import Loading from '../Loading';
import Status from '../Status'; import Status from '../Status';
import Tokens from '../Tokens'; import Tokens from '../Tokens';
@ -59,6 +61,9 @@ export default class Application extends Component {
<Actions /> <Actions />
<Tokens /> <Tokens />
<div className={ styles.warning }>
WARNING: The token registry is experimental. Please ensure that you understand the steps, risks, benefits & consequences of registering a token before doing so. A non-refundable fee of { api.util.fromWei(contract.fee).toFormat(3) }<small>ETH</small> is required for all registrations.
</div>
</div> </div>
); );
} }

View File

@ -31,6 +31,12 @@
.title { .title {
font-size: 3rem; font-size: 3rem;
font-weight: 300; font-weight: 300;
margin-top: 0; margin: 0;
text-transform: uppercase; text-transform: uppercase;
} }
.byline {
font-size: 1.25em;
opacity: 0.75;
margin: 0 0 1.75em 0;
}

View File

@ -29,17 +29,12 @@ export default class Status extends Component {
}; };
render () { render () {
const { address, fee } = this.props; const { fee } = this.props;
return ( return (
<div className={ styles.status }> <div className={ styles.status }>
<h1 className={ styles.title }>Token Registry</h1> <h1 className={ styles.title }>Token Registry</h1>
<h3 className={ styles.byline }>A global registry of all recognised tokens on the network</h3>
<Chip
isAddress
value={ address }
label='Address' />
<Chip <Chip
isAddress={ false } isAddress={ false }
value={ api.util.fromWei(fee).toFixed(3) + 'ETH' } value={ api.util.fromWei(fee).toFixed(3) + 'ETH' }