Skip to content
Permalink
Browse files
Merge pull request #451 from TheHolyRogerCoin/fix/richlist-address-la…
…bels

Fix / Richlist address labels
  • Loading branch information
TheHolyRoger committed Mar 19, 2021
2 parents 6534904 + 923f2ed commit 5f33fea620701db019f4bd4dae28bc0e28a53a67
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/database.js
  2. +1 −1 views/includes/rl_labels.pug
@@ -307,15 +307,15 @@ module.exports = {
//property: 'received' or 'balance'
update_richlist: function(list, cb){
if(list == 'received') {
Address.find({}, 'a_id balance received').sort({received: 'desc'}).limit(100).exec(function(err, addresses){
Address.find({}, 'a_id balance received name').sort({received: 'desc'}).limit(100).exec(function(err, addresses){
Richlist.updateOne({coin: settings.coin}, {
received: addresses,
}, function() {
return cb();
});
});
} else { //balance
Address.find({}, 'a_id balance received').sort({balance: 'desc'}).limit(100).exec(function(err, addresses){
Address.find({}, 'a_id balance received name').sort({balance: 'desc'}).limit(100).exec(function(err, addresses){
Richlist.updateOne({coin: settings.coin}, {
balance: addresses,
}, function() {
@@ -1,4 +1,4 @@
if settings.labels[item.a_id]
if typeof settings.labels[item.a_id] !== "undefined" && settings.labels[item.a_id]
if settings.labels[item.a_id].type
label(class='label label-'+settings.labels[item.a_id].type+' pull-right hidden-xs', style='margin-left:15px;')
=settings.labels[item.a_id].label

0 comments on commit 5f33fea

Please sign in to comment.