mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 23:50:02 +00:00
i think for 1.0 i won't include a subaddress list/screen, so remove these methods for now
This commit is contained in:
parent
4674e81040
commit
67ab38d91f
1 changed files with 2 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue