fix backup without seed
This commit is contained in:
parent
dd382de0dd
commit
91ac072083
3 changed files with 17 additions and 14 deletions
|
|
@ -19,17 +19,17 @@
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="content preferences text-center">
|
<div class="box-notification" ng-show="wordsC.error">
|
||||||
<div class="box-notification" ng-show="wordsC.error">
|
<span class="text-warning" translate>
|
||||||
<span class="text-warning">
|
{{wordsC.error}}
|
||||||
{{wordsC.error|translate}}
|
</span>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
## STEP 1
|
## STEP 1
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<div class="content preferences text-center">
|
||||||
<div ng-show="wordsC.step == 1">
|
<div ng-show="wordsC.step == 1">
|
||||||
<div ng-show="wordsC.mnemonicWords || (wordsC.credentialsEncrypted && !wordsC.deleted)" class="row">
|
<div ng-show="wordsC.mnemonicWords || (wordsC.credentialsEncrypted && !wordsC.deleted)" class="row">
|
||||||
<h5 class="text-center" translate>Write your wallet recovery phrase</h5>
|
<h5 class="text-center" translate>Write your wallet recovery phrase</h5>
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button
|
<button
|
||||||
ng-show="!wordsC.deleted"
|
ng-show="!wordsC.deleted"
|
||||||
ng-disabled="wordsC.credentialsEncrypted"
|
ng-disabled="wordsC.credentialsEncrypted || wordsC.error"
|
||||||
class="round expand m0"
|
class="round expand m0"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-click="wordsC.goToStep(2);"
|
ng-click="wordsC.goToStep(2);"
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,11 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic)
|
if (fc.isPrivKeyEncrypted() && !isDeletedSeed()) {
|
||||||
self.deleted = true;
|
|
||||||
|
|
||||||
if (fc.isPrivKeyEncrypted() && !self.deleted) {
|
|
||||||
self.credentialsEncrypted = true;
|
self.credentialsEncrypted = true;
|
||||||
passwordRequest();
|
passwordRequest();
|
||||||
} else {
|
} else {
|
||||||
if (!self.deleted)
|
if (!isDeletedSeed())
|
||||||
initWords();
|
initWords();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,12 +31,18 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
self.shuffledMnemonicWords = shuffledWords(self.mnemonicWords);
|
self.shuffledMnemonicWords = shuffledWords(self.mnemonicWords);
|
||||||
self.customWords = [];
|
self.customWords = [];
|
||||||
self.step = 1;
|
self.step = 1;
|
||||||
self.deleted = false;
|
self.deleted = isDeletedSeed();
|
||||||
self.credentialsEncrypted = false;
|
self.credentialsEncrypted = false;
|
||||||
self.selectComplete = false;
|
self.selectComplete = false;
|
||||||
self.backupError = false;
|
self.backupError = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isDeletedSeed() {
|
||||||
|
if (lodash.isEmpty(fc.credentials.mnemonic) && lodash.isEmpty(fc.credentials.mnemonicEncrypted))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
self.goToStep = function(n) {
|
self.goToStep = function(n) {
|
||||||
self.step = n;
|
self.step = n;
|
||||||
if (self.step == 1)
|
if (self.step == 1)
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ button.radius, .button.radius {
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.8rem;
|
padding: 0.8rem;
|
||||||
z-index: 9999;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backup .button-box {
|
.backup .button-box {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue