File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 33from collections .abc import Generator
44from contextlib import ExitStack , contextmanager
55from logging import Logger
6- from pathlib import Path
6+ from pathlib import Path , PurePosixPath
77from typing import Any
88from unittest import mock
99
@@ -62,7 +62,9 @@ def patched_get_escrow(chain_id: int, escrow_address: str) -> EscrowData:
6262 minio_manifests = minio_client .list_files (bucket = "manifests" )
6363 logger .debug (f"DEV: Local manifests: { format_sequence (minio_manifests )} " )
6464
65- candidate_files = [fn for fn in minio_manifests if f"{ escrow_address } .json" in fn ]
65+ candidate_files = [
66+ fn for fn in minio_manifests if PurePosixPath (fn ).name == f"{ escrow_address } .json"
67+ ]
6668 if not candidate_files :
6769 return original_get_escrow (ChainId (chain_id ), escrow_address )
6870 elif len (candidate_files ) != 1 :
Original file line number Diff line number Diff line change 22from collections .abc import Generator
33from contextlib import ExitStack , contextmanager
44from logging import Logger
5+ from pathlib import PurePosixPath
56from unittest import mock
67
78import uvicorn
@@ -27,7 +28,9 @@ def patched_get_escrow(chain_id: int, escrow_address: str) -> EscrowData:
2728 minio_manifests = minio_client .list_files (bucket = "manifests" )
2829 logger .debug (f"DEV: Local manifests: { format_sequence (minio_manifests )} " )
2930
30- candidate_files = [fn for fn in minio_manifests if f"{ escrow_address } .json" in fn ]
31+ candidate_files = [
32+ fn for fn in minio_manifests if PurePosixPath (fn ).name == f"{ escrow_address } .json"
33+ ]
3134 if not candidate_files :
3235 return original_get_escrow (ChainId (chain_id ), escrow_address )
3336 if len (candidate_files ) != 1 :
You can’t perform that action at this time.
0 commit comments