Skip to content

Commit ed7a2e8

Browse files
committed
Refactor
1 parent eead8a9 commit ed7a2e8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/jackson/modules/TransactionDeserializer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* Licensed under the Apache License, Version 2.0 (the "License");
1010
* you may not use this file except in compliance with the License.
1111
* You may obtain a copy of the License at
12-
*
12+
*
1313
* http://www.apache.org/licenses/LICENSE-2.0
14-
*
14+
*
1515
* Unless required by applicable law or agreed to in writing, software
1616
* distributed under the License is distributed on an "AS IS" BASIS,
1717
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,6 @@
2222

2323
import com.fasterxml.jackson.core.JsonParser;
2424
import com.fasterxml.jackson.databind.DeserializationContext;
25-
import com.fasterxml.jackson.databind.JsonNode;
2625
import com.fasterxml.jackson.databind.ObjectMapper;
2726
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
2827
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -50,8 +49,7 @@ public Transaction deserialize(JsonParser jsonParser, DeserializationContext ctx
5049
final ObjectMapper objectMapper = (ObjectMapper) jsonParser.getCodec();
5150
final ObjectNode objectNode = objectMapper.readTree(jsonParser);
5251

53-
final JsonNode transactionTypeJsonNode = objectNode.get("TransactionType");
54-
final TransactionType transactionType = TransactionType.forValue(transactionTypeJsonNode.asText());
52+
TransactionType transactionType = TransactionType.forValue(objectNode.get("TransactionType").asText());
5553
final Class<? extends Transaction> transactionTypeClass = Transaction.typeMap.inverse().get(transactionType);
5654

5755
// Remove the `Account` property from any incoming `UnlModify` JSON about to be deserialized. This is because the

0 commit comments

Comments
 (0)