add subscribe to initial shared address
This commit is contained in:
parent
3210c87ec1
commit
d919230124
3 changed files with 8 additions and 5 deletions
|
|
@ -498,6 +498,7 @@ PublicKeyRing.prototype.getCosigner = function(pubKey) {
|
||||||
PublicKeyRing.prototype.buildAddressCache = function() {
|
PublicKeyRing.prototype.buildAddressCache = function() {
|
||||||
var ret = [];
|
var ret = [];
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
_.each(this.indexes, function(index) {
|
_.each(this.indexes, function(index) {
|
||||||
for (var i = 0; i < index.receiveIndex; i++) {
|
for (var i = 0; i < index.receiveIndex; i++) {
|
||||||
self._getAddress(i, false, index.copayerIndex);
|
self._getAddress(i, false, index.copayerIndex);
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@ Wallet.prototype._onPublicKeyRing = function(senderId, data) {
|
||||||
}
|
}
|
||||||
if (this.publicKeyRing.isComplete()) {
|
if (this.publicKeyRing.isComplete()) {
|
||||||
this._lockIncomming();
|
this._lockIncomming();
|
||||||
|
this.subscribeToAddresses();
|
||||||
this.emitAndKeepAlive('ready');
|
this.emitAndKeepAlive('ready');
|
||||||
} else {
|
} else {
|
||||||
this.emitAndKeepAlive('publicKeyRingUpdated');
|
this.emitAndKeepAlive('publicKeyRingUpdated');
|
||||||
|
|
@ -739,7 +740,7 @@ Wallet.prototype._onData = function(senderId, data, ts) {
|
||||||
this._onSignature(senderId, data);
|
this._onSignature(senderId, data);
|
||||||
break;
|
break;
|
||||||
case 'indexes':
|
case 'indexes':
|
||||||
this._onIndexes(data.indexes);
|
this._onIndexes(senderId, data);
|
||||||
break;
|
break;
|
||||||
case 'addressbook':
|
case 'addressbook':
|
||||||
this._onAddressBook(senderId, data);
|
this._onAddressBook(senderId, data);
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ angular.module('copayApp.services')
|
||||||
};
|
};
|
||||||
|
|
||||||
root.notifyTxProposalEvent = function(w, e) {
|
root.notifyTxProposalEvent = function(w, e) {
|
||||||
if (e.cId == w.getMyCopayerId())
|
if (e.cId == w.getMyCopayerId())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
var user = w.publicKeyRing.nicknameForCopayer(e.cId);
|
||||||
|
|
@ -227,7 +227,7 @@ angular.module('copayApp.services')
|
||||||
// w.on('paymentACK', function(memo) {
|
// w.on('paymentACK', function(memo) {
|
||||||
// notification.success('Payment Acknowledged', memo);
|
// notification.success('Payment Acknowledged', memo);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
w.on('txProposalEvent', function(ev) {
|
w.on('txProposalEvent', function(ev) {
|
||||||
|
|
||||||
if (root.isFocused(wid)) {
|
if (root.isFocused(wid)) {
|
||||||
|
|
@ -241,7 +241,7 @@ angular.module('copayApp.services')
|
||||||
}, root.isFocused(wid));
|
}, root.isFocused(wid));
|
||||||
|
|
||||||
root.notifyTxProposalEvent(w, ev);
|
root.notifyTxProposalEvent(w, ev);
|
||||||
$timeout(function(){
|
$timeout(function() {
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -269,7 +269,8 @@ angular.module('copayApp.services')
|
||||||
root.setupGlobalVariables(iden);
|
root.setupGlobalVariables(iden);
|
||||||
iden.on('newWallet', function(wid) {
|
iden.on('newWallet', function(wid) {
|
||||||
var w = iden.getWalletById(wid);
|
var w = iden.getWalletById(wid);
|
||||||
copay.logger.debug('newWallet:', w.getName(), wid, iden.getLastFocusedWalletId());
|
copay.logger.debug('newWallet:',
|
||||||
|
w.getName(), wid, iden.getLastFocusedWalletId());
|
||||||
root.installWalletHandlers(w);
|
root.installWalletHandlers(w);
|
||||||
if (wid == iden.getLastFocusedWalletId()) {
|
if (wid == iden.getLastFocusedWalletId()) {
|
||||||
copay.logger.debug('GOT Focused wallet:', w.getName());
|
copay.logger.debug('GOT Focused wallet:', w.getName());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue