From decf2ebb5249b138d54e4489df716e1042aee7e4 Mon Sep 17 00:00:00 2001 From: sahar-fehri Date: Sat, 13 Jul 2024 02:54:19 +0200 Subject: [PATCH] fix: fix types --- .../assets-controllers/src/NftController.ts | 4 +++- .../src/NftDetectionController.ts | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/assets-controllers/src/NftController.ts b/packages/assets-controllers/src/NftController.ts index 0edc76face..c305eeece6 100644 --- a/packages/assets-controllers/src/NftController.ts +++ b/packages/assets-controllers/src/NftController.ts @@ -58,6 +58,7 @@ import type { Attributes, LastSale, GetCollectionsResponse, + TopBid, } from './NftDetectionController'; type NFTStandardType = 'ERC721' | 'ERC1155'; @@ -169,9 +170,10 @@ export type NftMetadata = { tokenURI?: string | null; collection?: Collection; address?: string; - attributes?: Attributes; + attributes?: Attributes[]; lastSale?: LastSale; rarityRank?: string; + topBid?: TopBid; }; /** diff --git a/packages/assets-controllers/src/NftDetectionController.ts b/packages/assets-controllers/src/NftDetectionController.ts index bd02fb9c89..e1ed6f83b8 100644 --- a/packages/assets-controllers/src/NftDetectionController.ts +++ b/packages/assets-controllers/src/NftDetectionController.ts @@ -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; @@ -367,6 +387,7 @@ export type TokenCollection = { floorAskPrice?: Price; royaltiesBps?: number; royalties?: Royalties[]; + floorAsk?: FloorAskCollection; }; export type Collection = TokenCollection & CollectionResponse;