fix update in handlePaymentSuccess on details

This commit is contained in:
austinkelsay 2024-11-05 15:20:27 -06:00
parent dcea448f3d
commit 11810149bb
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -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.');
}