From 5b6f6ae18a885b3ea25b6a1c5049e7eb5d015cb8 Mon Sep 17 00:00:00 2001 From: beer-1 Date: Fri, 16 Aug 2024 15:53:36 +0900 Subject: [PATCH] fix to read apis properly --- jsonrpc/config/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonrpc/config/config.go b/jsonrpc/config/config.go index 9d36032..6882e4b 100644 --- a/jsonrpc/config/config.go +++ b/jsonrpc/config/config.go @@ -1,6 +1,7 @@ package config import ( + "strings" "time" "github.com/spf13/cast" @@ -136,7 +137,7 @@ func GetConfig(appOpts servertypes.AppOptions) JSONRPCConfig { EnableWS: cast.ToBool(appOpts.Get(flagJSONRPCEnableWS)), AddressWS: cast.ToString(appOpts.Get(flagJSONRPCAddressWS)), EnableUnsafeCORS: cast.ToBool(appOpts.Get(flagJSONRPCEnableUnsafeCORS)), - APIs: cast.ToStringSlice(appOpts.Get(flagJSONRPCAPIs)), + APIs: strings.Split(cast.ToString(appOpts.Get(flagJSONRPCAPIs)), ","), FilterCap: cast.ToInt32(appOpts.Get(flagJSONRPCFilterCap)), BlockRangeCap: cast.ToInt32(appOpts.Get(flagJSONRPCBlockRangeCap)), HTTPTimeout: cast.ToDuration(appOpts.Get(flagJSONRPCHTTPTimeout)),