Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #349 from heziyi/develop
Browse files Browse the repository at this point in the history
fix get channels
  • Loading branch information
ka1fe1 authored Jan 4, 2024
2 parents 70288a4 + 7a9a96b commit 21fbb8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/app/task/ibc_chain_config_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (t *IbcChainConfigTask) getChainConf() ([]*entity.ChainConfig, error) {
}

// getIbcChannels 通过lcd channels_path 接口获取链上存在的所有channel信息
func (t *IbcChainConfigTask) getIbcChannels(chain, lcd, apiPath string) ([]*entity.ChannelPath, error) {
func (t *IbcChainConfigTask) getIbcChannels(chain, lcd, originApiPath string) ([]*entity.ChannelPath, error) {
if lcd == "" {
logrus.Errorf("task %s %s getIbcChannels error, lcd error", t.Name(), chain)
return nil, fmt.Errorf("lcd error")
Expand All @@ -118,7 +118,7 @@ func (t *IbcChainConfigTask) getIbcChannels(chain, lcd, apiPath string) ([]*enti
var channelPathList []*entity.ChannelPath

for {
apiPath = strings.ReplaceAll(apiPath, replaceHolderOffset, strconv.Itoa(offset))
apiPath := strings.ReplaceAll(originApiPath, replaceHolderOffset, strconv.Itoa(offset))
apiPath = strings.ReplaceAll(apiPath, replaceHolderLimit, strconv.Itoa(limit))
url := fmt.Sprintf("%s%s", lcd, apiPath)
bz, err := utils.HttpGet(url)
Expand Down

0 comments on commit 21fbb8d

Please sign in to comment.