Skip to content

Commit

Permalink
Merge pull request #244 from InjectiveLabs/ofac-fix
Browse files Browse the repository at this point in the history
(fix/solve) Solve ofac.json path issue
  • Loading branch information
PavelInjective authored Sep 25, 2024
2 parents 08caf8f + a6ba870 commit 92ece76
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions client/chain/ofac.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
"io"
"net/http"
"os"
"path/filepath"
"strings"
"path"
)

const (
Expand Down Expand Up @@ -40,11 +39,7 @@ func NewOfacChecker() (*OfacChecker, error) {
}

func getOfacListPath() string {
currentDirectory, _ := os.Getwd()
for !strings.HasSuffix(currentDirectory, "sdk-go") {
currentDirectory = filepath.Dir(currentDirectory)
}
return filepath.Join(filepath.Join(filepath.Join(currentDirectory, "client"), "metadata"), ofacListFilename)
return getFileAbsPath(path.Join("..", "metadata", ofacListFilename))
}

func DownloadOfacList() error {
Expand Down

0 comments on commit 92ece76

Please sign in to comment.