feat: zaps #78

Merged
verbiricha merged 18 commits from zaps into main 2023-02-04 13:53:59 +00:00
Showing only changes of commit 677ca771c8 - Show all commits

View File

@ -1,5 +1,6 @@
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
import "./Zap.css";
import { useMemo } from "react";
import { useSelector } from "react-redux";
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
// @ts-expect-error
import { decode as invoiceDecode } from "light-bolt11-decoder";
import { bytesToHex } from "@noble/hashes/utils";
@ -10,6 +11,7 @@ import { HexKey, TaggedRawEvent } from "Nostr";
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
import Event from "Nostr/Event";
import Text from "Element/Text";
import ProfileImage from "Element/ProfileImage";
import { RootState } from "State/Store";
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
function findTag(e: TaggedRawEvent, tag: string) {
const maybeTag = e.tags.find((evTag) => {
@ -80,12 +82,13 @@ export function parseZap(zap: TaggedRawEvent): ParsedZap {
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
const Zap = ({ zap }: { zap: ParsedZap }) => {
const { amount, content, zapper, valid, p } = zap
const pubKey = useSelector((s: RootState) => s.login.publicKey)
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
return valid ? (
<div className="zap note card">
<div className="header">
{zapper && <ProfileImage pubkey={zapper} />}
<ProfileImage pubkey={p} />
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
{p !== pubKey && <ProfileImage pubkey={p} />}
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
<div className="amount">
<span className="amount-number">{formatShort(amount)}</span> sats
</div>

v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice
v0l commented 2023-02-04 12:43:30 +00:00 (Migrated from github.com)
Review

This is wrong, were not using this format anymore, can you revert to previous?

The description tag contains the zap note and the hash of this should match the description hash of the invoice

This is wrong, were not using this format anymore, can you revert to previous? The `description` tag contains the zap note and the hash of this should match the description hash of the invoice