aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp5
-rw-r--r--src/wallet/wallet2.h12
2 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index da181e9d9..1c5ec027c 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -679,6 +679,11 @@ void wallet2::wallet_exists(const std::string& file_path, bool& keys_file_exists
wallet_file_exists = boost::filesystem::exists(wallet_file, ignore);
}
//----------------------------------------------------------------------------------------------------
+bool wallet2::wallet_valid_path_format(const std::string& file_path)
+{
+ return !file_path.empty();
+}
+//----------------------------------------------------------------------------------------------------
bool wallet2::parse_payment_id(const std::string& payment_id_str, crypto::hash& payment_id)
{
cryptonote::blobdata payment_id_data;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index 5486efb0e..d9b1217c7 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -229,7 +229,19 @@ namespace tools
a & m_payments;
}
+ /*!
+ * \brief Check if wallet keys and bin files exist
+ * \param file_path Wallet file path
+ * \param keys_file_exists Whether keys file exists
+ * \param wallet_file_exists Whether bin file exists
+ */
static void wallet_exists(const std::string& file_path, bool& keys_file_exists, bool& wallet_file_exists);
+ /*!
+ * \brief Check if wallet file path is valid format
+ * \param file_path Wallet file path
+ * \return Whether path is valid format
+ */
+ static bool wallet_valid_path_format(const std::string& file_path);
static bool parse_payment_id(const std::string& payment_id_str, crypto::hash& payment_id);