Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## Get Started

Before being able to use this repository, you will need to build the @anonymousbitcoin/anoncore-lib for browser which is a required dependency. This can be done easily by running:
Before being able to use this repository, you will need to build the bitcore-lib-anon for browser which is a required dependency. This can be done easily by running:

```
npm install
npm run build
```

You will find in the vendor folder the file index.js which index.html reference. This file handle a browserified version of @anonymousbitcoin/anoncore-lib aswell as some inner logic that you can find in "js/index.js".
You will find in the vendor folder the file index.js which index.html reference. This file handle a browserified version of bitcore-lib-anon aswell as some inner logic that you can find in "js/index.js".

## Dockerized

Expand Down
19 changes: 8 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
}
$(document).ready(function() {
typeof(_bitcore) !== "undefined" || displayError('missing_build')
typeof(_bitcore) !== "undefined" || console.log('missing_build')
});
</script>
</head>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h4><i>Governance Tools</i></h4>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100" style="width:25%">
Create Proposal
Create A Proposal
</div>
</div>
<ul class="nav nav-pills">
Expand Down Expand Up @@ -151,7 +151,7 @@ <h3 class="header_title">ANON Budget Proposal</h3>
<div class="row" id="createProposalHeader">
<div class="col-xs-12">
<h1 class="removeMargin">Create a Proposal</h1>
<h5 class="header_description">Enter details for your Proposal and click 'Create Proposal'. This will generate a command you can run in your local wallet to prepare the Proposal at a cost of 5 anon.</h5>
<h5 class="header_description">Enter details for your Proposal and click 'Create Proposal'. This will generate a command you can run in your local wallet to prepare the Proposal at a cost of 100 anon.</h5>
</div>
</div>

Expand All @@ -164,7 +164,7 @@ <h5 class="header_description">Enter details for your Proposal and click 'Create
</div>
<div class="form-group">
<label for="url">Proposal Description URL:</label>
<input type="text" class="form-control" id="url" value="" placeholder="">
<input type="text" class="form-control" id="url" value="" placeholder="https://">
</div>
</div>
</div>
Expand All @@ -187,9 +187,6 @@ <h5 class="header_description">Enter details for your Proposal and click 'Create
<label for="start_epoch">Payments:</label>
<select name="start_epoch" class="form-control" id="end_epoch"></select>
</div>
<!-- -->
<!-- -->
<!-- -->
</div>
<div class="col-xs-6">
<div class="form-group">
Expand All @@ -200,10 +197,10 @@ <h5 class="header_description">Enter details for your Proposal and click 'Create
</div>

<div class="row">
<div class="col-xs-7">
<div class="col-xs-7" >
<div class="form-group">
<label for="payment_amount">Payment Amount:</label>
<input type="text" class="form-control" id="payment_amount" value="" placeholder="0">
<input type="text" class="form-control" id="payment_amount" value="5">
</div>
</div>
<div class="col-xs-4">
Expand Down Expand Up @@ -290,7 +287,7 @@ <h2>Wallet Commands</h2>

<div class="form-group">
<label for="feeTxid">Transaction ID:</label>
<p>Paste the resulting transaction id to move to the next step.</p>
<p>Paste the resulting transaction ID to move to the next step.</p>
<input type="text" class="form-control" id="feeTxid" value="" placeholder="<fee-txid>">
</div>

Expand All @@ -307,7 +304,7 @@ <h2>Wallet Commands</h2>

<div class="form-group">
<label for="feeTxid">Confirm Transaction:</label>
<p id="progresstxt">Waiting for 6 block confirmations, this should take approximately 15 minutes.</p>
<p id="progresstxt">Waiting for 6 block confirmations.</p>
<div id="progressbar"></div>
</div>

Expand Down
15 changes: 9 additions & 6 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
var Bitcore = require('@anonymousbitcoin/anoncore-lib');
var Bitcore = require('bitcore-lib-anon');

var socket;
var paymentCycle;

var mainnetProvider = 'http://explorer.anonfork.io/';
var mainnetProvider = 'https://explorer.anonfork.io/';
var mainnetPrefix = 'insight-api-anon';

var testnetProvider = 'http://texplorer.anonfork.io/';
var testnetProvider = 'https://texplorer.anonfork.io/';
var testnetPrefix = 'insight-api-anon';

var init = function(network, provider, prefix) {
Expand Down Expand Up @@ -101,7 +101,10 @@ $(document).ready(function() {

var validProposal = proposal.validate();

if (validProposal) {
console.log('proposal below: ');
console.log(proposal);

if (validProposal) {
document.getElementById('step_two').click();
$('#step_two').removeClass('hidden');
document.getElementsByClassName('progress-bar')[0].style.width = "50%";
Expand Down Expand Up @@ -165,8 +168,8 @@ $(document).ready(function() {
$('#walletCommandsProgress').removeClass('hidden'); // probably a better way to do this....
$("#progressbar").progressbar({value: 0}); // TXListener will bump this along as confirmations occur

txListener.blockheight = 19//res.blockheight;
txListener.confirmations = 10//res.confirmations;
txListener.blockheight = res.blockheight;
txListener.confirmations = res.confirmations;

txListener.initSocket(function() {
$('#walletCommandsSubmit').removeClass('hidden');
Expand Down
Loading