Skip to content

Commit

Permalink
fixes unmarshal error
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodeev committed Dec 18, 2024
1 parent a65992c commit a0ca007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/types_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ func (nodeHashToNode *NodeHashToNode) UnmarshalJSON(bytes []byte) error {
var merkleNode MerkleNode
switch nodeT := node.(type) {
case BinaryNode:
merkleNode = nodeT
merkleNode = MerkleNode{BinaryNode: nodeT}
case EdgeNode:
merkleNode = nodeT
merkleNode = MerkleNode{EdgeNode: nodeT}
default:
return fmt.Errorf("'node' should be an EdgeNode or BinaryNode")
}
Expand Down

0 comments on commit a0ca007

Please sign in to comment.