Skip to content

Commit 901c5a9

Browse files
committed
(fix) Implement get_ofac_list_path without a loop
1 parent 387b1fc commit 901c5a9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pyinjective/ofac.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ def __init__(self):
2222

2323
@classmethod
2424
def get_ofac_list_path(cls):
25-
current_directory = os.getcwd()
26-
while os.path.basename(current_directory) != "sdk-python":
27-
current_directory = os.path.dirname(current_directory)
28-
return os.path.join(os.path.join(current_directory, "pyinjective"), OFAC_LIST_FILENAME)
25+
return os.path.join(os.path.dirname(__file__), OFAC_LIST_FILENAME)
2926

3027
@classmethod
3128
async def download_ofac_list(cls):

0 commit comments

Comments
 (0)