Skip to content

Commit

Permalink
issues/219 - Tidy up for code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
meywood committed Mar 13, 2024
1 parent 7afe36f commit dce2cbe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/casper/sdk/model/key/PublicKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ public static PublicKey fromAbstractPublicKey(final AbstractPublicKey key) {
public static PublicKey deserialize(final DeserializerBuffer deser) throws ValueDeserializationException, NoSuchAlgorithmException {
// Obtain algorithm tag
final AlgorithmTag tag = AlgorithmTag.getByTag(deser.readU8());
final int len = tag.getLength();
final PublicKey publicKey = new PublicKey();
publicKey.setTag(tag);
// Read the required number of bytes for the algorithm length
publicKey.setKey(deser.readByteArray(len));
publicKey.setKey(deser.readByteArray(tag.getLength()));
return publicKey;
}

Expand Down

0 comments on commit dce2cbe

Please sign in to comment.