Skip to content

Commit

Permalink
chain_registry_assets optional endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Aug 6, 2024
1 parent 62d1a15 commit 4583ad1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions local-interchain/interchain/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ func NewRouter(
log.Printf("chain_registry.json not found in %s, not exposing endpoint.", wd)
}

chainRegistryAssetsFile := filepath.Join(wd, "chain_registry_assets.json")
if _, err := os.Stat(chainRegistryAssetsFile); err == nil {
crH := handlers.NewChainRegistry(chainRegistryAssetsFile)
r.HandleFunc("/chain_registry_assets", crH.GetChainRegistry).Methods(http.MethodGet)
} else {
log.Printf("chain_registry_assets.json not found in %s, not exposing endpoint.", wd)
}

actionsH := handlers.NewActions(ctx, ic, cosmosChains, vals, relayer, eRep, authKey)
r.HandleFunc("/", actionsH.PostActions).Methods(http.MethodPost)

Expand Down

0 comments on commit 4583ad1

Please sign in to comment.