fix confirm method
This commit is contained in:
parent
f64b99938a
commit
32a1817ccb
2 changed files with 22 additions and 25 deletions
|
|
@ -155,32 +155,28 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div ng-show="wordsC.step4">
|
<div ng-show="wordsC.step4">
|
||||||
<div class="box-notification" ng-show="wordsC.backupNoOk">
|
<!-- <div class="box-notification" ng-show="wordsC.backupError">
|
||||||
<span class="text-warning" translate>
|
<span class="text-warning" translate>
|
||||||
Failed to verify backup. Please try again
|
Failed to verify backup. Please try again
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="onGoingProcess" ng-show="wordsC.checking">
|
<div class="row m10t m10b text-center" ng-show="!wordsC.backupError">
|
||||||
<div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="rect1"></div>
|
|
||||||
<div class="rect2"></div>
|
|
||||||
<div class="rect3"></div>
|
|
||||||
<div class="rect4"></div>
|
|
||||||
<div class="rect5"></div>
|
|
||||||
</div>
|
|
||||||
<span translate>Verifying...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row m10t m10b text-center">
|
|
||||||
<div class="circle-icon">
|
<div class="circle-icon">
|
||||||
<i class="fi-like size-48"></i>
|
<i class="fi-like size-48"></i>
|
||||||
</div>
|
</div>
|
||||||
<h5>Congratulation</h5>
|
<h5>Congratulation</h5>
|
||||||
<p class="text-gray p20" translate>
|
<p class="text-gray p20" translate>
|
||||||
You backed up your new wallet. You can now restore this wallet at any time.
|
You backed up your new wallet. You can now restore this wallet at any time
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="row m10t m10b text-center" ng-show="wordsC.backupError">
|
||||||
|
<div class="circle-icon">
|
||||||
|
<i class="fi-like size-48"></i>
|
||||||
|
</div>
|
||||||
|
<h5>Backup failed</h5>
|
||||||
|
<p class="text-gray p20" translate>
|
||||||
|
Failed to verify backup. Please try again
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -188,7 +184,7 @@
|
||||||
<button
|
<button
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
class="button round expand"
|
class="button round expand"
|
||||||
ng-click="wordsC.confirm();"
|
ng-click="$root.go('walletHome');"
|
||||||
translate>Finish
|
translate>Finish
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
self.deleted = false;
|
self.deleted = false;
|
||||||
self.credentialsEncrypted = false;
|
self.credentialsEncrypted = false;
|
||||||
self.selectComplete = false;
|
self.selectComplete = false;
|
||||||
self.backupNoOk = false;
|
self.backupError = false;
|
||||||
|
|
||||||
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic)
|
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic)
|
||||||
self.deleted = true;
|
self.deleted = true;
|
||||||
|
|
@ -50,10 +50,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
self.step3 = true;
|
self.step3 = true;
|
||||||
self.step4 = false;
|
self.step4 = false;
|
||||||
} else {
|
} else {
|
||||||
self.step1 = false;
|
self.goToStep4();
|
||||||
self.step2 = false;
|
|
||||||
self.step3 = false;
|
|
||||||
self.step4 = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
@ -62,10 +59,13 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
}
|
}
|
||||||
|
|
||||||
self.goToStep4 = function() {
|
self.goToStep4 = function() {
|
||||||
|
self.confirm();
|
||||||
|
|
||||||
self.step1 = false;
|
self.step1 = false;
|
||||||
self.step2 = false;
|
self.step2 = false;
|
||||||
self.step3 = false;
|
self.step3 = false;
|
||||||
self.step4 = true;
|
self.step4 = true;
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
@ -156,7 +156,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
}
|
}
|
||||||
|
|
||||||
self.confirm = function() {
|
self.confirm = function() {
|
||||||
self.backupNoOk = false;
|
self.backupError = false;
|
||||||
|
|
||||||
var walletClient = bwcService.getClient();
|
var walletClient = bwcService.getClient();
|
||||||
|
|
||||||
|
|
@ -180,10 +180,12 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
$log.debug('Failed to verify backup: ', err);
|
$log.debug('Failed to verify backup: ', err);
|
||||||
self.backupNoOk = true;
|
self.backupError = true;
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -193,7 +195,6 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
|
|
||||||
if (lodash.isEqual(words, customWords)) {
|
if (lodash.isEqual(words, customWords)) {
|
||||||
$rootScope.$emit('Local/BackupDone');
|
$rootScope.$emit('Local/BackupDone');
|
||||||
go.walletHome();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue