-
-
Save blackjmxx/a01aee040094a53eae59d77ac2854347 to your computer and use it in GitHub Desktop.
This file contains 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
handleTransfert = (event) => { | |
this.setState({isLoading:true}) | |
let user = JSON.parse(getUser()); | |
try { | |
const fundTransaction = new TransferTransaction({ | |
asset: { | |
recipientId: user.address, | |
amount: utils.convertLSKToBeddows("200"), | |
}, | |
networkIdentifier: networkIdentifier, | |
}); | |
fundTransaction.sign("XXXX XXXX XXXX XXXX"); | |
api.transactions.broadcast(fundTransaction.toJSON()).then(response => { | |
this.setState({isLoading:false}) | |
}).catch(err => { | |
this.setState({isLoading:false}) | |
console.log(JSON.stringify(err.errors, null, 2)); | |
}); | |
} catch (error) { | |
this.setState({isLoading:false}) | |
console.log(error) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment