Hook for managing the make offer modal interface for creating offers on collectibles
useMakeOfferModal
hook:
callbacks
object with the following properties:
Parameter | Type | Description |
---|---|---|
callbacks.onSuccess | ({ hash, orderId }: { hash?: Hash; orderId?: string }) => void | Optional callback function called when the offer is created successfully |
callbacks.onError | (error: Error) => void | Optional callback function called when an error occurs during offer creation |
callbacks.successActionButtons | Array<{ label: string; action: () => void }> | Optional array of action buttons to show on success |
(args: ShowMakeOfferModalArgs) => void
Opens the make offer modal with the specified parameters.
Parameter | Type | Description |
---|---|---|
collectionAddress | Address | The contract address of the NFT collection |
chainId | number | The blockchain network chain ID where the collection exists |
collectibleId | string | The token ID of the specific collectible to make an offer on |
orderbookKind | OrderbookKind | Optional. The marketplace orderbook to use (defaults to sequence_marketplace_v2 ) |
OrderbookKind
type from the marketplace SDK:
() => void
Closes the make offer modal.
useMakeOfferModal
hook provides a convenient way to manage the make offer modal interface for creating offers on collectibles. It handles: