Skip to content

Instantly share code, notes, and snippets.

@williamcotton
Created June 9, 2015 09:56
Show Gist options
  • Save williamcotton/fb1aee125c4a90bab9f5 to your computer and use it in GitHub Desktop.
Save williamcotton/fb1aee125c4a90bab9f5 to your computer and use it in GitHub Desktop.
document.getElementById("sign-and-post-transaction").addEventListener("click", function(event) {
signedTx = wallet.signWith(newTx, [address]);
signedTxHex = signedTx.toHex();
xhr({
uri: '/chain/:blockchainType/transactions/send',
method: 'POST',
json: {
transactionHex: signedTxHex
}
}, function(err, resp, body) {
postTransactionReceipt = body;
document.getElementById("post-transaction-receipt").innerHTML = postTransactionReceipt;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment