(Fix) Confirmations length
This commit is contained in:
parent
172d793515
commit
493bbf1772
|
@ -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(){
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue