Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix types #4522

Merged
merged 1 commit into from
Jul 15, 2024
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
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
Loading