Skip to content

Commit

Permalink
fix(local-ic): showcase proper available chains (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Aug 24, 2024
1 parent ef70987 commit cfa5d4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion local-interchain/bash/test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
exit 0
7 changes: 6 additions & 1 deletion local-interchain/interchain/handlers/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit cfa5d4b

Please sign in to comment.