mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-23 01:58:49 +02:00
getAccounts() returns accounts with correct index
This commit is contained in:
+29
-10
@@ -250,20 +250,39 @@ namespace monero {
|
||||
|
||||
// isMultisigImportNeeded
|
||||
|
||||
list<MoneroAccount> MoneroWallet::getAccounts() const {
|
||||
vector<MoneroAccount> MoneroWallet::getAccounts() const {
|
||||
cout << "getAccounts()" << endl;
|
||||
vector<MoneroAccount> accounts;
|
||||
for (uint32_t accountIdx = 0; accountIdx < wallet2->get_num_subaddress_accounts(); accountIdx++) {
|
||||
MoneroAccount account;
|
||||
account.index = accountIdx;
|
||||
accounts.push_back(account);
|
||||
}
|
||||
return accounts;
|
||||
}
|
||||
|
||||
vector<MoneroAccount> MoneroWallet::getAccounts(const bool includeSubaddresses) const {
|
||||
throw runtime_error("Not implemented");
|
||||
|
||||
cout << "getAccounts(includeSubaddresses)" << endl;
|
||||
vector<MoneroAccount> accounts;
|
||||
for (uint32_t accountIdx = 0; accountIdx < wallet2->get_num_subaddress_accounts(); accountIdx++) {
|
||||
MoneroAccount account;
|
||||
account.index = accountIdx;
|
||||
accounts.push_back(account);
|
||||
// // build subaddresses
|
||||
// for (uint32_t subaddressIdx = 0; subaddressIdx < wallet2->get_num_subaddresses(accountIdx); subaddressIdx++) {
|
||||
// cout << "Account " << accountIdx << ", " << subaddressIdx << endl;
|
||||
// }
|
||||
}
|
||||
return accounts;
|
||||
}
|
||||
|
||||
vector<MoneroAccount> MoneroWallet::getAccounts(const string tag) const {
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
list<MoneroAccount> MoneroWallet::getAccounts(const bool includeSubaddresses) const {
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
list<MoneroAccount> MoneroWallet::getAccounts(const string tag) const {
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
list<MoneroAccount> MoneroWallet::getAccounts(const bool includeSubaddresses, const string tag) const {
|
||||
vector<MoneroAccount> MoneroWallet::getAccounts(const bool includeSubaddresses, const string tag) const {
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace monero {
|
||||
*
|
||||
* @return List<MoneroAccount> are all accounts within the wallet
|
||||
*/
|
||||
list<MoneroAccount> getAccounts() const;
|
||||
vector<MoneroAccount> getAccounts() const;
|
||||
|
||||
/**
|
||||
* Get all accounts.
|
||||
@@ -346,7 +346,7 @@ namespace monero {
|
||||
* @param includeSubaddresses specifies if subaddresses should be included
|
||||
* @return List<MoneroAccount> are all accounts
|
||||
*/
|
||||
list<MoneroAccount> getAccounts(const bool includeSubaddresses) const;
|
||||
vector<MoneroAccount> getAccounts(const bool includeSubaddresses) const;
|
||||
|
||||
/**
|
||||
* Get accounts with a given tag.
|
||||
@@ -354,7 +354,7 @@ namespace monero {
|
||||
* @param tag is the tag for filtering accounts, all accounts if null
|
||||
* @return List<MoneroAccount> are all accounts for the wallet with the given tag
|
||||
*/
|
||||
list<MoneroAccount> getAccounts(const string tag) const;
|
||||
vector<MoneroAccount> getAccounts(const string tag) const;
|
||||
|
||||
/**
|
||||
* Get accounts with a given tag.
|
||||
@@ -363,7 +363,7 @@ namespace monero {
|
||||
* @param tag is the tag for filtering accounts, all accounts if null
|
||||
* @return List<MoneroAccount> are all accounts for the wallet with the given tag
|
||||
*/
|
||||
list<MoneroAccount> getAccounts(const bool includeSubaddresses, const string tag) const;
|
||||
vector<MoneroAccount> getAccounts(const bool includeSubaddresses, const string tag) const;
|
||||
|
||||
/**
|
||||
* Get an account without subaddress information.
|
||||
|
||||
Reference in New Issue
Block a user