Last active
March 6, 2019 03:25
-
-
Save laalaguer/be0a30fae7e569a8abb4da617fc29538 to your computer and use it in GitHub Desktop.
More in App.vue to send transactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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