summaryrefslogtreecommitdiff
path: root/libbridge/src
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 10:49:27 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 10:49:27 +0100
commit8535822d464b3c11d7b2347287cb28318e41da1d (patch)
tree4a0a3133aea82ba0bd097a5f1965389148910c72 /libbridge/src
parent4a431efd3aba2a2d66400ebd0c0618678de782d4 (diff)
MONERO_Wallet_seed add seed_offset
MONERO_Wallet_daemonBlockChainHeight_runThread add sleep()
Diffstat (limited to 'libbridge/src')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp5
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 83bb128..ce9c210 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -693,9 +693,9 @@ bool MONERO_DeviceProgress_indeterminate(void* deviceProgress_ptr) {
// Wallet
-const char* MONERO_Wallet_seed(void* wallet_ptr) {
+const char* MONERO_Wallet_seed(void* wallet_ptr, const char* seed_offset) {
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- std::string str = wallet->seed();
+ std::string str = wallet->seed(std::string(seed_offset));
const std::string::size_type size = str.size();
char *buffer = new char[size + 1]; //we need extra char for NUL
memcpy(buffer, str.c_str(), size + 1);
@@ -963,6 +963,7 @@ void MONERO_Wallet_daemonBlockChainHeight_runThread(void* wallet_ptr) {
while (true) {
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
daemonBlockChainHeight_cached = wallet->daemonBlockChainHeight();
+ sleep(daemonBlockChainHeight_cahceSleepTime);
std::cout << "MONERO: TICK: MONERO_Wallet_daemonBlockChainHeight_runThread: " << daemonBlockChainHeight_cached << std::endl;
}
}
diff --git a/libbridge/src/main/cpp/wallet2_api_c.h b/libbridge/src/main/cpp/wallet2_api_c.h
index 50c46e7..e38c51b 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.h
+++ b/libbridge/src/main/cpp/wallet2_api_c.h
@@ -469,7 +469,7 @@ const int WalletConnectionStatus_WrongVersion = 2;
// };
// virtual ~Wallet() = 0;
// virtual std::string seed(const std::string& seed_offset = "") const = 0;
-const char* MONERO_Wallet_seed(void* wallet_ptr);
+const char* MONERO_Wallet_seed(void* wallet_ptr, const char* seed_offset);
// virtual std::string getSeedLanguage() const = 0;
const char* MONERO_Wallet_getSeedLanguage(void* wallet_ptr);
// virtual void setSeedLanguage(const std::string &arg) = 0;