Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to filter front page TXs by a minimum amount. Default: 0 #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.DEV
* Added new setting to control minimum amount for txs to be displayed on the front page: index.last_txs_min_amount

1.7.4
* Updated themes to Bootstrap 4.5 by using latest Bootswatch themes
* Deleted unmaintained themes that were never ported to Bootstrap4
Expand Down
4 changes: 4 additions & 0 deletions UPGRADE
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Note: All updates require the explorer to be restarted
1.7.4 -> DEV
* Add new settings to settings.json (see settings.json.template)
* index.last_txs_min_amount

1.7.3 -> 1.7.4
* Ensure that you are not using theme "Paper" or "Readable" as these were not ported by Bootswatch
* Add new settings to settings.json (see settings.json.template)
Expand Down
1 change: 1 addition & 0 deletions lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ exports.index = {
"show_market_cap_over_price": false,
"difficulty": "POW",
"last_txs": 100,
"last_txs_min_amount": 0,
"txs_per_page": 10
};

Expand Down
1 change: 1 addition & 0 deletions settings.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"show_market_cap_over_price": false,
"difficulty": "POW",
"last_txs": 100,
"last_txs_min_amount": 0,
"txs_per_page": 10
},

Expand Down
3 changes: 2 additions & 1 deletion views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ block content
script.
var setting_maxTxCount = parseInt("#{settings.index.last_txs}");
var setting_txPerPage = parseInt("#{settings.index.txs_per_page}");
var setting_txMinAmt = parseFloat("#{settings.index.last_txs_min_amount}");
var lengthMenuOpts = [];
var lengthMenuOptsAdd = [ 10, 25, 50, 75, 100, 250, 500, 1000 ];
for (i=0; i < lengthMenuOptsAdd.length; i++) {
Expand Down Expand Up @@ -53,7 +54,7 @@ block content
serverSide: true,
iDisplayLength: displayLengthMax,
lengthMenu: lengthMenuOpts,
ajax: '/ext/getlasttxsajax/0',
ajax: '/ext/getlasttxsajax/' + setting_txMinAmt,
rowCallback: function(row, data, index) {
var blockindex = data[0]; //variables for better readability
var blockhash = data[1]; //variables for better readability
Expand Down