add resync to refresh button
This commit is contained in:
parent
297b5625bc
commit
ad4ebfdc3c
3 changed files with 6 additions and 17 deletions
|
|
@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
||||||
|
|
||||||
$scope.refresh = function() {
|
$scope.refresh = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
w.connectToAll();
|
w.sendWalletReady();
|
||||||
if ($rootScope.addrInfos.length > 0) {
|
if ($rootScope.addrInfos.length > 0) {
|
||||||
controllerUtils.updateBalance(function() {
|
controllerUtils.updateBalance(function() {
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
|
|
|
||||||
|
|
@ -86,19 +86,6 @@ Wallet.prototype.seedCopayer = function(pubKey) {
|
||||||
this.seededCopayerId = 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) {
|
Wallet.prototype._onIndexes = function(senderId, data) {
|
||||||
this.log('RECV INDEXES:', data);
|
this.log('RECV INDEXES:', data);
|
||||||
var inIndexes = HDParams.fromList(data.indexes);
|
var inIndexes = HDParams.fromList(data.indexes);
|
||||||
|
|
@ -647,8 +634,7 @@ Wallet.prototype.sendReject = function(ntxid) {
|
||||||
|
|
||||||
|
|
||||||
Wallet.prototype.sendWalletReady = function(recipients) {
|
Wallet.prototype.sendWalletReady = function(recipients) {
|
||||||
preconditions.checkArgument(recipients);
|
this.log('### SENDING WalletReady TO:', recipients || 'All');
|
||||||
this.log('### SENDING WalletReady TO:', recipients);
|
|
||||||
|
|
||||||
this.send(recipients, {
|
this.send(recipients, {
|
||||||
type: 'walletReady',
|
type: 'walletReady',
|
||||||
|
|
|
||||||
|
|
@ -345,13 +345,16 @@ Network.prototype.send = function(dest, payload, cb) {
|
||||||
dest = this.getCopayerIds();
|
dest = this.getCopayerIds();
|
||||||
payload.isBroadcast = 1;
|
payload.isBroadcast = 1;
|
||||||
}
|
}
|
||||||
|
console.log('SEND to: ' + to, payload);
|
||||||
|
|
||||||
if (typeof dest === 'string')
|
if (typeof dest === 'string')
|
||||||
dest = [dest];
|
dest = [dest];
|
||||||
|
|
||||||
var l = dest.length;
|
var l = dest.length;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
//console.log('sending ' + JSON.stringify(payload));
|
|
||||||
dest.forEach(function(to) {
|
dest.forEach(function(to) {
|
||||||
|
|
||||||
|
|
||||||
//console.log('\t to ' + to);
|
//console.log('\t to ' + to);
|
||||||
var message = self.encode(to, payload);
|
var message = self.encode(to, payload);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue