(Fix) Confirmations length

This commit is contained in:
varasev 2018-04-03 12:27:20 +03:00
parent 172d793515
commit 493bbf1772
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class Validator extends Component {
confirmation: null
}
this.props.metadataContract.getConfirmations({miningKey: this.props.address}).then((confirmation) => {
this.setState({confirmation})
this.setState({confirmation: confirmation[0]})
})
}
render(){

View File

@ -200,7 +200,7 @@ export default class Metadata {
async finalize({miningKeyToConfirm, senderVotingKey}) {
const confirmations = await this.getConfirmations({miningKey: miningKeyToConfirm});
const getMinThreshold = await this.getMinThreshold({miningKey: miningKeyToConfirm});
if(Number(confirmations) < Number(getMinThreshold)){
if(Number(confirmations[0]) < Number(getMinThreshold)){
throw(
{message:
`There is not enough confimations.\n