Fix crash on transaction fetch

pull/2/head
Marat Subkhankulov 7 years ago
parent 7d2e054ac5
commit e14b4aad5c
  1. 22
      app/src/main/java/com/wallet/crypto/trustapp/controller/Controller.java

@ -658,19 +658,17 @@ public class Controller {
call.enqueue(new Callback<ESTransactionListResponse>() {
@Override
public void onResponse(Call<ESTransactionListResponse> call, Response<ESTransactionListResponse> response) {
List<ESTransaction> transactions = response.body().getTransactionList();
mTransactions.put(address, transactions);
//recyclerView.setAdapter(new MoviesAdapter(movies, R.layout.list_item_movie, getApplicationContext()));
Log.d("INFO", "Number of transactions: " + transactions.size());
if (transactions.size() > 0) {
Log.d("INFO", "Last transaction block number: " + transactions.get(0).getBlockNumber());
Log.d("INFO", "First transaction block number: " + transactions.get(transactions.size() - 1).getBlockNumber());
try {
List<ESTransaction> transactions = response.body().getTransactionList();
mTransactions.put(address, transactions);
Log.d("INFO", "Number of transactions: " + transactions.size());
if (transactions.size() > 0) {
Log.d("INFO", "Last transaction block number: " + transactions.get(0).getBlockNumber());
Log.d("INFO", "First transaction block number: " + transactions.get(transactions.size() - 1).getBlockNumber());
}
} catch (Exception e) {
Log.e(TAG, e.getLocalizedMessage());
}
}

Loading…
Cancel
Save