peer checking againt by key ring

This commit is contained in:
Matias Alejo Garcia 2014-04-24 23:13:55 -03:00
commit e88dc7afb3
9 changed files with 199 additions and 138 deletions

View file

@ -34,7 +34,7 @@ angular.module('copay.setup').controller('SetupController',
name: walletName,
};
var w = walletFactory.create(opts);
controllerUtils.setupUxHandlers(w);
controllerUtils.startNetwork(w);
};
});

View file

@ -13,7 +13,7 @@ angular.module('copay.signin').controller('SigninController',
$scope.open = function(walletId, opts) {
$scope.loading = true;
var w = walletFactory.open(walletId, opts);
controllerUtils.setupUxHandlers(w);
controllerUtils.startNetwork(w);
};
$scope.join = function(secret) {
@ -28,8 +28,13 @@ angular.module('copay.signin').controller('SigninController',
});
walletFactory.joinCreateSession(secret, function(w) {
console.log('[signin.js.33] joinCreateSession RETURN', w); //TODO
controllerUtils.setupUxHandlers(w);
if (w) {
controllerUtils.startNetwork(w);
}
else {
$scope.loading = false;
controllerUtils.onErrorDigest();
}
});
};
});

View file

@ -73,13 +73,15 @@ angular.module('copay.transactions').controller('TransactionsController',
$scope.getTransactions = function() {
var w =$rootScope.wallet;
var addresses = w.getAddressesStr();
if (w) {
var addresses = w.getAddressesStr();
if (addresses.length > 0) {
w.blockchain.getTransactions(addresses, function(txs) {
$scope.blockchain_txs = txs;
$rootScope.$digest();
});
if (addresses.length > 0) {
w.blockchain.getTransactions(addresses, function(txs) {
$scope.blockchain_txs = txs;
$rootScope.$digest();
});
}
}
};