Import wallet from keys (view-only)

Signed-off-by: dsc <dsc@xmr.pm>
This commit is contained in:
dsc
2020-10-13 21:09:33 +02:00
parent d465639d2a
commit eac29cd0b6
19 changed files with 619 additions and 23 deletions
+8 -2
View File
@@ -82,7 +82,12 @@ bool CreateWalletPage::validateWidgets(){
int CreateWalletPage::nextId() const {
auto restoredSeed = this->field("mnemonicRestoredSeed").toString();
return restoredSeed.isEmpty() ? WalletWizard::Page_CreateWalletSeed : -1;
auto restoredViewOnlyKey = this->field("viewOnlyViewKey").toString();
if(!restoredSeed.isEmpty() || !restoredViewOnlyKey.isEmpty())
return -1;
return WalletWizard::Page_CreateWalletSeed;
}
bool CreateWalletPage::validatePage() {
@@ -93,6 +98,7 @@ bool CreateWalletPage::validatePage() {
ui->walletName->setStyleSheet("");
auto restoredSeed = this->field("mnemonicRestoredSeed").toString();
if(!restoredSeed.isEmpty()) emit createWallet();
auto restoredViewOnlyKey = this->field("viewOnlyViewKey").toString();
if(!restoredSeed.isEmpty() || !restoredViewOnlyKey.isEmpty()) emit createWallet();
return true;
}