feat: zaps #78

Merged
verbiricha merged 18 commits from zaps into main 2023-02-04 13:53:59 +00:00
3 changed files with 14 additions and 16 deletions
Showing only changes of commit 1524609a43 - Show all commits

View File

@ -1,12 +1,5 @@
.zap {
background-color: var(--note-bg);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 10px;
border-radius: 16px;
margin-bottom: 12px;
min-height: unset;
}
.zap .summary {
@ -15,10 +8,6 @@
justify-content: space-between;
}
.zap .body a {
color: var(--highlight);
}
.zap .amount {
font-size: 18px;
}
@ -72,3 +61,11 @@
.rest-zaps:before {
content: ", ";
}
.note.zap > .header {
align-items: center;
}
.note.zap > .body {
margin-bottom: 0;
}

View File

@ -79,12 +79,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 } = zap
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 { amount, content, zapper, valid, p } = zap
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">
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="summary">
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="zap note card">
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="header">
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
{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
<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

View File

@ -35,7 +35,7 @@ export default function useTimelineFeed(subject: TimelineSubject, options: Timel
let sub = new Subscriptions();
sub.Id = `timeline:${subject.type}:${subject.discriminator}`;
sub.Kinds = new Set([EventKind.TextNote, EventKind.Repost]);
sub.Kinds = new Set([EventKind.TextNote, EventKind.Repost, EventKind.ZapReceipt]);
switch (subject.type) {
case "pubkey": {
sub.Authors = new Set(subject.items);