getAccount() non-const arg and correctly set label

This commit is contained in:
woodser
2019-07-05 11:12:15 -04:00
parent b4ac123510
commit a9909373e4
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -731,7 +731,7 @@ namespace monero {
return getAccount(accountIdx, false);
}
MoneroAccount MoneroWallet::getAccount(const uint32_t accountIdx, const bool includeSubaddresses) const {
MoneroAccount MoneroWallet::getAccount(uint32_t accountIdx, const bool includeSubaddresses) const {
cout << "getAccount(" << accountIdx << ", " << includeSubaddresses << ")" << endl;
// need transfers to inform if subaddresses used
@@ -742,6 +742,7 @@ namespace monero {
MoneroAccount account;
account.index = accountIdx;
account.primaryAddress = getAddress(accountIdx, 0);
account.label = wallet2->get_subaddress_label({accountIdx, 0});
account.balance = wallet2->balance(accountIdx);
account.unlockedBalance = wallet2->unlocked_balance(accountIdx);
if (includeSubaddresses) account.subaddresses = getSubaddressesAux(accountIdx, vector<uint32_t>(), transfers);
+1 -1
View File
@@ -393,7 +393,7 @@ namespace monero {
* @param accountIdx specifies the account to get
* @return the retrieved account
*/
MoneroAccount getAccount(const uint32_t accountIdx) const;
MoneroAccount getAccount(uint32_t accountIdx) const;
/**
* Get an account.