From 36a0996f0f741796db145daeabfcfbf7a7145dc2 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Tue, 2 Dec 2014 15:02:56 -0300 Subject: [PATCH] fixed issue with NaNs in getTxHistory --- js/models/Wallet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/models/Wallet.js b/js/models/Wallet.js index d6fd0a061..13a90cfd4 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -2683,6 +2683,9 @@ Wallet.prototype.getTransactionHistory = function(opts, cb) { if (addresses.length > 0) { var from = (opts.currentPage - 1) * opts.itemsPerPage; var to = opts.currentPage * opts.itemsPerPage; + if (!_.isNumber(from) || _.isNaN(from)) from = 0; + if (!_.isNumber(to) || _.isNaN(to)) to = null; + self.blockchain.getTransactions(addresses, from, to, function(err, res) { if (err) return cb(err);