mirror of https://github.com/BTCPrivate/copay.git
add resync to refresh button
This commit is contained in:
parent
297b5625bc
commit
ad4ebfdc3c
|
@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
|
||||
$scope.refresh = function() {
|
||||
var w = $rootScope.wallet;
|
||||
w.connectToAll();
|
||||
w.sendWalletReady();
|
||||
if ($rootScope.addrInfos.length > 0) {
|
||||
controllerUtils.updateBalance(function() {
|
||||
$rootScope.$digest();
|
||||
|
|
|
@ -86,19 +86,6 @@ Wallet.prototype.seedCopayer = function(pubKey) {
|
|||
this.seededCopayerId = pubKey;
|
||||
};
|
||||
|
||||
// not being used now
|
||||
Wallet.prototype.connectToAll = function() {
|
||||
// not being used now
|
||||
return;
|
||||
|
||||
var all = this.publicKeyRing.getAllCopayerIds();
|
||||
this.network.connectToCopayers(all);
|
||||
if (this.seededCopayerId) {
|
||||
this.sendWalletReady(this.seededCopayerId);
|
||||
this.seededCopayerId = null;
|
||||
}
|
||||
};
|
||||
|
||||
Wallet.prototype._onIndexes = function(senderId, data) {
|
||||
this.log('RECV INDEXES:', data);
|
||||
var inIndexes = HDParams.fromList(data.indexes);
|
||||
|
@ -647,8 +634,7 @@ Wallet.prototype.sendReject = function(ntxid) {
|
|||
|
||||
|
||||
Wallet.prototype.sendWalletReady = function(recipients) {
|
||||
preconditions.checkArgument(recipients);
|
||||
this.log('### SENDING WalletReady TO:', recipients);
|
||||
this.log('### SENDING WalletReady TO:', recipients || 'All');
|
||||
|
||||
this.send(recipients, {
|
||||
type: 'walletReady',
|
||||
|
|
|
@ -345,13 +345,16 @@ Network.prototype.send = function(dest, payload, cb) {
|
|||
dest = this.getCopayerIds();
|
||||
payload.isBroadcast = 1;
|
||||
}
|
||||
console.log('SEND to: ' + to, payload);
|
||||
|
||||
if (typeof dest === 'string')
|
||||
dest = [dest];
|
||||
|
||||
var l = dest.length;
|
||||
var i = 0;
|
||||
//console.log('sending ' + JSON.stringify(payload));
|
||||
dest.forEach(function(to) {
|
||||
|
||||
|
||||
//console.log('\t to ' + to);
|
||||
var message = self.encode(to, payload);
|
||||
|
||||
|
|
Loading…
Reference in New Issue