liquid-funding/app/dapp.js

35 lines
737 B
JavaScript
Raw Normal View History

2018-11-28 16:12:50 +00:00
import React from 'react';
import EmbarkJS from 'Embark/EmbarkJS';
2018-11-29 16:45:57 +00:00
import LPVault from 'Embark/contracts/LPVault';
import LiquidPledgingMock from 'Embark/contracts/LiquidPledgingMock';
2018-11-28 16:12:50 +00:00
import web3 from "Embark/web3";
2018-11-30 11:02:57 +00:00
import AddFunder from './components/AddFunder';
2018-11-28 16:12:50 +00:00
const { getNetworkType } = web3.eth.net;
class App extends React.Component {
constructor(props) {
super(props)
}
state = { admin: false };
componentDidMount(){
2018-11-29 16:45:57 +00:00
EmbarkJS.onReady(async (err) => {
2018-11-28 16:12:50 +00:00
getNetworkType().then(network => {
const { environment } = EmbarkJS
this.setState({ network, environment })
});
});
}
render() {
return (
<div>
2018-11-30 11:02:57 +00:00
<AddFunder />
</div>
2018-11-28 16:12:50 +00:00
)
}
}
export default App;