add screen for finishing registration
This commit is contained in:
parent
c9e940b211
commit
2b9b71359b
|
@ -0,0 +1,16 @@
|
||||||
|
export default {
|
||||||
|
release: {
|
||||||
|
title: {
|
||||||
|
sub: 'Done!',
|
||||||
|
body: 'The released domain will be available to other users'
|
||||||
|
},
|
||||||
|
subheading: 'Follow the progress in the Transaction History section of your wallet.'
|
||||||
|
},
|
||||||
|
registered: {
|
||||||
|
title: {
|
||||||
|
sub: 'Nice!',
|
||||||
|
body: 'The name is yours once the transaction is complete'
|
||||||
|
},
|
||||||
|
subheading: 'Follow the progress in the Transaction History section of your wallet.'
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,6 +24,7 @@ import CheckCircle from '../../ui/icons/components/baseline_check_circle_outline
|
||||||
const { getPrice, getExpirationTime, release } = ENSSubdomainRegistry.methods;
|
const { getPrice, getExpirationTime, release } = ENSSubdomainRegistry.methods;
|
||||||
import NotInterested from '@material-ui/icons/NotInterested';
|
import NotInterested from '@material-ui/icons/NotInterested';
|
||||||
import Face from '@material-ui/icons/Face';
|
import Face from '@material-ui/icons/Face';
|
||||||
|
import Copy from './copy';
|
||||||
|
|
||||||
const invalidSuffix = '0000000000000000000000000000000000000000'
|
const invalidSuffix = '0000000000000000000000000000000000000000'
|
||||||
const nullAddress = '0x0000000000000000000000000000000000000000'
|
const nullAddress = '0x0000000000000000000000000000000000000000'
|
||||||
|
@ -172,6 +173,19 @@ const RegisterInfoCard = ({ formattedDomain, domainPrice }) => (
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const TransactionComplete = ({ type }) => (
|
||||||
|
<div style={{ textAlign: 'center', margin: '40% 15 10' }}>
|
||||||
|
<Typography variant="title" style={{ marginBottom: '1rem' }}>
|
||||||
|
{Copy[type]['title']['sub']}<br/>
|
||||||
|
{Copy[type]['title']['body']}
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subheading" style={{ color: '#939BA1' }}>
|
||||||
|
{Copy[type]['subheading']}
|
||||||
|
</Typography>
|
||||||
|
<MobileButton text="Main Page" style={{ marginTop: '12rem' }} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
class Register extends PureComponent {
|
class Register extends PureComponent {
|
||||||
state = { domainPrice: null };
|
state = { domainPrice: null };
|
||||||
|
|
||||||
|
@ -191,21 +205,22 @@ class Register extends PureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { domainName, setStatus, style } = this.props;
|
const { domainName, setStatus, style } = this.props;
|
||||||
const { domainPrice, registered } = this.state;
|
const { domainPrice, registered, submitted } = this.state;
|
||||||
const formattedDomain = formatName(domainName);
|
const formattedDomain = formatName(domainName);
|
||||||
const formattedDomainArray = formattedDomain.split('.')
|
const formattedDomainArray = formattedDomain.split('.');
|
||||||
return (
|
return (
|
||||||
<div style={style}>
|
<div style={style}>
|
||||||
{!registered ?
|
{!registered && !submitted ?
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<RegisterInfoCard {...{ formattedDomain, domainPrice }}/>
|
<RegisterInfoCard {...{ formattedDomain, domainPrice }}/>
|
||||||
<RegisterSubDomain
|
<RegisterSubDomain
|
||||||
subDomain={formattedDomainArray[0]}
|
subDomain={formattedDomainArray[0]}
|
||||||
domainName={formattedDomainArray.slice(1).join('.')}
|
domainName={formattedDomainArray.slice(1).join('.')}
|
||||||
domainPrice={domainPrice}
|
domainPrice={domainPrice}
|
||||||
|
preRegisteredCallback={() => { this.setState({ submitted: true }) }}
|
||||||
registeredCallbackFn={this.onRegistered} />
|
registeredCallbackFn={this.onRegistered} />
|
||||||
</Fragment> :
|
</Fragment> :
|
||||||
<RenderAddresses {...this.props} address={registered.address} statusAccount={registered.statusAccount} />}
|
submitted && !registered ? <TransactionComplete type="registered" /> : <RenderAddresses {...this.props} address={registered.address} statusAccount={registered.statusAccount} />}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,7 @@ const RegisterSubDomain = withFormik({
|
||||||
toSend.estimateGas().then(gasEstimated => {
|
toSend.estimateGas().then(gasEstimated => {
|
||||||
console.log("Register would work. :D Gas estimated: "+gasEstimated)
|
console.log("Register would work. :D Gas estimated: "+gasEstimated)
|
||||||
console.log("Trying: register(\""+subdomainHash+"\",\""+domainNameHash+"\",\""+resolveToAddr+"\",\""+zeroBytes32+"\",\""+zeroBytes32+"\")")
|
console.log("Trying: register(\""+subdomainHash+"\",\""+domainNameHash+"\",\""+resolveToAddr+"\",\""+zeroBytes32+"\",\""+zeroBytes32+"\")")
|
||||||
|
props.preRegisteredCallback && props.preRegisteredCallback();
|
||||||
toSend.send({gas: gasEstimated+1000}).then(txId => {
|
toSend.send({gas: gasEstimated+1000}).then(txId => {
|
||||||
if(txId.status == "0x1" || txId.status == "0x01"){
|
if(txId.status == "0x1" || txId.status == "0x01"){
|
||||||
console.log("Register send success. :)")
|
console.log("Register send success. :)")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"Black Ash": "#3B3B3B",
|
"Black Ash": "#3B3B3B",
|
||||||
"Dim Grey": "#707070",
|
"Dim Grey": "#707070",
|
||||||
"Dust Grey": "#969696",
|
"Dust Grey": "#969696",
|
||||||
"Light Grey": "#B3B3B3",
|
"Light Grey": "#939ba1",
|
||||||
"Gainsboro": "#E6E6E6",
|
"Gainsboro": "#E6E6E6",
|
||||||
"Alabaster": "#F2F2F2"
|
"Alabaster": "#F2F2F2"
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,8 @@
|
||||||
"Secondary": "=Sea.Turquoise",
|
"Secondary": "=Sea.Turquoise",
|
||||||
"Black Ash": "=Grey.Black Ash",
|
"Black Ash": "=Grey.Black Ash",
|
||||||
"Gradient Start": "=Eagle.Cerulean",
|
"Gradient Start": "=Eagle.Cerulean",
|
||||||
"Gradient End": "=Eagle.Opal"
|
"Gradient End": "=Eagle.Opal",
|
||||||
|
"SubText": "=Grey.Light Grey"
|
||||||
},
|
},
|
||||||
"Status UI": {
|
"Status UI": {
|
||||||
"gradientStart": "=Blue.Main",
|
"gradientStart": "=Blue.Main",
|
||||||
|
|
Loading…
Reference in New Issue