mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
fix update in handlePaymentSuccess on details
This commit is contained in:
parent
dcea448f3d
commit
11810149bb
@ -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.');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user