forked from lthn/blockchain
cake wallet extension
This commit is contained in:
parent
a60857a801
commit
15a2c5f362
2 changed files with 32 additions and 14 deletions
|
|
@ -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<bool> initialized;
|
||||
|
||||
std::atomic<uint64_t> gjobs_counter;
|
||||
std::map<uint64_t, std::string> gjobs;
|
||||
epee::critical_section gjobs_lock;
|
||||
};
|
||||
|
||||
std::shared_ptr<plain_wallet_instance> ginstance_ptr;
|
||||
|
||||
#define GET_INSTANCE_PTR(ptr_name) \
|
||||
|
|
|
|||
31
src/wallet/plain_wallet_api_ex.h
Normal file
31
src/wallet/plain_wallet_api_ex.h
Normal file
|
|
@ -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 <string>
|
||||
|
||||
#include "wallet2.h"
|
||||
|
||||
namespace plain_wallet
|
||||
{
|
||||
struct plain_wallet_instance
|
||||
{
|
||||
plain_wallet_instance() :initialized(false), gjobs_counter(1)
|
||||
{}
|
||||
wallets_manager gwm;
|
||||
std::atomic<bool> initialized;
|
||||
|
||||
std::atomic<uint64_t> gjobs_counter;
|
||||
std::map<uint64_t, std::string> gjobs;
|
||||
epee::critical_section gjobs_lock;
|
||||
};
|
||||
|
||||
|
||||
extern std::shared_ptr<plain_wallet_instance> ginstance_ptr;
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue