check for existing 7001 again

This commit is contained in:
Believethehype
2024-04-02 22:12:57 +02:00
parent 25e123b5ef
commit 9ae3953527

View File

@@ -722,7 +722,7 @@ async function subscribe_to_dvm() {
store.commit('set_recommendation_dvms', dvms)
if (current_subscription_dvm.value.nip88.subscriptionId === '' || !current_subscription_dvm.value.nip88.subscriptionId ) {
let res;
let requestid;
@@ -730,16 +730,15 @@ async function subscribe_to_dvm() {
let content = "Subscription from noogle.lol"
let tags = [
[ "p", current_subscription_dvm.value.id],
[ "e" , current_subscription_dvm.value.nip88.eventid],
[ "event", JSON.stringify(current_subscription_dvm.value.nip88.event)],
[ "amount", (current_subscription_amount.value).toString(), "msats", current_subscription_cadence.value],
["p", current_subscription_dvm.value.id],
["e", current_subscription_dvm.value.nip88.eventid],
["event", JSON.stringify(current_subscription_dvm.value.nip88.event)],
["amount", (current_subscription_amount.value).toString(), "msats", current_subscription_cadence.value],
]
for(let zap of current_subscription_dvm.value.nip88.zaps){
for (let zap of current_subscription_dvm.value.nip88.zaps) {
console.log(zap.key + " " + zap.split)
let zaptag = [ "zap", zap.key, zap.split]
let zaptag = ["zap", zap.key, zap.split]
tags.push(zaptag)
}
@@ -758,10 +757,9 @@ async function subscribe_to_dvm() {
requestid = res.id;
console.log(requestid)
}
else{
} else {
let tags_t = []
for (let tag of tags){
for (let tag of tags) {
tags_t.push(Tag.parse(tag))
}
let evt = new EventBuilder(kind, content, tags_t)
@@ -773,7 +771,7 @@ async function subscribe_to_dvm() {
current_subscription_dvm.value.nip88.subscriptionId = requestid
console.log(current_subscription_dvm.value.nip88.subscriptionId)
}
try{
let nwcdvm = PublicKey.parse(store.state.subscription_verifier_pubkey)