test passing with notifications
This commit is contained in:
parent
d548639334
commit
fa4de0deaf
|
@ -707,7 +707,7 @@ CopayServer.prototype.getPendingTxs = function(opts, cb) {
|
||||||
* @param {Object} opts.minTs (defaults to 0)
|
* @param {Object} opts.minTs (defaults to 0)
|
||||||
* @param {Object} opts.maxTs (defaults to now)
|
* @param {Object} opts.maxTs (defaults to now)
|
||||||
* @param {Object} opts.limit
|
* @param {Object} opts.limit
|
||||||
* @returns {TxProposal[]} Transaction proposal.
|
* @returns {TxProposal[]} Transaction proposals, first newer
|
||||||
*/
|
*/
|
||||||
CopayServer.prototype.getTxs = function(opts, cb) {
|
CopayServer.prototype.getTxs = function(opts, cb) {
|
||||||
var self = this;
|
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;
|
module.exports = CopayServer;
|
||||||
|
|
Loading…
Reference in New Issue