diff --git a/src/components/MainCointainer.jsx b/src/components/MainCointainer.jsx
index 3c14d78..af13b1e 100644
--- a/src/components/MainCointainer.jsx
+++ b/src/components/MainCointainer.jsx
@@ -256,8 +256,8 @@ class PersistentDrawerLeft extends React.Component {
- } />
- } />
+
+
} />
diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx
index c5e962b..04814de 100644
--- a/src/components/projects/CreateProject.jsx
+++ b/src/components/projects/CreateProject.jsx
@@ -6,6 +6,7 @@ import LiquidPledging from '../../embarkArtifacts/contracts/LiquidPledging'
import Button from '@material-ui/core/Button'
import InputAdornment from '@material-ui/core/InputAdornment'
import { withStyles } from '@material-ui/core/styles'
+import { withRouter } from "react-router-dom"
import { uploadFilesToIpfs, pinToGateway, formatMedia, isWeb } from '../../utils/ipfs'
import { FundingContext } from '../../context'
import {ZERO_ADDRESS} from '../../utils/address'
@@ -461,4 +462,4 @@ function CreateProject({ classes, history }) {
}
const StyledProject = withStyles(styles)(CreateProject)
-export default StyledProject
+export default withRouter(StyledProject)
diff --git a/src/dapp.js b/src/dapp.js
index 461beab..2fcd30d 100644
--- a/src/dapp.js
+++ b/src/dapp.js
@@ -39,6 +39,8 @@ class App extends React.Component {
if (window.ethereum) {
const { selectedAddress: account } = window.ethereum
if (account) this.setState({ account })
+ } else {
+ console.log('window.ethreum not found :', {window})
}
}
@@ -67,11 +69,15 @@ class App extends React.Component {
}
enableEthereum = async () => {
- await EmbarkJS.enableEthereum()
- const account = await web3.eth.getCoinbase()
- this.setState({ account })
- this.web3Init()
- return account
+ try {
+ await await window.ethereum.enable()
+ const account = await web3.eth.getCoinbase()
+ this.setState({ account })
+ this.web3Init()
+ return account
+ } catch (error) {
+ console.error('Enable Ethereum :', {error})
+ }
}
getAndSetPrices = async () => {