From a0ca007c1f75c4b633f12f626e6c31cb2e026124 Mon Sep 17 00:00:00 2001 From: thiagodeev Date: Wed, 18 Dec 2024 01:09:26 -0300 Subject: [PATCH] fixes unmarshal error --- rpc/types_contract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/types_contract.go b/rpc/types_contract.go index 914a711d..09e8c180 100644 --- a/rpc/types_contract.go +++ b/rpc/types_contract.go @@ -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") }