Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Remove addresses, display non-refundable warning on registries #3403

Merged
merged 1 commit into from
Nov 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions js/src/dapps/registry/Application/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@
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;
}
11 changes: 6 additions & 5 deletions js/src/dapps/registry/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,31 @@ export default class Application extends Component {
};

render () {
const { api } = window.parity;
const {
actions,
accounts, contacts,
contract, fee,
lookup,
events
} = this.props;
let warning = null;

return (
<div>
{ warning }
<div className={ styles.header }>
<h1>RΞgistry</h1>
<Accounts { ...accounts } actions={ actions.accounts } />
</div>
{ contract && fee ? (
<div>
<Lookup { ...lookup } accounts={ accounts.all } contacts={ contacts } actions={ actions.lookup } />

{ this.renderActions() }

<Events { ...events } accounts={ accounts.all } contacts={ contacts } actions={ actions.events } />
<p className={ styles.address }>
The Registry is provided by the contract at <code>{ contract.address }.</code>
</p>
<div className={ styles.warning }>
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.
</div>
</div>
) : (
<CircularProgress size={ 60 } />
Expand Down
12 changes: 12 additions & 0 deletions js/src/dapps/tokenreg/Application/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@
flex-direction: column;
align-items: center;
}

.warning {
background: #f80;
bottom: 0;
color: #fff;
left: 0;
opacity: 1;
padding: 1.5em;
position: fixed;
right: 50%;
z-index: 100;
}
5 changes: 5 additions & 0 deletions js/src/dapps/tokenreg/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import React, { Component, PropTypes } from 'react';
import getMuiTheme from 'material-ui/styles/getMuiTheme';

import { api } from '../parity';

import Loading from '../Loading';
import Status from '../Status';
import Tokens from '../Tokens';
Expand Down Expand Up @@ -59,6 +61,9 @@ export default class Application extends Component {
<Actions />

<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>
);
}
Expand Down
8 changes: 7 additions & 1 deletion js/src/dapps/tokenreg/Status/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
.title {
font-size: 3rem;
font-weight: 300;
margin-top: 0;
margin: 0;
text-transform: uppercase;
}

.byline {
font-size: 1.25em;
opacity: 0.75;
margin: 0 0 1.75em 0;
}
9 changes: 2 additions & 7 deletions js/src/dapps/tokenreg/Status/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,12 @@ export default class Status extends Component {
};

render () {
const { address, fee } = this.props;
const { fee } = this.props;

return (
<div className={ styles.status }>
<h1 className={ styles.title }>Token Registry</h1>

<Chip
isAddress
value={ address }
label='Address' />

<h3 className={ styles.byline }>A global registry of all recognised tokens on the network</h3>
<Chip
isAddress={ false }
value={ api.util.fromWei(fee).toFixed(3) + 'ETH' }
Expand Down