diff --git a/src/appcontext.cpp b/src/appcontext.cpp index 329e303..77fa897 100644 --- a/src/appcontext.cpp +++ b/src/appcontext.cpp @@ -530,6 +530,11 @@ void AppContext::createWallet(FeatherSeed seed, const QString &path, const QStri return; } + if(seed.mnemonicSeed.isEmpty()) { + emit walletCreatedError("Mnemonic seed error. Failed to write wallet."); + return; + } + this->currentWallet = seed.writeWallet(this->walletManager, this->networkType, path, password, this->kdfRounds); if(this->currentWallet == nullptr) { emit walletCreatedError("Failed to write wallet"); diff --git a/src/wizard/walletwizard.cpp b/src/wizard/walletwizard.cpp index 112aad7..13dd1f9 100644 --- a/src/wizard/walletwizard.cpp +++ b/src/wizard/walletwizard.cpp @@ -53,7 +53,8 @@ WalletWizard::WalletWizard(AppContext *ctx, WalletWizard::Page startPage, QWidge } void WalletWizard::createWallet() { - auto mnemonicSeed = this->field("mnemonicSeed").toString(); + auto mnemonicRestoredSeed = this->field("mnemonicRestoredSeed").toString(); + auto mnemonicSeed = mnemonicRestoredSeed.isEmpty() ? this->field("mnemonicSeed").toString() : mnemonicRestoredSeed; const auto walletPath = this->field("walletPath").toString(); const auto walletPasswd = this->field("walletPasswd").toString(); auto restoreHeight = this->field("restoreHeight").toUInt();