From 16730e9be6c5a293c7d17eb1c24b9c40d0ce8caf Mon Sep 17 00:00:00 2001 From: Julia Ortiz <94128293+julia-script@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:13:01 -0300 Subject: [PATCH] fix: reading files from repo that should not be included (#99) --- CHANGELOG.md | 2 ++ internal/v1/requester/github.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48365e0..8c4d098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog +- (fix): [fse-906] read the expected files when trying to read tokens + ## Unreleased - (fix) [fse-900] Fix failing convertCoin and convertERC20 endpoints diff --git a/internal/v1/requester/github.go b/internal/v1/requester/github.go index 46d57cc..eb7f29c 100644 --- a/internal/v1/requester/github.go +++ b/internal/v1/requester/github.go @@ -128,7 +128,7 @@ func GetJsonsFromFolder(url string, folder string) ([]File, error) { for _, t := range m.Tree { if t.Mode == "100644" { // Is file - if strings.Contains(t.Path, folder) { + if strings.HasPrefix(t.Path, folder+"/") { fileResponse, err := QueryGithubWithCache(t.URL) if err != nil { return []File{}, err