mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 20:53:47 +01:00
Get rid of lastUsedSubaddress in AddressService
This commit is contained in:
parent
e90462707c
commit
80a7e234ac
@ -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 New Issue
Block a user