Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions blockapi/v2/api/nft/unisat.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def parse_collection(self, fetch_result: FetchResult) -> ParseResult:

def fetch_listings(
self,
nft_type: BtcNftType,
nft_type: BtcNftType = BtcNftType.COLLECTION,
collection: Optional[str] = None,
cursor: Optional[str] = None,
limit: int = 100,
Expand Down Expand Up @@ -314,9 +314,6 @@ def fetch_listings(
Returns:
FetchResult containing listing data
"""
if not nft_type:
raise ValueError("NFT type is required")

# Ensure we get the string value if an enum is passed
nft_type_str = (
nft_type.value if isinstance(nft_type, BtcNftType) else str(nft_type)
Expand Down Expand Up @@ -453,7 +450,7 @@ def _yield_parsed_listings(

def fetch_offers(
self,
nft_type: Optional[BtcNftType] = None,
nft_type: BtcNftType = BtcNftType.COLLECTION,
address: Optional[str] = None,
inscription_id: Optional[str] = None,
event: Optional[str] = None,
Expand Down Expand Up @@ -482,7 +479,7 @@ def fetch_offers(
"""
# Ensure we get the string value if an enum is passed
nft_type_str = (
nft_type.value if isinstance(nft_type, BtcNftType) and nft_type else None
nft_type.value if isinstance(nft_type, BtcNftType) else str(nft_type)
)

start = int(cursor) if cursor else 0
Expand Down