From 11810149bbb53e2e0eec3aa2c19656a22808fffc Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Tue, 5 Nov 2024 15:20:27 -0600 Subject: [PATCH] fix update in handlePaymentSuccess on details --- src/pages/details/[slug]/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/details/[slug]/index.js b/src/pages/details/[slug]/index.js index c278205..72e41c7 100644 --- a/src/pages/details/[slug]/index.js +++ b/src/pages/details/[slug]/index.js @@ -121,11 +121,9 @@ const Details = () => { fetchAndProcessEvent(); }, [router.isReady, router.query, ndk, session, decryptContent, fetchAuthor, showToast]); - const handlePaymentSuccess = async (response, newResource) => { + const handlePaymentSuccess = (response) => { if (response && response?.preimage) { - console.log("newResource", newResource); - const updated = await update(); - console.log("session after update", updated); + update(); } else { showToast('error', 'Error', 'Failed to purchase resource. Please try again.'); }