i think for 1.0 i won't include a subaddress list/screen, so remove these methods for now

This commit is contained in:
pokkst 2022-09-10 17:08:52 -05:00
parent 4674e81040
commit 67ab38d91f
No known key found for this signature in database
GPG key ID: 90C2ED85E67A50FF

View file

@ -4,6 +4,8 @@ import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import java.util.ArrayList;
import java.util.HashMap;
public class AddressService extends ServiceBase {
@ -13,7 +15,6 @@ public class AddressService extends ServiceBase {
return instance;
}
private final HashMap<String, Integer> subAddresses = new HashMap<>();
private int latestAddressIndex = 1;
public AddressService(MoneroHandlerThread thread) {
@ -22,16 +23,6 @@ public class AddressService extends ServiceBase {
}
public void refreshAddresses() {
Wallet wallet = WalletManager.getInstance().getWallet();
int issuedAddressesSize = WalletManager.getInstance().getWallet().getNumSubaddresses();
if(subAddresses.size() != issuedAddressesSize) {
for (int i = 0; i < issuedAddressesSize; i++) {
if(!subAddresses.containsValue(i)) {
subAddresses.put(wallet.getSubaddress(i), i);
}
}
}
for (TransactionInfo info : HistoryService.getInstance().getHistory()) {
if(info.addressIndex > latestAddressIndex) {
latestAddressIndex = info.addressIndex;
@ -47,8 +38,4 @@ public class AddressService extends ServiceBase {
Wallet wallet = WalletManager.getInstance().getWallet();
return wallet.getSubaddressObject(latestAddressIndex);
}
public HashMap<String, Integer> getIssuedSubaddresses() {
return subAddresses;
}
}