Skip to content

Commit

Permalink
fix getting receiver name
Browse files Browse the repository at this point in the history
  • Loading branch information
mroxso committed Jun 27, 2023
1 parent 7aa64cd commit 9f2b0e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nostr.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ async function nostrGetZaps() {
let formattedCreatedAt = new Date(createdAt * 1000).toLocaleString();

for(let i = 0; i < data.tags.length; i++) {
if(data.tags[i][0].startsWith('p')) {
if(data.tags[i][0] == ('p')) {
receiver = data.tags[i][1];
}
if(data.tags[i][0].startsWith('description')) {
if(data.tags[i][0] == ('description')) {
description = JSON.parse(data.tags[i][1]);

sender = description.pubkey;
Expand Down Expand Up @@ -53,7 +53,6 @@ async function nostrGetZaps() {

// Create a random div number
const divNumber = Math.floor(Math.random() * 999999);
console.log(divNumber);
// Create the outer div with class "card"
const cardDiv = document.createElement("div");
cardDiv.classList.add("card");
Expand Down

0 comments on commit 9f2b0e4

Please sign in to comment.