mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-25 02:58:33 +02:00
Seed: refactor
This commit is contained in:
@@ -117,15 +117,17 @@ void WalletWizard::onCreateWallet() {
|
||||
return;
|
||||
}
|
||||
|
||||
auto seed = FeatherSeed(constants::networkType, QString::fromStdString(constants::coinName), constants::seedLanguage, m_wizardFields.seed.split(" "));
|
||||
auto seed = Seed(m_wizardFields.seedType, m_wizardFields.seed.split(" "), constants::networkType);
|
||||
|
||||
// If we're connected to the websocket, use the reported height for new wallets to skip initial synchronization.
|
||||
if (m_wizardFields.mode == WizardMode::CreateWallet && currentBlockHeight > 0) {
|
||||
qInfo() << "New wallet, setting restore height to latest blockheight: " << currentBlockHeight;
|
||||
seed.setRestoreHeight(currentBlockHeight);
|
||||
seed.restoreHeight = currentBlockHeight;
|
||||
}
|
||||
|
||||
if (m_wizardFields.mode == WizardMode::RestoreFromSeed && m_wizardFields.seedType == SeedType::MONERO)
|
||||
if (m_wizardFields.mode == WizardMode::RestoreFromSeed && m_wizardFields.seedType == Seed::Type::MONERO) {
|
||||
seed.setRestoreHeight(m_wizardFields.restoreHeight);
|
||||
}
|
||||
|
||||
emit createWallet(seed, walletPath, m_wizardFields.password, m_wizardFields.seedLanguage, m_wizardFields.seedOffsetPassphrase);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user