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(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(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;