import EmbarkJS from 'Embark/EmbarkJS'; import ERC20Token from 'Embark/contracts/ERC20Token'; import ProposalCuration from 'Embark/contracts/ProposalCuration' import React, { Fragment } from 'react'; import { Form, FormGroup, FormControl, HelpBlock, Button } from 'react-bootstrap'; import web3 from "Embark/web3" class ProposalManager extends React.Component { constructor(props) { super(props); this.state = { submitPrice: "Loading...", to: "", value: "", data: "", description: "", topic: "0x00" }; window['ProposalCuration'] = ProposalCuration; } componentDidMount(){ this.loadPrice(); } componentWillReceiveProps(){ this.loadPrice(); } async loadPrice(){ __embarkContext.execWhenReady(async () => { try { let _b = await ProposalCuration.methods.getSubmitPrice(web3.eth.defaultAccount).call(); this.setState({ balance: _b }); } catch(err){ console.log("Couldn't get submit price") } }); } render(){ return (

Add

Price for submitting proposals: {this.state.submitPrice}

) } } export default ProposalManager;