diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 9c090e5..c5e64de 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/build.gradle b/app/build.gradle index f848c74..7c77ea4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -64,6 +64,6 @@ dependencies { androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation files('../libs/binance-api.jar') + implementation files('../libs/binance-api-forked.jar') implementation files('../libs/commons-codec-1.11.jar') } diff --git a/app/src/main/java/com/herbron/moodl/DataManagers/BalanceManager.java b/app/src/main/java/com/herbron/moodl/DataManagers/BalanceManager.java index 7e1cf05..35e130d 100644 --- a/app/src/main/java/com/herbron/moodl/DataManagers/BalanceManager.java +++ b/app/src/main/java/com/herbron/moodl/DataManagers/BalanceManager.java @@ -69,23 +69,6 @@ public class BalanceManager { this.dataNotifierInterface = dataNotifierInterface; } - public List getBiggestCurrencies() - { - List currenciesDetails = new ArrayList<>(); - - int index = 0; - Iterator coinIterator = currencyDetailsList.getCoinInfosHashmap().keySet().iterator(); - - while(index < 11) - { - index++; - - Log.d("moodl", "For " + index + " : " + coinIterator.next()); - } - - return currenciesDetails; - } - public void updateExchangeKeys() { hitBtcManagers.clear(); @@ -95,8 +78,6 @@ public class BalanceManager { binanceManagers.clear(); binanceManagers = databaseManager.getBinanceAccounts(); - - Log.d("moodl", "Number of binance accounts " + binanceManagers.size()); } public List getTotalBalance() @@ -120,8 +101,8 @@ public class BalanceManager { for(int i = 0; i < binanceManagers.size(); i++) { - final int index = i; - binanceManagers.get(i).updateBalance(new BinanceManager.BinanceCallBack() { + final BinanceManager binanceManager = binanceManagers.get(i); + binanceManager.updateBalance(new BinanceManager.BinanceCallBack() { @Override public void onSuccess() { countBalances(); @@ -129,7 +110,7 @@ public class BalanceManager { @Override public void onError(String error) { - databaseManager.disableExchangeAccount(binanceManagers.get(index).getId()); + databaseManager.disableExchangeAccount(binanceManager.getId()); dataNotifierInterface.onBalanceError(error); } }); diff --git a/app/src/main/java/com/herbron/moodl/DataManagers/ExchangeManager/BinanceManager.java b/app/src/main/java/com/herbron/moodl/DataManagers/ExchangeManager/BinanceManager.java index 3b9a747..937b2cb 100644 --- a/app/src/main/java/com/herbron/moodl/DataManagers/ExchangeManager/BinanceManager.java +++ b/app/src/main/java/com/herbron/moodl/DataManagers/ExchangeManager/BinanceManager.java @@ -43,6 +43,7 @@ public class BinanceManager extends Exchange { public void updateBalance(BinanceCallBack callBack) { BinanceApiClientFactory factory = BinanceApiClientFactory.newInstance(publicKey, privateKey); + BinanceApiRestClient client = factory.newRestClient(); try { @@ -55,7 +56,10 @@ public class BinanceManager extends Exchange { { if(Double.parseDouble(assets.get(i).getFree()) > 0 || Double.parseDouble(assets.get(i).getLocked()) > 0) { - balance.add(new Currency(assets.get(i).getAsset(), Double.parseDouble(assets.get(i).getFree()) + Double.parseDouble(assets.get(i).getLocked()))); + if(!assets.get(i).getAsset().equals("VET")) + { + balance.add(new Currency(assets.get(i).getAsset(), Double.parseDouble(assets.get(i).getFree()) + Double.parseDouble(assets.get(i).getLocked()))); + } } } @@ -69,7 +73,6 @@ public class BinanceManager extends Exchange { { trades = new ArrayList<>(); - for(int i = 0; i < pairSymbolList.size(); i++) { if(!pairSymbolList.get(i).equals(symbol)) diff --git a/app/src/main/res/layout/content_exchange_list.xml b/app/src/main/res/layout/content_exchange_list.xml index be2d1e7..18d531c 100644 --- a/app/src/main/res/layout/content_exchange_list.xml +++ b/app/src/main/res/layout/content_exchange_list.xml @@ -11,6 +11,6 @@ + android:layout_height="match_parent"/> \ No newline at end of file diff --git a/libs/binance-api-forked.jar b/libs/binance-api-forked.jar new file mode 100644 index 0000000..e4594e5 Binary files /dev/null and b/libs/binance-api-forked.jar differ diff --git a/libs/binance-api.jar b/libs/binance-api.jar deleted file mode 100644 index 517d800..0000000 Binary files a/libs/binance-api.jar and /dev/null differ