mirror of https://github.com/BTCPrivate/copay.git
actually create wallet and redirect
This commit is contained in:
parent
8478402237
commit
b504074009
|
@ -1,11 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copay.setup').controller('SetupController',
|
angular.module('copay.setup').controller('SetupController',
|
||||||
function($scope, $rootScope, $location, Network) {
|
function($scope, $rootScope, $location, walletFactory) {
|
||||||
|
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
||||||
$scope.selectedWalletId = false;
|
|
||||||
$scope.totalCopayers = config.wallet.totalCopayers;
|
$scope.totalCopayers = config.wallet.totalCopayers;
|
||||||
$scope.TCValues = [];
|
$scope.TCValues = [];
|
||||||
for (var n = 1; n <= config.limits.totalCopayers; n++)
|
for (var n = 1; n <= config.limits.totalCopayers; n++)
|
||||||
|
@ -27,8 +26,18 @@ angular.module('copay.setup').controller('SetupController',
|
||||||
})
|
})
|
||||||
|
|
||||||
$scope.create = function(totalCopayers, requiredCopayers) {
|
$scope.create = function(totalCopayers, requiredCopayers) {
|
||||||
alert(totalCopayers);
|
$scope.loading = true;
|
||||||
alert(requiredCopayers);
|
var opts = {
|
||||||
|
requiredCopayers: requiredCopayers,
|
||||||
|
totalCopayers: totalCopayers
|
||||||
|
};
|
||||||
|
var w = walletFactory.create();
|
||||||
|
w.on('open', function(){
|
||||||
|
$location.path('peer');
|
||||||
|
$rootScope.wallet = w;
|
||||||
|
$rootScope.$digest();
|
||||||
|
});
|
||||||
|
w.netStart();
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue