💸 Payments directly into your wallet. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion and state-of-the-art widgets.
Traceback in console.log
CryptoPaymentWidget.tsx:33
{error: TypeError: destroy is not a function
at commitHookEffectListUnmount (http://localhost:3000/stat…}
error: TypeError: destroy is not a function at commitHookEffectListUnmount
(http://localhost:3000/static/js/10.chunk.js:338384:15) at commitPassiveHookEffects
(http://localhost:3000/static/js/10.chunk.js:338441:15) at HTMLUnknownElement.callCallback
(http://localhost:3000/static/js/10.chunk.js:318987:18) at Object.invokeGuardedCallbackDev
(http://localhost:3000/static/js/10.chunk.js:319036:20) at invokeGuardedCallback
(http://localhost:3000/static/js/10.chunk.js:319089:35) at flushPassiveEffectsImpl
(http://localhost:3000/static/js/10.chunk.js:341506:13) at unstable_runWithPriority
(http://localhost:3000/static/js/10.chunk.js:365510:16) at runWithPriority$1
(http://localhost:3000/static/js/10.chunk.js:329874:14) at flushPassiveEffects
(http://localhost:3000/static/js/10.chunk.js:341474:16) at http://localhost:3000/static/js/10.chunk.js:341353:15 at workLoop
(http://localhost:3000/static/js/10.chunk.js:365454:38) at flushWork
(http://localhost:3000/static/js/10.chunk.js:365410:20) at MessagePort.performWorkUntilDeadline
(http://localhost:3000/static/js/10.chunk.js:365014:31)
message: "destroy is not a function"
stack: "TypeError: destroy is not a function\n at commitHookEffectListUnmount (http://localhost:3000/static/js/10.chunk.js
The solution was upgrading from React 16 to React 17 as explained in thesetwo discord threads.
peer dependency to react is >= 17 you have 16
it showed you a peer dependency warning upon installing @DePay/widgets
look closely what NPM prints when you call npm install @depay/widgets --save
While using Depay in my React App, I get the following error:
TypeError: destroy is not a function
Sidenote: I've read your documentation, many of your blog posts, tokenomics, whitepaper and I really love the product and vision of what @spape and the entire Depay team is doing. Please keep up the great work!
update: Maybe this issue can be a clue: https://github.com/facebook/react/issues/19941
A similar implementation is used here and works: https://github.com/iampick/pumpbsc-front/blob/main/src/components/footer.js
Code snippet:
Traceback in console.log CryptoPaymentWidget.tsx:33