Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit 7d60582

Browse files
authored
Merge pull request #119 from blockchain/development
Development
2 parents 334d1d2 + 15f0d85 commit 7d60582

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

src/main/java/info/blockchain/wallet/multiaddress/MultiAddressFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private MultiAddress getMultiAddress(List<String> allActive, String onlyShow, in
5959

6060
if (onlyShow!=null && onlyShow.equals(MULTI_ADDRESS_ALL)) {
6161

62-
Response<MultiAddress> call = blockExplorer.getMultiAddress(allActive, null, BlockExplorer.TX_FILTER_ALL, limit, offset).execute();
62+
Response<MultiAddress> call = blockExplorer.getMultiAddress(allActive, null, BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE, limit, offset).execute();
6363

6464
if(call.isSuccessful()) {
6565
return call.body();
@@ -68,7 +68,7 @@ private MultiAddress getMultiAddress(List<String> allActive, String onlyShow, in
6868
}
6969

7070
} else {
71-
Response<MultiAddress> call = blockExplorer.getMultiAddress(allActive, onlyShow, BlockExplorer.TX_FILTER_ALL, limit, offset).execute();
71+
Response<MultiAddress> call = blockExplorer.getMultiAddress(allActive, onlyShow, BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE, limit, offset).execute();
7272

7373
if(call.isSuccessful()) {
7474
return call.body();

src/main/java/info/blockchain/wallet/payload/BalanceManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public BigInteger getImportedAddressesBalance() {
6868

6969
public void updateAllBalances(List<String> legacyAddressList, List<String> allAccountsAndAddresses) throws ServerConnectionException, IOException {
7070
Call<HashMap<String, Balance>> call = blockExplorer.getBalance(allAccountsAndAddresses,
71-
BlockExplorer.TX_FILTER_ALL);
71+
BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE);
7272

7373

7474
log.info("Fetching wallet balances");
@@ -104,6 +104,6 @@ public void updateAllBalances(List<String> legacyAddressList, List<String> allAc
104104
}
105105

106106
public Call<HashMap<String, Balance>> getBalanceOfAddresses(List<String> addresses) {
107-
return blockExplorer.getBalance(addresses, BlockExplorer.TX_FILTER_ALL);
107+
return blockExplorer.getBalance(addresses, BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE);
108108
}
109109
}

src/main/java/info/blockchain/wallet/payload/PayloadManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ public void initializeAndDecrypt(@Nonnull String sharedKey, @Nonnull String guid
235235
Response<ResponseBody> exe = call.execute();
236236

237237
if(exe.isSuccessful()){
238-
walletBaseBody = WalletBase.fromJson(exe.body().string());
239-
walletBaseBody.decryptPayload(this.password);
238+
final WalletBase walletBase = WalletBase.fromJson(exe.body().string());
239+
walletBase.decryptPayload(this.password);
240+
walletBaseBody = walletBase;
240241
} else {
241242
log.warn("Fetching wallet data failed with provided credentials");
242243
String errorMessage = exe.errorBody().string();

src/main/java/info/blockchain/wallet/payload/data/HDWallet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private static int getDeterminedSize(int walletSize, int trySize, int currentGap
374374
}
375375

376376
Response<HashMap<String, Balance>> exe = blockExplorer
377-
.getBalance(xpubs, BlockExplorer.TX_FILTER_ALL).execute();
377+
.getBalance(xpubs, BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE).execute();
378378

379379
if(!exe.isSuccessful()) {
380380
throw new Exception(exe.code() + " " + exe.errorBody().string());
@@ -405,7 +405,7 @@ public static boolean hasTransactions(BlockExplorer blockExplorer, String xpub)
405405
throws Exception {
406406

407407
Response<HashMap<String, Balance>> exe = blockExplorer
408-
.getBalance(Arrays.asList(xpub), BlockExplorer.TX_FILTER_ALL).execute();
408+
.getBalance(Arrays.asList(xpub), BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE).execute();
409409

410410
if (!exe.isSuccessful()) {
411411
throw new Exception(exe.code() + " " + exe.errorBody().string());

src/main/java/info/blockchain/wallet/util/PrivateKeyFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private ECKey determineKey(String hash) throws Exception {
121121
list.add(compressedAddress);
122122

123123
BlockExplorer blockExplorer = new BlockExplorer(BlockchainFramework.getRetrofitServerInstance(), BlockchainFramework.getApiCode());
124-
Call<HashMap<String, Balance>> call = blockExplorer.getBalance(list, BlockExplorer.TX_FILTER_ALL);
124+
Call<HashMap<String, Balance>> call = blockExplorer.getBalance(list, BlockExplorer.TX_FILTER_REMOVE_UNSPENDABLE);
125125

126126
Response<HashMap<String, Balance>> exe = call.execute();
127127

0 commit comments

Comments
 (0)