thirdweb-example / shopify-sell-nfts

Sell NFTs in FIAT currency using a Shopify store and webhooks!
17 stars 13 forks source link

Fixed Issues. #6

Open IamDushu opened 1 year ago

IamDushu commented 1 year ago

Issue - 1

"X-Shopify-Hmac-Sha256" is not available in the request. const hmac = req.get("X-Shopify-Hmac-Sha256"); Issue - 2

"X-Shopify-Order-Id" is not available in the request. const shopifyOrderId = req.get("X-Shopify-Order-Id"); Issue 3: sdk.getNFTCollection not available

Getting an Error at const nftCollection = await sdk.getNFTCollection(NFT_COLLECTION_ADDRESS);

Issue 4: The issue lies in productQuery.body.product.body_html, this returns a string with tags in it. which is then sent as a description.

 const metadata = { 
name: productQuery.body.product.title, 
description: productQuery.body.product.body_html, 
image: productQuery.body.product.image.src,
 };

Change description: productQuery.body.product.body_html to description: productQuery.body.product.body_html.replace("<span>", "").replace("</span>", ""),

Issue 5: Can't find the value of the walletAddress from the following code. An Error is being displayed. const walletAddress = item.properties.find((p) => p.name === "Wallet Address").value;