Skip to content

Commit 86f2236

Browse files
committed
update
1 parent 0193c76 commit 86f2236

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/liquidity-source/printr/pool_list_updater.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ func (u *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte
8080

8181
func (u *PoolsListUpdater) fetchTokenList(ctx context.Context, size, skip int) (*TokenListResponse, error) {
8282
base := strings.TrimSuffix(u.config.TokenListAPI, "/")
83-
rawURL := fmt.Sprintf("%s/chains/%d/tokenlist.json", base, u.config.ChainId)
83+
rawURL, err := url.JoinPath(base, "chains", strconv.FormatInt(int64(u.config.ChainId), 10), "tokenlist.json")
84+
if err != nil {
85+
return nil, err
86+
}
8487
parsed, err := url.Parse(rawURL)
8588
if err != nil {
8689
return nil, err

0 commit comments

Comments
 (0)