adds PublicKeyRing syncing to the new classes schema
This commit is contained in:
parent
12e30a5e63
commit
9eadda0ed3
6 changed files with 269 additions and 125 deletions
|
|
@ -2,27 +2,43 @@
|
|||
|
||||
angular.module('copay.signin').controller('SigninController',
|
||||
function($scope, $rootScope, $location, Network, Storage) {
|
||||
var peerData = Storage.get('peerData');
|
||||
|
||||
var peerData = Storage.get($rootScope.walletId, 'peerData');
|
||||
|
||||
$scope.loading = false;
|
||||
$rootScope.peerId = peerData ? peerData.peerId : null;
|
||||
|
||||
$scope.listWalletIds = function() {
|
||||
return Storage.getWalletIds();
|
||||
};
|
||||
|
||||
$scope.create = function() {
|
||||
$scope.loading = true;
|
||||
|
||||
Network.createWallet();
|
||||
Network.init(function() {
|
||||
$location.path('peer');
|
||||
$rootScope.$digest();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.open = function(walletId) {
|
||||
$scope.loading = true;
|
||||
|
||||
if (Network.openWallet(walletId)) {
|
||||
Network.init(function() {
|
||||
$location.path('peer');
|
||||
$rootScope.$digest();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.join = function(cid) {
|
||||
$scope.loading = true;
|
||||
|
||||
if (cid) {
|
||||
Network.init(function() {
|
||||
Network.connect(cid, function() {
|
||||
console.log('[signin.js.26] REDIR'); //TODO
|
||||
$location.path('peer');
|
||||
$rootScope.$digest();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue