Revert breaking changes (#33)
* Revert "deploy updated username registrar to ropsten"
This reverts commit cdbc253d8d
.
* change getReleaseTime to getExpirationTime
This commit is contained in:
parent
5d75325182
commit
3181e0f120
|
@ -24,7 +24,7 @@ import EnsLogo from '../../ui/icons/logos/ens.png';
|
|||
import { formatPrice } from '../ens/utils';
|
||||
import CheckCircle from '../../ui/icons/components/baseline_check_circle_outline.png';
|
||||
import WarningIcon from '../../ui/icons/svg/warning.svg';
|
||||
const { getPrice, getReleaseTime, release } = UsernameRegistrar.methods;
|
||||
const { getPrice, getExpirationTime, release } = UsernameRegistrar.methods;
|
||||
import NotInterested from '@material-ui/icons/NotInterested';
|
||||
import Face from '@material-ui/icons/Face';
|
||||
import Copy from './copy';
|
||||
|
@ -75,7 +75,7 @@ const DisplayBox = ({ displayType, pubKey }) => (
|
|||
</div>
|
||||
);
|
||||
|
||||
const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit, handleChange, values, handleSubmit }) => (
|
||||
const MobileAddressDisplay = ({ domainName, address, statusAccount, expirationTime, defaultAccount, isOwner, edit, onSubmit, handleChange, values, handleSubmit }) => (
|
||||
<Fragment>
|
||||
<LookupForm {...{ handleSubmit, values, handleChange }} justSearch />
|
||||
<Info background={isOwner ? '#44D058' : '#000000'} style={{ margin: '0.4em', boxShadow: '0px 6px 10px rgba(0, 0, 0, 0.2)' }}>
|
||||
|
@ -93,7 +93,7 @@ const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime,
|
|||
</Typography>
|
||||
</Info>
|
||||
<Typography type='subheading' style={{ textAlign: 'center', fontSize: '17px', fontWeight: '500', margin: '1.5em 0 0.3em 0' }}>
|
||||
Registered {validTimestamp(releaseTime)}
|
||||
Registered {validTimestamp(expirationTime)}
|
||||
</Typography>
|
||||
<Typography type='body2' style={{ textAlign: 'center', margin: 10 }}>
|
||||
{edit
|
||||
|
@ -116,7 +116,7 @@ class RenderAddresses extends PureComponent {
|
|||
state = { copied: false, editMenu: false, editAction: false }
|
||||
|
||||
render() {
|
||||
const { domainName, address, statusAccount, releaseTime, defaultAccount, ownerAddress, setStatus, registryOwnsDomain } = this.props
|
||||
const { domainName, address, statusAccount, expirationTime, defaultAccount, ownerAddress, setStatus, registryOwnsDomain } = this.props
|
||||
const { copied, editMenu, editAction, submitted } = this.state
|
||||
const markCopied = (v) => { this.setState({ copied: v }) }
|
||||
const isCopied = address => address == copied;
|
||||
|
@ -139,7 +139,7 @@ class RenderAddresses extends PureComponent {
|
|||
<Fragment>
|
||||
<Hidden mdDown>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', margin: 50 }}>
|
||||
<Info.Action title="Click to copy"><b>{formatName(domainName)}</b>{releaseTime && <i> (Expires {generatePrettyDate(releaseTime)})</i>} Resolves To:</Info.Action>
|
||||
<Info.Action title="Click to copy"><b>{formatName(domainName)}</b>{expirationTime && <i> (Expires {generatePrettyDate(expirationTime)})</i>} Resolves To:</Info.Action>
|
||||
{address && <Text style={{ marginTop: '1em' }}>Ethereum Address {renderCopied(address)}</Text>}
|
||||
<CopyToClipboard text={address} onCopy={markCopied}>
|
||||
<div style={addressStyle}>{address}</div>
|
||||
|
@ -340,7 +340,7 @@ const InnerForm = ({
|
|||
domainName={status.resolvedDomainName}
|
||||
address={status.address}
|
||||
statusAccount={status.statusAccount}
|
||||
releaseTime={status.releaseTime}
|
||||
expirationTime={status.expirationTime}
|
||||
ownerAddress={status.ownerAddress}
|
||||
registryOwnsDomain={status.registryOwnsDomain}
|
||||
setStatus={setStatus} /> :
|
||||
|
@ -369,13 +369,13 @@ const NameLookup = withFormik({
|
|||
const keys = pubkey(lookupHash).call();
|
||||
const ownerAddress = owner(lookupHash).call();
|
||||
const suffixOwner = owner(hash(getDomain(domainName))).call();
|
||||
const releaseTime = getReleaseTime(lookupHash).call();
|
||||
Promise.all([address, keys, ownerAddress, releaseTime, suffixOwner])
|
||||
.then(([ address, keys, ownerAddress, releaseTime, suffixOwner ]) => {
|
||||
const expirationTime = getExpirationTime(lookupHash).call();
|
||||
Promise.all([address, keys, ownerAddress, expirationTime, suffixOwner])
|
||||
.then(([ address, keys, ownerAddress, expirationTime, suffixOwner ]) => {
|
||||
const statusAccount = keyFromXY(keys[0], keys[1]);
|
||||
const registryOwnsDomain = registryIsOwner(suffixOwner)
|
||||
const resolvedDomainName = domainName;
|
||||
setStatus({ address, statusAccount, releaseTime, ownerAddress, registryOwnsDomain, resolvedDomainName });
|
||||
setStatus({ address, statusAccount, expirationTime, ownerAddress, registryOwnsDomain, resolvedDomainName });
|
||||
})
|
||||
}
|
||||
})(InnerForm)
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
"0x5f7791d31ca0493e9ca7c9ca16695ecd9d5044768674d14d31ab5d8277518fff",
|
||||
3,
|
||||
merkleTree.getHexRoot(),
|
||||
"0x11d9F481effd20D76cEE832559bd9Aca25405841"
|
||||
"0x9e183BC54Bb4f3cCa1A478CA6f2c3EdC37B60478"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ module.exports = {
|
|||
"address": "0x58E01078d14142E0370526dFdAE44E4f508c844B"
|
||||
},
|
||||
"UsernameRegistrar": {
|
||||
"address": "0x1f1CD0569cfDE5E63Bb2108574eeb15e5bBE6efa"
|
||||
"address": "0x11d9F481effd20D76cEE832559bd9Aca25405841"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -470,7 +470,7 @@ contract UsernameRegistrar is Controlled, ApproveAndCallFallBack {
|
|||
* @param _label Username hash.
|
||||
* @return Exact time when username can be released.
|
||||
**/
|
||||
function getReleaseTime(bytes32 _label)
|
||||
function getExpirationTime(bytes32 _label)
|
||||
external
|
||||
view
|
||||
returns(uint256 releaseTime)
|
||||
|
|
Loading…
Reference in New Issue