mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-04-10 21:00:02 +02:00
optimziations
This commit is contained in:
parent
a093648347
commit
1b3cd7f889
1
nostr_dvm/tasks/discovery_relevant_notes.py
Normal file
1
nostr_dvm/tasks/discovery_relevant_notes.py
Normal file
@ -0,0 +1 @@
|
||||
from nostr_sdk import Client, Timestamp, PublicKey, Tag, Keys, Options, SecretKey, NostrSigner, EventId
|
@ -151,7 +151,7 @@ export default {
|
||||
else {
|
||||
await this.sign_in_anon()
|
||||
}
|
||||
|
||||
await this.getnip89s()
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@ -211,7 +211,6 @@ export default {
|
||||
localStorage.setItem('nostr-key', '')
|
||||
console.log("Client Nip46 connected")
|
||||
await this.get_user_info(pubkey)
|
||||
await this.getnip89s()
|
||||
await this.reconcile_all_profiles(pubkey)
|
||||
console.log(pubkey.toBech32())
|
||||
//await this.reconcile_all_profiles()
|
||||
@ -328,7 +327,6 @@ export default {
|
||||
localStorage.setItem('nostr-key', keys.secretKey.toBech32())
|
||||
console.log("Client key connected")
|
||||
await this.get_user_info(pubkey)
|
||||
await this.getnip89s()
|
||||
await this.reconcile_all_profiles(pubkey)
|
||||
|
||||
|
||||
@ -463,7 +461,7 @@ export default {
|
||||
console.log("Client connected")
|
||||
|
||||
await this.get_user_info(pubkey)
|
||||
await this.getnip89s()
|
||||
|
||||
|
||||
await this.reconcile_all_profiles(pubkey)
|
||||
|
||||
@ -523,7 +521,7 @@ export default {
|
||||
localStorage.setItem('nostr-key', hexKey)
|
||||
|
||||
await this.get_user_info(publicKey)
|
||||
await this.getnip89s()
|
||||
|
||||
|
||||
await this.reconcile_all_profiles(publicKey)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<EasyDataTable style="margin-top: 450px"
|
||||
class="customize-table" header-text-direction="left" hide-rows-per-page="true" rows-per-page="10" v-if="store.state.profile_results.length != 0 && router.currentRoute.value.path == '/'" table-class-name="customize-table"
|
||||
class="customize-table" header-text-direction="left" hide-rows-per-page=true rows-per-page=10 v-if="store.state.profile_results.length != 0 && router.currentRoute.value.path == '/'" table-class-name="customize-table"
|
||||
:headers="headers"
|
||||
:items="store.state.profile_results" >
|
||||
<template #item-content="{ author, authorurl, avatar}">
|
||||
|
@ -113,13 +113,12 @@ async function listen() {
|
||||
console.log("Received new event from", relayUrl);
|
||||
//console.log(event.asJson())
|
||||
let resonsetorequest = false
|
||||
sleep(0).then(async () => {
|
||||
sleep(1500).then(async () => {
|
||||
for (let tag in event.tags) {
|
||||
if (event.tags[tag].asVec()[0] === "e") {
|
||||
console.log(event.tags[tag].asVec()[1])
|
||||
let test = store.state.requestidRecommendation
|
||||
console.log(test)
|
||||
if (event.tags[tag].asVec()[1] === test) {
|
||||
//console.log(event.tags[tag].asVec()[1])
|
||||
//console.log(test)
|
||||
if (event.tags[tag].asVec()[1] === store.state.requestidRecommendation) {
|
||||
resonsetorequest = true
|
||||
console.log("YES")
|
||||
}
|
||||
|
@ -90,15 +90,15 @@ export async function getEventsOriginalOrder(eventids) {
|
||||
const event_filter = new Filter().ids(ids)
|
||||
let client = store.state.client
|
||||
let results = await client.getEventsOf([event_filter], Duration.fromSecs(5))
|
||||
console.log(results.length)
|
||||
/*console.log(results.length)
|
||||
for (let e of results){
|
||||
console.log(e.id.toHex())
|
||||
}
|
||||
} */
|
||||
|
||||
let final = []
|
||||
for (let f of eventids){
|
||||
let note = results.find(value => value.id.toHex() === f)
|
||||
console.log(note)
|
||||
//console.log(note)
|
||||
final.push(note)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user