|
|
@ -253,10 +253,11 @@ WalletService.prototype._emit = function(eventName, args) { |
|
|
|
/** |
|
|
|
* _notify |
|
|
|
* |
|
|
|
* @param type |
|
|
|
* @param data |
|
|
|
* @param {String} type |
|
|
|
* @param {Object} data |
|
|
|
* @param {Boolean} isGlobal - If true, the notification is not issued on behalf of any particular copayer (defaults to false) |
|
|
|
*/ |
|
|
|
WalletService.prototype._notify = function(type, data) { |
|
|
|
WalletService.prototype._notify = function(type, data, isGlobal) { |
|
|
|
var self = this; |
|
|
|
|
|
|
|
log.debug('Notification', type, data); |
|
|
@ -270,7 +271,7 @@ WalletService.prototype._notify = function(type, data) { |
|
|
|
type: type, |
|
|
|
data: data, |
|
|
|
ticker: this.notifyTicker++, |
|
|
|
creatorId: copayerId, |
|
|
|
creatorId: isGlobal ? null : copayerId, |
|
|
|
walletId: walletId, |
|
|
|
}); |
|
|
|
this.storage.storeNotification(walletId, n, function() { |
|
|
@ -1219,7 +1220,7 @@ WalletService.prototype.startScan = function(opts, cb) { |
|
|
|
} else { |
|
|
|
data.result = 'success'; |
|
|
|
} |
|
|
|
self._notify('ScanFinished', data); |
|
|
|
self._notify('ScanFinished', data, true); |
|
|
|
}; |
|
|
|
|
|
|
|
Utils.runLocked(self.walletId, cb, function(cb) { |
|
|
|