mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 15:51:34 +02:00
implemented listener deconstructor
removed getWallet2() method
This commit is contained in:
@@ -23,11 +23,15 @@ namespace monero {
|
||||
this->wallet = wallet;
|
||||
this->wallet2 = wallet2;
|
||||
this->listener = nullptr;
|
||||
this->syncStartHeight = nullptr;
|
||||
this->syncEndHeight = nullptr;
|
||||
this->syncListener = nullptr;
|
||||
}
|
||||
|
||||
~Wallet2Listener() {
|
||||
|
||||
cout << "~Wallet2Listener()" << endl;
|
||||
delete syncStartHeight;
|
||||
delete syncEndHeight;
|
||||
}
|
||||
|
||||
void setWalletListener(MoneroWalletListener* listener) {
|
||||
@@ -36,6 +40,7 @@ namespace monero {
|
||||
}
|
||||
|
||||
void onSyncStart(uint64_t startHeight, MoneroSyncListener* syncListener) {
|
||||
if (syncStartHeight != nullptr || syncEndHeight != nullptr) throw runtime_error("Sync start or end height should not already be allocated");
|
||||
syncStartHeight = new uint64_t(startHeight);
|
||||
syncEndHeight = new uint64_t(wallet->getChainHeight() - 1);
|
||||
this->syncListener = syncListener;
|
||||
@@ -157,10 +162,6 @@ namespace monero {
|
||||
cout << "~MoneroWallet()" << endl;
|
||||
}
|
||||
|
||||
tools::wallet2* MoneroWallet::getWallet2() {
|
||||
return wallet2.get();
|
||||
}
|
||||
|
||||
// TODO: switch this to setDaemonConnection(MoneroDaemonRpc& daemonConnection)
|
||||
void MoneroWallet::setDaemonConnection(const string& uri, const string& username, const string& password) {
|
||||
cout << "setDaemonConnection(" << uri << ", " << username << ", " << password << ")" << endl;
|
||||
|
||||
@@ -168,11 +168,6 @@ namespace monero {
|
||||
*/
|
||||
~MoneroWallet();
|
||||
|
||||
/**
|
||||
* TODO: remove this.
|
||||
*/
|
||||
tools::wallet2* getWallet2();
|
||||
|
||||
/**
|
||||
* Set the wallet's daemon connection.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user