Skip to content

Commit

Permalink
Added size message for in-person purchases
Browse files Browse the repository at this point in the history
  • Loading branch information
calvadev committed Sep 11, 2024
1 parent 5858da5 commit 239dbde
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions components/invoice-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,24 @@ export default function InvoiceCard({
},
});
}
} else if (selectedSize) {
let contactMessage = "This purchase was for a size " + selectedSize + ".";
axios({
method: "POST",
url: "/api/nostr/post-event",
headers: {
"Content-Type": "application/json",
},
data: {
pubkey: decryptedRandomNpub.data,
privkey: decryptedRandomNsec.data,
created_at: Math.floor(Date.now() / 1000),
kind: 4,
tags: [["p", pubkeyOfProductBeingSold]],
content: contactMessage,
relays: relays,
},
});
}
};

Expand Down

0 comments on commit 239dbde

Please sign in to comment.