From 15a2c5f3629da7e1259e606811fa3637ca10031e Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Fri, 20 Oct 2023 14:14:52 +0000 Subject: [PATCH] cake wallet extension --- src/wallet/plain_wallet_api.cpp | 15 +-------------- src/wallet/plain_wallet_api_ex.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 src/wallet/plain_wallet_api_ex.h diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp index d628446e..49a8b08c 100644 --- a/src/wallet/plain_wallet_api.cpp +++ b/src/wallet/plain_wallet_api.cpp @@ -17,7 +17,7 @@ #include "common/config_encrypt_helper.h" #include "static_helpers.h" #include "wallet_helpers.h" - +#include "plain_wallet_api_ex.h" #define ANDROID_PACKAGE_NAME "com.zano_mobile" @@ -34,19 +34,6 @@ //TODO: global objects, subject to refactoring - -struct plain_wallet_instance -{ - plain_wallet_instance() :initialized(false), gjobs_counter(1) - {} - wallets_manager gwm; - std::atomic initialized; - - std::atomic gjobs_counter; - std::map gjobs; - epee::critical_section gjobs_lock; -}; - std::shared_ptr ginstance_ptr; #define GET_INSTANCE_PTR(ptr_name) \ diff --git a/src/wallet/plain_wallet_api_ex.h b/src/wallet/plain_wallet_api_ex.h new file mode 100644 index 00000000..a56cd108 --- /dev/null +++ b/src/wallet/plain_wallet_api_ex.h @@ -0,0 +1,31 @@ +// Copyright (c) 2014-2020 Zano Project +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +#pragma once + +#include + +#include "wallet2.h" + +namespace plain_wallet +{ + struct plain_wallet_instance +{ + plain_wallet_instance() :initialized(false), gjobs_counter(1) + {} + wallets_manager gwm; + std::atomic initialized; + + std::atomic gjobs_counter; + std::map gjobs; + epee::critical_section gjobs_lock; +}; + + + extern std::shared_ptr ginstance_ptr; + + + +} \ No newline at end of file