diff --git a/app/components/ens/registerSubDomain.js b/app/components/ens/registerSubDomain.js index ca82db0..9b7839c 100644 --- a/app/components/ens/registerSubDomain.js +++ b/app/components/ens/registerSubDomain.js @@ -11,6 +11,7 @@ import { zeroAddress, zeroBytes32, formatPrice } from './utils'; import { getStatusContactCode, getSNTAllowance } from '../../reducers/accounts'; import FieldGroup from '../standard/FieldGroup'; import LinearProgress from '@material-ui/core/LinearProgress'; +import TokenPermissions from '../standard/TokenPermissionConnect'; import { generateXY } from '../../utils/ecdsa'; const { soliditySha3, fromWei } = web3.utils; @@ -18,7 +19,6 @@ const { soliditySha3, fromWei } = web3.utils; const InnerForm = ({ values, errors, - touched, handleChange, handleBlur, handleSubmit, @@ -27,102 +27,108 @@ const InnerForm = ({ subDomain, domainName, domainPrice, - statusContactCode, + SNTAllowance, }) => (
- {!subDomain && - } - {!domainName && - } + {!domainName && + { ENSSubdomainRegistry.methods.getPrice(hash(values.domainName)) .call() .then((res) => { setFieldValue('price', fromWei(res)); }); }} - > - Get Price - - } - />} - {!domainPrice && - } - - - setFieldValue('address', web3.eth.defaultAccount)}>Use My Primary Address} - /> - {!isSubmitting ? : } - - - - + Get Price + + } + />} + {!domainPrice && + } + + setFieldValue('statusAddress', '')} - wide /> - - - + setFieldValue('address', '')} - required - wide /> - -
- -
-
+ onBlur={handleBlur} + value={values.address} + error={errors.address} + button={} + /> + {!isSubmitting ? : } + + + + setFieldValue('statusAddress', '')} + wide /> + + + setFieldValue('address', '')} + required + wide /> + +
+ {!Number(SNTAllowance) ? + : } +
+
);