Skip to content
Merged
Show file tree
Hide file tree
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
fix: fix types
  • Loading branch information
sahar-fehri committed Jul 13, 2024
commit decf2ebb5249b138d54e4489df716e1042aee7e4
4 changes: 3 additions & 1 deletion packages/assets-controllers/src/NftController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import type {
Attributes,
LastSale,
GetCollectionsResponse,
TopBid,
} from './NftDetectionController';

type NFTStandardType = 'ERC721' | 'ERC1155';
Expand Down Expand Up @@ -169,9 +170,10 @@ export type NftMetadata = {
tokenURI?: string | null;
collection?: Collection;
address?: string;
attributes?: Attributes;
attributes?: Attributes[];
lastSale?: LastSale;
rarityRank?: string;
topBid?: TopBid;
};

/**
Expand Down
21 changes: 21 additions & 0 deletions packages/assets-controllers/src/NftDetectionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,26 @@ export type CollectionResponse = {
};
};

export type FloorAskCollection = {
id?: string;
price?: Price;
maker?: string;
kind?: string;
validFrom?: number;
validUntil?: number;
source?: SourceCollection;
rawData?: Metadata;
isNativeOffChainCancellable?: boolean;
};

export type SourceCollection = {
id: string;
domain: string;
name: string;
icon: string;
url: string;
};

export type TokenCollection = {
id?: string;
name?: string;
Expand All @@ -367,6 +387,7 @@ export type TokenCollection = {
floorAskPrice?: Price;
royaltiesBps?: number;
royalties?: Royalties[];
floorAsk?: FloorAskCollection;
};

export type Collection = TokenCollection & CollectionResponse;
Expand Down