Browse Source

test passing with notifications

activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
fa4de0deaf
  1. 20
      lib/server.js

20
lib/server.js

@ -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;

Loading…
Cancel
Save