mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 17:32:33 +00:00
Merge pull request #2076
ac0714dc
add simplewallet --generate-new-wallet arg checks (Michael Shick)
This commit is contained in:
commit
fb7d6db051
1 changed files with 9 additions and 0 deletions
|
@ -929,6 +929,11 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
|
||||||
fail_msg_writer() << tr("can't specify both --restore-deterministic-wallet and --non-deterministic");
|
fail_msg_writer() << tr("can't specify both --restore-deterministic-wallet and --non-deterministic");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!m_wallet_file.empty())
|
||||||
|
{
|
||||||
|
fail_msg_writer() << tr("--restore-deterministic-wallet uses --generate-new-wallet, not --wallet-file");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_electrum_seed.empty())
|
if (m_electrum_seed.empty())
|
||||||
{
|
{
|
||||||
|
@ -1090,6 +1095,10 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (m_generate_new.empty()) {
|
||||||
|
fail_msg_writer() << tr("specify a wallet path with --generate-new-wallet (not --wallet-file)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
m_wallet_file = m_generate_new;
|
m_wallet_file = m_generate_new;
|
||||||
bool r = new_wallet(vm, m_recovery_key, m_restore_deterministic_wallet, m_non_deterministic, old_language);
|
bool r = new_wallet(vm, m_recovery_key, m_restore_deterministic_wallet, m_non_deterministic, old_language);
|
||||||
CHECK_AND_ASSERT_MES(r, false, tr("account creation failed"));
|
CHECK_AND_ASSERT_MES(r, false, tr("account creation failed"));
|
||||||
|
|
Loading…
Reference in a new issue