From 65e29304086357c63c091cc1601be9064082caf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=A1=D0=BE=D0=B1=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=D0=B2?= Date: Sat, 22 Jun 2019 22:14:54 +0300 Subject: [PATCH] Fixed button name --- frontend/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/index.js b/frontend/index.js index b05f1c9..20b652f 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -327,7 +327,7 @@ $(document).ready(function() { if (fluenceResponse.hasOwnProperty('verified')) { if (fluenceResponse.verified) { // все хорошо - мы проверили в флюенсе - $('challenge-' + i).prop('disabled', true); + $('#challenge-' + i).prop('disabled', true); } else { // мы проверили, пруф неправильный $('#challenge-' + i).text('Challenge on Ethereum!') @@ -374,8 +374,6 @@ $(document).ready(function() { };*/ - - }); $('button').click(function () { @@ -395,7 +393,7 @@ $('button').click(function () { $('#state-status-fluence-' + i).text(result); if (fluenceResponse.result) { // все хорошо - мы проверили в флюенсе - $('challenge-' + i).prop('disabled', true); + $('#challenge-' + i).prop('disabled', true); } else { // мы проверили, пруф неправильный $('#challenge-' + i).text('Challenge on Ethereum!') @@ -405,9 +403,10 @@ $('button').click(function () { challengeEthereum(data); } }); + function challengeEthereum(jobId) { contractInstance.challenge.sendTransaction(jobId, function (err, txHash) { - $('challenge-' + jobId).text('See tx on Etherscan!').attr("href", "https://ropsten.etherscan.io/tx/" + txHash); + $('#challenge-' + jobId).text('See tx on Etherscan!').attr("href", "https://ropsten.etherscan.io/tx/" + txHash); }); }