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 0.33 Dash
+
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 0.33 DASH
@@ -263,7 +286,7 @@
-
+
@@ -275,7 +298,7 @@
-
+
@@ -293,7 +316,7 @@
-
+
@@ -308,6 +331,15 @@
+
+
+
+
+ 0DASH
+
+
+
+
@@ -358,7 +390,7 @@
-
Paste this proposal command into your Dash wallet console to spend a Fee transaction of 0.33 DASH.
+
Paste this proposal command into your wallet console to spend a Fee transaction of 0.33 DASH.
diff --git a/js/paymentCycle.js b/js/paymentCycle.js
index be21df0..4d6296b 100755
--- a/js/paymentCycle.js
+++ b/js/paymentCycle.js
@@ -12,11 +12,17 @@ function PaymentCycle(gov, provider) {
this.paymentCycle = 16616; // mainnet
this.budgetCycles = 24;
+ this.selectedStartIndex = 0;
+ this.selectedPeriods = 1;
+
if (this.network == 'testnet') this.paymentCycle = 24;
if (this.network == 'testnet') this.budgetCycles = 96;
this.blockHeight = null;
+ this.startDate = [];
+ this.endDate = [];
+
this.Messages = {
paymentCycle: {
months: "Months",
@@ -89,31 +95,28 @@ PaymentCycle.prototype.updateDropdowns = function() {
var blockHeight = this.blockHeight;
- var startDate = [];
- var endDate = [];
-
for (i = 0; i < this.budgetCycles + 1; i++) {
var superblock = this.getNextSuperblock(blockHeight);
var timestamp = this.getBlockTimestamp(superblock);
var label = new Date(timestamp).toLocaleDateString();
- if (this.network == 'testnet') label = new Date(timestamp).toLocaleString();
+ if (this.network == 'testnet') label += " @ " + new Date(timestamp).toLocaleTimeString();
var superblockDate = {
superblock: superblock,
timestamp: timestamp,
label: label
};
- startDate.push(superblockDate);
- endDate.push(superblockDate);
+ this.startDate.push(superblockDate);
+ this.endDate.push(superblockDate);
blockHeight = superblock;
}
- endDate.shift(); // remove first element of endDate
- startDate.pop(); // remove last element of startDate to keep length even
+ this.endDate.shift(); // remove first element of endDate
+ this.startDate.pop(); // remove last element of startDate to keep length even
var now = Math.floor(Date.now());
@@ -125,7 +128,7 @@ PaymentCycle.prototype.updateDropdowns = function() {
var start_epoch = $("#start_epoch");
start_epoch.find('option').remove();
- $.each(startDate, function(index) {
+ $.each(this.startDate, function(index) {
var eta = self.getTimeDifference(opts, now, this.timestamp);
var time = this.timestamp - now;
@@ -134,22 +137,33 @@ PaymentCycle.prototype.updateDropdowns = function() {
});
+ self.updateEndEpoch();
- opts.precision = null; // 0 units of precision for eta formatting
+};
+
+PaymentCycle.prototype.updateEndEpoch = function() {
+ var self = this;
+
+ var opts = {
+ precision: null
+ }; // 0 units of precision for eta formatting
var end_epoch = $("#end_epoch");
end_epoch.find('option').remove();
- $.each(endDate, function(index) {
+ $.each(this.endDate, function(index) {
- var eta = self.getTimeDifference(opts, startDate[0].timestamp, this.timestamp);
- var time = this.timestamp - startDate[0].timestamp;
+ if(index >= self.selectedStartIndex) {
- var option = $("").val((Math.floor(this.timestamp / 1000))).text(eta + " (" + this.label + ")").attr('data-index', index).attr('data-time', time).attr('data-eta', eta).attr('data-block', this.superblock);
- end_epoch.append(option);
+ var eta = self.getTimeDifference(opts, self.startDate[self.selectedStartIndex].timestamp, this.timestamp);
+ var time = this.timestamp - self.startDate[self.selectedStartIndex].timestamp;
+
+ var option = $("").val((Math.floor(this.timestamp / 1000))).text(this.label).attr('data-index', index).attr('data-time', time).attr('data-eta', eta).attr('data-block', this.superblock);
+ end_epoch.append(option);
+
+ }
});
-
};
PaymentCycle.prototype.getInfo = function(cb) {