Skip to content

Commit

Permalink
GPR | Sale Widget | Fix transak nftdata collection address (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhesgodi committed Oct 20, 2023
1 parent 70845f5 commit ef6b61d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function WithCard(props: WithCardProps) {

const nftData: TransakNFTData[] = useMemo(
() => signResponse.order.products.map((product) => ({
collectionAddress: executeTxn?.contractAddress || '',
collectionAddress: product.collectionAddress,
imageURL: product.image,
nftName: product.name,
price: product.amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const toSignedProduct = (
name: item?.name || '',
description: item?.description || '',
currency,
collectionAddress: product.detail[0]?.collection_address,
amount: product.detail.map(({ amount }) => amount),
tokenId: product.detail.map(({ token_id: tokenId }) => Number(tokenId)),
});
Expand Down
1 change: 1 addition & 0 deletions packages/checkout/widgets-lib/src/widgets/sale/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type SignedOrderProduct = {
amount: number[];
tokenId: number[];
currency: string;
collectionAddress: string;
};

export type SignedOrder = {
Expand Down

0 comments on commit ef6b61d

Please sign in to comment.