new onGoingProcess
This commit is contained in:
parent
c294097c1d
commit
90dad5b2a8
33 changed files with 200 additions and 267 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('createController',
|
||||
function($scope, $ionicScrollDelegate, $rootScope, $timeout, $log, lodash, go, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper) {
|
||||
function($scope, $ionicScrollDelegate, $rootScope, $timeout, $log, lodash, go, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess) {
|
||||
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
var isCordova = platformInfo.isCordova;
|
||||
|
|
@ -147,11 +147,12 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
account = account - 1;
|
||||
|
||||
opts.account = account;
|
||||
self.hwWallet = self.seedSourceId == 'ledger' ? 'Ledger' : 'Trezor';
|
||||
ongoingProcess.set('connecting' + self.seedSourceId, true);
|
||||
|
||||
var src = self.seedSourceId == 'ledger' ? ledger : trezor;
|
||||
|
||||
src.getInfoForNewWallet(opts.n > 1, account, function(err, lopts) {
|
||||
self.hwWallet = false;
|
||||
ongoingProcess.set('connecting' + self.seedSourceId, false);
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$ionicScrollDelegate.scrollTop();
|
||||
|
|
@ -167,11 +168,11 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
};
|
||||
|
||||
this._create = function(opts) {
|
||||
self.loading = true;
|
||||
ongoingProcess.set('creatingWallet', true);
|
||||
$timeout(function() {
|
||||
|
||||
profileService.createWallet(opts, function(err) {
|
||||
self.loading = false;
|
||||
ongoingProcess.set('creatingWallet', false);
|
||||
if (err) {
|
||||
$log.warn(err);
|
||||
self.error = err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue