Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
methods: {
clickNumber (event) {
console.log(event.target.innerHTML, this.amount)
this.winEvent = null
this.pending = true
this.$store.state.contractInstance().bet(event.target.innerHTML, {
gas: 300000,
value: this.$store.state.web3.web3Instance().toWei(this.amount, 'ether'),
from: this.$store.state.web3.coinbase
}, (err, result) => {
if (err) {
console.log(err)
this.pending = false
} else {
let Won = this.$store.state.contractInstance().Won()
Won.watch((err, result) => {
if (err) {
console.log('could not get event Won()')
} else {
this.winEvent = result.args
this.pending = false
}
})
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.