test passing with notifications

This commit is contained in:
Matias Alejo Garcia 2015-02-11 23:13:19 -03:00
parent d548639334
commit fa4de0deaf
1 changed files with 19 additions and 1 deletions

View File

@ -707,7 +707,7 @@ CopayServer.prototype.getPendingTxs = function(opts, cb) {
* @param {Object} opts.minTs (defaults to 0)
* @param {Object} opts.maxTs (defaults to now)
* @param {Object} opts.limit
* @returns {TxProposal[]} Transaction proposal.
* @returns {TxProposal[]} Transaction proposals, first newer
*/
CopayServer.prototype.getTxs = function(opts, cb) {
var self = this;
@ -718,6 +718,24 @@ CopayServer.prototype.getTxs = function(opts, cb) {
};
/**
* Retrieves notifications in the range (maxTs-minTs).
* @param {Object} opts.minTs (defaults to 0)
* @param {Object} opts.maxTs (defaults to now)
* @param {Object} opts.limit
* @returns {Notification[]} Notifications, first newer
*/
CopayServer.prototype.getNotifications = function(opts, cb) {
var self = this;
self.storage.fetchNotifications(self.walletId, opts, function(err, notifications) {
if (err) return cb(err);
return cb(null, notifications);
});
};
module.exports = CopayServer;