From e3a1869d49d3f2c18d6e471a2de9103afef7904f Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Wed, 15 May 2024 15:55:35 +0200 Subject: [PATCH] Update RecommendationGeneration.vue --- .../src/components/RecommendationGeneration.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/noogle/src/components/RecommendationGeneration.vue b/ui/noogle/src/components/RecommendationGeneration.vue index e37e70a..5e92fff 100644 --- a/ui/noogle/src/components/RecommendationGeneration.vue +++ b/ui/noogle/src/components/RecommendationGeneration.vue @@ -741,8 +741,8 @@ async function cancelSubscription(kind7001, recipent){ } - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).nip88.hasActiveSubscription = true - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).nip88.expires = true + dvms.find(x => x.id === current_subscription_dvm.value.id).nip88.hasActiveSubscription = true + dvms.find(x => x.id === current_subscription_dvm.value.id).nip88.expires = true } async function subscribe_to_dvm() { @@ -755,7 +755,7 @@ async function subscribe_to_dvm() { // We only arrive here if no subscription exists, we might create a 7001 if it doesnt exist and we zap it let client = store.state.client - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).status = "Subscribing, this might take up to a minute.." + //dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).status = "Subscribing, this might take up to a minute.." store.commit('set_recommendation_dvms', dvms) @@ -855,21 +855,21 @@ if (current_subscription_dvm.value.nip88.subscriptionId === '' || !current_subsc let timeout = 0 let subscription_status while (!isSubscribed && timeout < 30){ - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).status = "Subscribing, please wait.." + dvms.find(x => x.id === current_subscription_dvm.value.id).status = "Subscribing, please wait.." await sleep(5000) timeout = timeout +1 subscription_status = await hasActiveSubscription(store.state.pubkey.toHex(), current_subscription_dvm.value.nip88.d, current_subscription_dvm.value.id) if (subscription_status["isActive"] === true){ isSubscribed = true - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).status = "announced" + dvms.find(x => x.id === current_subscription_dvm.value.id).status = "announced" } } console.log(subscription_status) - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).nip88.hasActiveSubscription = subscription_status["isActive"] - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).nip88.expires = false - dvms.find(x => x.nip88.eventid === current_subscription_dvm.value.nip88.eventid).nip88.subscribedUntil = subscription_status.validUntil + dvms.find(x => x.id === current_subscription_dvm.value.id).nip88.hasActiveSubscription = subscription_status["isActive"] + dvms.find(x => x.id === current_subscription_dvm.value.id).nip88.expires = false + dvms.find(x => x.id === current_subscription_dvm.value.id).nip88.subscribedUntil = subscription_status.validUntil if (subscription_status["isActive"] === false){