Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ export type SaleSuccess = {
}[];
/** The order reference id, use it to trace order throughout flow */
transactionId: string;
/**
* Settlement status of the order. For card payments this mirrors the Transak
* order status: `'PROCESSING'` while the payment is captured but the mint is
* not yet settled (typically a couple of minutes), and `'COMPLETED'` once
* settled. Undefined for crypto payments, which settle on-chain synchronously.
* Do not treat the sale as final until settlement is confirmed — reconcile
* server-side using `transactionId`.
*/
status?: string;
[key: string]: unknown;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const sendSaleSuccessEvent = (
transactions: ExecutedTransaction[] = [],
tokenIds: string[] = [],
transactionId: string = '',
status?: string,
) => {
const event = new CustomEvent<
WidgetEvent<WidgetType.SALE, SaleEventType.SUCCESS>
Expand All @@ -39,6 +40,7 @@ export const sendSaleSuccessEvent = (
transactions,
tokenIds,
transactionId,
status,
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const useSaleEvent = () => {
transactions,
tokenIds,
details.transactionId,
details.orderStatus,
);
};

Expand Down
Loading