mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
adapted default superblock for start date dropdown
This commit is contained in:
parent
718bc0ac3a
commit
5bd3161162
1 changed files with 2 additions and 6 deletions
|
@ -39,7 +39,7 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$.getJSON( "http://195.141.143.55:3001/insight-api-dash/status?q=getinfo", function( data ) {
|
$.getJSON("http://195.141.143.55:3001/insight-api-dash/status?q=getinfo", function( data ) {
|
||||||
blockheight = data.info.blocks;
|
blockheight = data.info.blocks;
|
||||||
console.log('network: ' + gov.network);
|
console.log('network: ' + gov.network);
|
||||||
var budgetPaymentCycleBlocks = getBudgetPaymentCycleBlocks();
|
var budgetPaymentCycleBlocks = getBudgetPaymentCycleBlocks();
|
||||||
|
@ -117,12 +117,8 @@
|
||||||
//if next superblock is less than 3 days (60*24*3/2.6) away, select next month's superblock by default so proposal has more time to be voted upon
|
//if next superblock is less than 3 days (60*24*3/2.6) away, select next month's superblock by default so proposal has more time to be voted upon
|
||||||
if (selectblock - blockheight < (60*24*bufferdays/2.6)) {
|
if (selectblock - blockheight < (60*24*bufferdays/2.6)) {
|
||||||
selectblock += budgetPaymentCycleBlocks;
|
selectblock += budgetPaymentCycleBlocks;
|
||||||
blockdiff = selectblock - blockheight;
|
start_epoch.val(selectblock);
|
||||||
nextsuperblocktimestamp = $.now() + blockdiff * (2.6 * 60 * 1000);
|
|
||||||
var selectstartdate = $.datepicker.formatDate('yy-mm-dd', new Date(nextsuperblocktimestamp));
|
|
||||||
start_epoch.val(selectstartdate);
|
|
||||||
nextsuperblocktimestamp = nextsuperblocktimestamp + budgetPaymentCycleBlocks * (2.6 * 60 * 1000);
|
nextsuperblocktimestamp = nextsuperblocktimestamp + budgetPaymentCycleBlocks * (2.6 * 60 * 1000);
|
||||||
var selectenddate = $.datepicker.formatDate('yy-mm-dd', new Date(nextsuperblocktimestamp));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue