mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-23 15:48:10 +00:00
Merge branch 'snt-to-generic'
This commit is contained in:
commit
710781c0e5
@ -57,7 +57,7 @@ class Voting extends PureComponent {
|
|||||||
const stHash = this.state.transactionHash;
|
const stHash = this.state.transactionHash;
|
||||||
stHash[idPoll] = transactionHash;
|
stHash[idPoll] = transactionHash;
|
||||||
|
|
||||||
this.setState({transactionHash: stHash[idPoll]});
|
this.setState({transactionHash: stHash});
|
||||||
}
|
}
|
||||||
|
|
||||||
setTransactionPromise = (idPoll, transaction) => {
|
setTransactionPromise = (idPoll, transaction) => {
|
||||||
|
@ -65,6 +65,7 @@ class Results extends Component {
|
|||||||
if(req || !transactionHash[idPoll]) return;
|
if(req || !transactionHash[idPoll]) return;
|
||||||
|
|
||||||
req = true;
|
req = true;
|
||||||
|
try {
|
||||||
const receipt = await web3.eth.getTransactionReceipt(transactionHash[idPoll]);
|
const receipt = await web3.eth.getTransactionReceipt(transactionHash[idPoll]);
|
||||||
if(receipt){
|
if(receipt){
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
@ -76,6 +77,8 @@ class Results extends Component {
|
|||||||
this.setState({isError: true});
|
this.setState({isError: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(e){
|
||||||
|
}
|
||||||
req = false;
|
req = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
|
@ -44,15 +44,15 @@ class App extends React.Component {
|
|||||||
web3.eth.defaultAccount = "0x0000000000000000000000000000000000000000";
|
web3.eth.defaultAccount = "0x0000000000000000000000000000000000000000";
|
||||||
}
|
}
|
||||||
|
|
||||||
DappToken.methods.symbol().call().then(symbol => {
|
DappToken.methods.symbol().call({from: web3.eth.defaultAccount}).then(symbol => {
|
||||||
this.setState({symbol});
|
this.setState({symbol});
|
||||||
});
|
});
|
||||||
|
|
||||||
DappToken.methods.decimals().call().then(decimals => {
|
DappToken.methods.decimals().call({from: web3.eth.defaultAccount}).then(decimals => {
|
||||||
this.setState({decimals});
|
this.setState({decimals});
|
||||||
});
|
});
|
||||||
|
|
||||||
DappToken.methods.name().call().then(name => {
|
DappToken.methods.name().call({from: web3.eth.defaultAccount}).then(name => {
|
||||||
this.setState({name});
|
this.setState({name});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user