X2Y2-io / x2y2-sdk

X2Y2 Node.js SDK.
MIT License
26 stars 26 forks source link

Suggestion: Add error codes for missing approvals #10

Open tster opened 2 years ago

tster commented 2 years ago

At least a few times a week there are individuals in the X2Y2 developer Discord struggling to make offers or list NFTs with the SDK (or directly through the API).

In many cases, this is because they have forgotten to approve WETH spending (in the case of making offers) or approve transfer of the relevant NFT collection (in case of listing NFTs) to X2Y2's contracts, despite numerous notes about this in the SDK docs.

Would it be possible to add error codes for these cases?