Refactored frontend #2

This commit is contained in:
Игорь Соболев 2019-07-01 17:44:37 +03:00
parent 349849b2a9
commit d3282f55de

View File

@ -430,6 +430,8 @@ $('button').click(function () {
function challengeEthereum(id, data) {
console.log('Challenging task N ' + data + ' on Ethereum!');
contractInstance.challenge.sendTransaction(data, function (err, txHash) {
$('#challenge-' + id).text('See tx on Etherscan!').attr("onclick", "window.open('https://rinkeby.etherscan.io/tx/" + txHash + "')");
if (!err) {
$('#challenge-' + id).text('See tx on Etherscan!').attr("onclick", "window.open('https://rinkeby.etherscan.io/tx/" + txHash + "')");
}
});
}