mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 13:23:29 +01:00
wallet: fix load failure if the mms isn't usable
This commit is contained in:
parent
1d1a02e9f9
commit
576116d415
@ -9952,6 +9952,16 @@ void simple_wallet::mms_auto_config(const std::vector<std::string> &args)
|
|||||||
|
|
||||||
bool simple_wallet::mms(const std::vector<std::string> &args)
|
bool simple_wallet::mms(const std::vector<std::string> &args)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_wallet->get_multisig_wallet_state();
|
||||||
|
}
|
||||||
|
catch(const std::exception &e)
|
||||||
|
{
|
||||||
|
fail_msg_writer() << tr("MMS not available in this wallet");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mms::message_store& ms = m_wallet->get_message_store();
|
mms::message_store& ms = m_wallet->get_message_store();
|
||||||
|
@ -5085,7 +5085,14 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
|
|||||||
MERROR("Failed to save rings, will try again next time");
|
MERROR("Failed to save rings, will try again next time");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file);
|
m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file);
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
MERROR("Failed to initialize MMS, it will be unusable");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
void wallet2::trim_hashchain()
|
void wallet2::trim_hashchain()
|
||||||
|
Loading…
Reference in New Issue
Block a user