mirror of
https://github.com/aljazceru/nostrdvm.git
synced 2025-12-24 01:14:24 +01:00
check for existing 7001 again
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user