diff --git a/campaign/index.html b/campaign/index.html new file mode 100644 index 0000000..d093b86 --- /dev/null +++ b/campaign/index.html @@ -0,0 +1,44 @@ + + + + + issuehunter + + + + + + + + +
+ + +

Back

+ +

Campaign

+

+ Executed:
+ Total amount:
+ Created by:
+ Reward period expires at:
+ Execute period expires at:
+ Resolved by: +

+ +
+ + +
+
+ +
+ +

+ Amount: +

+
+ + diff --git a/create-campaign.html b/create-campaign.html index a1774b9..ce54ef3 100644 --- a/create-campaign.html +++ b/create-campaign.html @@ -27,7 +27,7 @@

issuehunter

- +

New Campaign

diff --git a/index.html b/index.html index 6c4e1b7..2efdfca 100644 --- a/index.html +++ b/index.html @@ -16,19 +16,24 @@

issuehunter

+ +

Coinbase Address:
- Coinbase Balance:
- Accounts:
+ Coinbase Balance: +

+ +

Accounts:

+
+ +

Latest Block Number:
Latest Block Timestamp:
- Latest Block Hash:
+ Latest Block Hash:

- - diff --git a/src/add-funds.js b/src/add-funds.js index c8499f5..1021576 100644 --- a/src/add-funds.js +++ b/src/add-funds.js @@ -28,7 +28,6 @@ function addFunds() { // TODO: listen for CampaignFunded events for a specific issue id issueHunter.CampaignFunded().watch(function (err, event) { - console.log(event) document.querySelector(".add-funds #status").innerText = "Confirmed" document.querySelector(".add-funds #block").innerText = event.blockHash document.querySelector(".add-funds #txn").innerText = event.transactionHash diff --git a/src/campaign.js b/src/campaign.js new file mode 100644 index 0000000..792f064 --- /dev/null +++ b/src/campaign.js @@ -0,0 +1,18 @@ +var issueId = decodeURIComponent(window.location.search.substr(1)) + +issueHunter.campaigns(issueId, function(err, campaign) { + console.log(campaign) + document.querySelector("#executed").innerText = campaign[0] + document.querySelector("#totalAmount").innerText = web3.fromWei(campaign[1]) + document.querySelector("#createdBy").innerText = campaign[2] + document.querySelector("#rewardPeriodExpiresAt").innerText = Date(campaign[3]) + document.querySelector("#executePeriodExpiresAt").innerText = Date(campaign[4]) + document.querySelector("#resolutor").innerText = campaign[5] +}) + +function campaignFunds() { + var account = document.querySelector("#account").value + issueHunter.campaignFunds.call(issueId, account, function (err, amount) { + document.querySelector("#amount").innerText = web3.fromWei(amount) + }) +}