diff --git a/pkg/node/lethean.go b/pkg/node/lethean.go index 4670cd9..e9fc98e 100644 --- a/pkg/node/lethean.go +++ b/pkg/node/lethean.go @@ -5,7 +5,6 @@ package node import ( "bytes" - "encoding/json" "io" "net/http" ) @@ -52,7 +51,7 @@ func GetChainInfo(daemonURL string) (*ChainInfo, error) { var rpcResponse struct { Result ChainInfo `json:"result"` } - if err := json.Unmarshal(responseBody, &rpcResponse); err != nil { + if err := UnmarshalJSON(responseBody, &rpcResponse); err != nil { return nil, err } rpcResponse.Result.Synced = rpcResponse.Result.Height > 0 @@ -79,7 +78,7 @@ func DiscoverPools(daemonURL string) []PoolGateway { } `json:"aliases"` } `json:"result"` } - json.Unmarshal(responseBody, &rpcResponse) + UnmarshalJSON(responseBody, &rpcResponse) //nolint:errcheck var pools []PoolGateway for _, alias := range rpcResponse.Result.Aliases { @@ -117,7 +116,7 @@ func DiscoverGateways(daemonURL string) []PoolGateway { } `json:"aliases"` } `json:"result"` } - json.Unmarshal(responseBody, &rpcResponse) + UnmarshalJSON(responseBody, &rpcResponse) //nolint:errcheck var gateways []PoolGateway for _, alias := range rpcResponse.Result.Aliases {