diff --git a/graphenej/src/main/java/cy/agorise/graphenej/api/android/DeserializationMap.java b/graphenej/src/main/java/cy/agorise/graphenej/api/android/DeserializationMap.java index f7b697b..c3c4eb0 100644 --- a/graphenej/src/main/java/cy/agorise/graphenej/api/android/DeserializationMap.java +++ b/graphenej/src/main/java/cy/agorise/graphenej/api/android/DeserializationMap.java @@ -160,7 +160,7 @@ public class DeserializationMap { mGsonMap.put(GetAccountHistoryByOperations.class, getAccountHistoryByOperationsGson); // GetFullAccounts - mClassMap.put(GetFullAccounts.class, FullAccountDetails.class); + mClassMap.put(GetFullAccounts.class, List.class); Gson getFullAccountsGson = new GsonBuilder() .registerTypeAdapter(FullAccountDetails.class, new FullAccountDetails.FullAccountDeserializer()) .registerTypeAdapter(Authority.class, new Authority.AuthorityDeserializer()) diff --git a/sample/src/main/java/cy/agorise/labs/sample/PerformCallActivity.java b/sample/src/main/java/cy/agorise/labs/sample/PerformCallActivity.java index 4dc2eac..99d1ebc 100644 --- a/sample/src/main/java/cy/agorise/labs/sample/PerformCallActivity.java +++ b/sample/src/main/java/cy/agorise/labs/sample/PerformCallActivity.java @@ -377,6 +377,7 @@ public class PerformCallActivity extends ConnectedActivity { long start = Long.parseLong(param3.getText().toString()); long limit = Long.parseLong(param4.getText().toString()); long id = mNetworkService.sendMessage(new GetAccountHistoryByOperations(account, operationTypes, start, limit), GetAccountHistoryByOperations.REQUIRED_API); + responseMap.put(id, mRPC); }catch(NumberFormatException e){ Toast.makeText(this, getString(R.string.error_number_format), Toast.LENGTH_SHORT).show(); Log.e(TAG,"NumberFormatException while trying to read arguments for 'get_account_history_by_operations'. Msg: "+e.getMessage()); @@ -387,6 +388,7 @@ public class PerformCallActivity extends ConnectedActivity { ArrayList accounts = new ArrayList<>(); accounts.addAll(Arrays.asList(param1.getText().toString().split(","))); long id = mNetworkService.sendMessage(new GetFullAccounts(accounts, false), GetFullAccounts.REQUIRED_API); + responseMap.put(id, mRPC); } /** @@ -411,6 +413,7 @@ public class PerformCallActivity extends ConnectedActivity { case RPC.CALL_GET_ACCOUNT_BY_NAME: case RPC.CALL_GET_LIMIT_ORDERS: case RPC.CALL_GET_ACCOUNT_HISTORY_BY_OPERATIONS: + case RPC.CALL_GET_FULL_ACCOUNTS: mResponseView.setText(mResponseView.getText() + gson.toJson(response, JsonRpcResponse.class) + "\n"); break; default: