Skip to content

Commit 92ece76

Browse files
Merge pull request #244 from InjectiveLabs/ofac-fix
(fix/solve) Solve ofac.json path issue
2 parents 08caf8f + a6ba870 commit 92ece76

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

client/chain/ofac.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import (
66
"io"
77
"net/http"
88
"os"
9-
"path/filepath"
10-
"strings"
9+
"path"
1110
)
1211

1312
const (
@@ -40,11 +39,7 @@ func NewOfacChecker() (*OfacChecker, error) {
4039
}
4140

4241
func getOfacListPath() string {
43-
currentDirectory, _ := os.Getwd()
44-
for !strings.HasSuffix(currentDirectory, "sdk-go") {
45-
currentDirectory = filepath.Dir(currentDirectory)
46-
}
47-
return filepath.Join(filepath.Join(filepath.Join(currentDirectory, "client"), "metadata"), ofacListFilename)
42+
return getFileAbsPath(path.Join("..", "metadata", ofacListFilename))
4843
}
4944

5045
func DownloadOfacList() error {

0 commit comments

Comments
 (0)