thirdweb-example / shopify-sell-nfts

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

Issue: walletAddress is not being fetched; an error occurs. #5

Open IamDushu opened 1 year ago

IamDushu commented 1 year ago

Problem :

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;

IamDushu commented 1 year ago

Solution :

The error occurs as we are trying to find the properties object in item but it doesn't exist.

     const myItem = response.body.order.line_items[0]
     const myWallet = myItem.properties[0]
     const walletAddress = myWallet.value