From d32c347346a8fff4d900e44a94d461ebf1b65e62 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 22 Aug 2024 10:43:25 -0500 Subject: [PATCH] fix(local-ic): showcase proper available chains --- local-interchain/bash/test.bash | 2 +- local-interchain/interchain/handlers/actions.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/local-interchain/bash/test.bash b/local-interchain/bash/test.bash index 9fc37ed3a..85a44784a 100755 --- a/local-interchain/bash/test.bash +++ b/local-interchain/bash/test.bash @@ -85,4 +85,4 @@ ICT_RELAYER_STOP $API_ADDR "localjuno-1" # Kills all containers, not the local-ic process. Use `killall local-ic` to kill that as well ICT_KILL_ALL $API_ADDR "localjuno-1" -exit 0 \ No newline at end of file +exit 0 diff --git a/local-interchain/interchain/handlers/actions.go b/local-interchain/interchain/handlers/actions.go index f21b1f8a9..d40a03c3a 100644 --- a/local-interchain/interchain/handlers/actions.go +++ b/local-interchain/interchain/handlers/actions.go @@ -75,7 +75,12 @@ func (a *actions) PostActions(w http.ResponseWriter, r *http.Request) { chainId := ah.ChainId if _, ok := a.vals[chainId]; !ok { - util.Write(w, []byte(fmt.Sprintf(`{"error":"chain_id '%s' not found. Chains %v"}`, chainId, a.vals[chainId]))) + var chainIds []string + for k := range a.vals { + chainIds = append(chainIds, k) + } + + util.Write(w, []byte(fmt.Sprintf(`{"error":"chain_id '%s' not found. available chain ids: %v"}`, chainId, chainIds))) return }