diff --git a/.babelrc b/.babelrc index 577b026..eb62d26 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,24 @@ { - "plugins": ["transform-object-rest-spread"], - "presets": ["stage-2"] -} + "plugins": [ + "@babel/plugin-proposal-object-rest-spread", + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions" + ], + "presets": [], + "ignore": [ + "config/", + "node_modules" + ] + } diff --git a/app/components/ens/registerSubDomain.js b/app/components/ens/registerSubDomain.js index 95a2a59..85b5a06 100644 --- a/app/components/ens/registerSubDomain.js +++ b/app/components/ens/registerSubDomain.js @@ -33,6 +33,7 @@ const DisplayBox = ({ displayType, pubKey }) => ( ); +const formRef = React.createRef(); const displayTerms = status => status === 'terms'; const InnerForm = ({ values, @@ -51,7 +52,7 @@ const InnerForm = ({ SNTAllowance, SNTBalance, }) => ( -
(this.form = node)}> +
{!subDomain && */}
{!isSubmitting ? { setStatus('terms') }} text={`${editAccount ? 'Save' : 'Register'} with transaction`} style={{ width: '100%' }} /> : } - { setStatus(null); this.form.dispatchEvent(new Event('submit')) }} /> + { setStatus(null); formRef.dispatchEvent(new Event('submit')) }} />
diff --git a/app/components/ens/utils/domain.js b/app/components/ens/utils/domain.js index 3ee53ee..171216f 100644 --- a/app/components/ens/utils/domain.js +++ b/app/components/ens/utils/domain.js @@ -8,6 +8,6 @@ export const nullAddress = '0x0000000000000000000000000000000000000000'; export const getResolver = async node => { const resolverAddress = await resolver(node).call(); return resolverAddress !== nullAddress - ? new EmbarkJS.Contract({ abi: PublicResolver._jsonInterface, address: resolverAddress }) + ? new EmbarkJS.Blockchain.Contract({ abi: PublicResolver._jsonInterface, address: resolverAddress }) : PublicResolver } diff --git a/app/dapp.js b/app/dapp.js index 9e16ed4..38dcae5 100644 --- a/app/dapp.js +++ b/app/dapp.js @@ -40,9 +40,8 @@ class App extends React.Component { state = { admin: false, searching: false }; componentDidMount(){ - __embarkContext.execWhenReady(() => { + EmbarkJS.onReady((err) => { getNetworkType().then(network => { this.setState({ network })}); - }); } diff --git a/app/store/init.js b/app/store/init.js index 6f85448..2c9edee 100644 --- a/app/store/init.js +++ b/app/store/init.js @@ -6,7 +6,7 @@ import { fetchAndDispatchSNTAllowance, fetchAndDispatchAccountsWithBalances, che const dispatch = action => store.dispatch(action) export default () => { - __embarkContext.execWhenReady(async () => { + EmbarkJS.onReady(async (err) => { fetchAndDispatchAccountsWithBalances(web3, dispatch) checkAndDispatchStatusContactCode(dispatch) fetchAndDispatchSNTAllowance(dispatch) diff --git a/package.json b/package.json index 1bf4b36..3eeffc2 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ }, "homepage": "https://github.com/status-im/contracts#readme", "dependencies": { - "@babel/runtime": "7.0.0-beta.55", "@material-ui/core": "^1.2.1", "@material-ui/icons": "^1.1.0", "bignumber.js": "^5.0.0", @@ -30,11 +29,11 @@ "install": "^0.11.0", "npm": "^6.1.0", "prop-types": "^15.6.1", - "react": "^16.3.2", + "react": "^16.4.2", "react-blockies": "^1.3.0", "react-bootstrap": "^0.32.1", "react-copy-to-clipboard": "^5.0.1", - "react-dom": "^16.3.2", + "react-dom": "^16.4.2", "react-redux": "^5.0.7", "react-toggle": "^4.0.2", "redux": "^4.0.0", @@ -46,8 +45,16 @@ "web3-utils": "^1.0.0-beta.34" }, "devDependencies": { - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-preset-stage-2": "^6.24.1", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-import": "^2.12.0",