Skip to content

Instantly share code, notes, and snippets.

@laalaguer
Last active March 6, 2019 03:25
Show Gist options
  • Save laalaguer/be0a30fae7e569a8abb4da617fc29538 to your computer and use it in GitHub Desktop.
Save laalaguer/be0a30fae7e569a8abb4da617fc29538 to your computer and use it in GitHub Desktop.
More in App.vue to send transactions
<script>
methods: {
// ... add after refreshTokenBalance()
transfer () { // Confrim and send out a transfer.
const evmAmount = utils.humanToEVM(this.toamount.toString(), 18)
operations.transferToken(this.contract, this.myaddress, this.toaddress, evmAmount, this.toamount, 'VTHO')
.then(result => {alert('success!')})
.catch(e => {alert('failed!')})
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment