diff --git a/app/config.js b/app/config.js index ca22fcb..2902a57 100644 --- a/app/config.js +++ b/app/config.js @@ -26,6 +26,11 @@ module.exports = { "walletpassphrasechange" ], + site: { + blockTxPageSize:20, + browseBlocksPageSize:20 + }, + credentials: credentials, // Edit "ipWhitelistForRpcCommands" regex to limit access to RPC Browser / Terminal to matching IPs diff --git a/routes/baseActionsRouter.js b/routes/baseActionsRouter.js index cdb3dbd..2b117c3 100644 --- a/routes/baseActionsRouter.js +++ b/routes/baseActionsRouter.js @@ -181,7 +181,7 @@ router.get("/changeSetting", function(req, res) { }); router.get("/blocks", function(req, res) { - var limit = 20; + var limit = config.site.browseBlocksPageSize; var offset = 0; var sort = "desc"; @@ -333,7 +333,7 @@ router.get("/block-height/:blockHeight", function(req, res) { res.locals.result = {}; - var limit = 20; + var limit = config.site.blockTxPageSize; var offset = 0; if (req.query.limit) { @@ -368,7 +368,7 @@ router.get("/block/:blockHash", function(req, res) { res.locals.result = {}; - var limit = 20; + var limit = config.site.blockTxPageSize; var offset = 0; if (req.query.limit) { diff --git a/views/includes/block-content.pug b/views/includes/block-content.pug index 394cc95..8d85b64 100644 --- a/views/includes/block-content.pug +++ b/views/includes/block-content.pug @@ -143,7 +143,7 @@ div(class="tab-content") else span Transactions - if (!crawlerBot && txCount > 20) + if (!demoSite && !crawlerBot && txCount > 20) div(class="col-md-8 text-right") span(class="mr-2") Show div(class="btn-group", role="group")