Using the OperationHistoryDeserializer in the GetRelativeAccountHistory api call

This commit is contained in:
Nelson R. Perez 2018-05-31 23:26:15 -05:00
parent d04c8bb648
commit 935b0d2575

View file

@ -160,6 +160,7 @@ public class GetRelativeAccountHistory extends BaseGrapheneHandler {
}else if(baseResponse.id >= GET_HISTORY_DATA){ }else if(baseResponse.id >= GET_HISTORY_DATA){
Type RelativeAccountHistoryResponse = new TypeToken<WitnessResponse<List<OperationHistory>>>(){}.getType(); Type RelativeAccountHistoryResponse = new TypeToken<WitnessResponse<List<OperationHistory>>>(){}.getType();
GsonBuilder gsonBuilder = new GsonBuilder(); GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(OperationHistory.class, new OperationHistory.OperationHistoryDeserializer());
gsonBuilder.registerTypeAdapter(TransferOperation.class, new TransferOperation.TransferDeserializer()); gsonBuilder.registerTypeAdapter(TransferOperation.class, new TransferOperation.TransferDeserializer());
gsonBuilder.registerTypeAdapter(AssetAmount.class, new AssetAmount.AssetAmountDeserializer()); gsonBuilder.registerTypeAdapter(AssetAmount.class, new AssetAmount.AssetAmountDeserializer());
gsonBuilder.registerTypeAdapter(Memo.class, new Memo.MemoDeserializer()); gsonBuilder.registerTypeAdapter(Memo.class, new Memo.MemoDeserializer());