Movement: Use new lasttxsajax call and remove old code

This commit is contained in:
joeuhren
2020-11-20 18:12:49 -07:00
parent 9f814d4a16
commit 233265aa14
6 changed files with 58 additions and 48 deletions
+3 -13
View File
@@ -486,19 +486,9 @@ module.exports = {
});
},
get_last_txs: function(count, min, cb) {
Tx.find({'total': {$gt: min}, $where: "this.vout.length > 0"}).sort({_id: 'desc'}).limit(count).exec(function(err, txs){
if (err) {
return cb(err);
} else {
return cb(txs);
}
});
},
get_last_txs_ajax: function(start, length, cb) {
Tx.countDocuments({'total': {$gt: 1}}, function(err, count){
Tx.find({'total': {$gt: 1}}).sort({blockindex: 'desc'}).skip(Number(start)).limit(Number(length)).exec(function(err, txs){
get_last_txs_ajax: function(start, length, min, cb) {
Tx.countDocuments({'total': {$gt: min}}, function(err, count){
Tx.find({'total': {$gt: min}}).sort({blockindex: 'desc'}).skip(Number(start)).limit(Number(length)).exec(function(err, txs){
if (err) {
return cb(err);
} else {