mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-22 07:22:26 +00:00
Get rid of lastUsedSubaddress in AddressService
This commit is contained in:
parent
e90462707c
commit
80a7e234ac
1 changed files with 0 additions and 10 deletions
|
@ -15,7 +15,6 @@ import java.util.Locale;
|
|||
public class AddressService extends ServiceBase {
|
||||
public static AddressService instance = null;
|
||||
private int latestAddressIndex = 1;
|
||||
private int lastUsedSubaddress = 0;
|
||||
|
||||
public AddressService(MoneroHandlerThread thread) {
|
||||
super(thread);
|
||||
|
@ -27,18 +26,9 @@ public class AddressService extends ServiceBase {
|
|||
}
|
||||
|
||||
public void refreshAddresses() {
|
||||
List<TransactionInfo> localTransactionList = new ArrayList<>(HistoryService.getInstance().getHistory());
|
||||
for (TransactionInfo info : localTransactionList) {
|
||||
if (info.addressIndex > lastUsedSubaddress)
|
||||
lastUsedSubaddress = info.addressIndex;
|
||||
}
|
||||
latestAddressIndex = WalletManager.getInstance().getWallet().getNumSubaddresses();
|
||||
}
|
||||
|
||||
public int getLastUsedSubaddress() {
|
||||
return lastUsedSubaddress;
|
||||
}
|
||||
|
||||
public int getLatestAddressIndex() {
|
||||
return latestAddressIndex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue