mirror of
https://github.com/aljazceru/hypergolic.git
synced 2025-12-19 22:44:20 +01:00
problem: incorrect profile displayed
This commit is contained in:
@@ -66,6 +66,15 @@
|
|||||||
return zapRequestEvent;
|
return zapRequestEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPayerPubkey(zapReceipt:NDKEvent):string|undefined {
|
||||||
|
let pubkey = undefined
|
||||||
|
let zreq = getZapRequest(zapReceipt)
|
||||||
|
if (zreq && zreq.author.pubkey.length == 64) {
|
||||||
|
pubkey = zreq.author.pubkey
|
||||||
|
}
|
||||||
|
return pubkey
|
||||||
|
}
|
||||||
|
|
||||||
function getZapAmount(zapRequest?: NDKEvent): number {
|
function getZapAmount(zapRequest?: NDKEvent): number {
|
||||||
let amount = 0;
|
let amount = 0;
|
||||||
let amountTag = zapRequest?.getMatchingTags('amount');
|
let amountTag = zapRequest?.getMatchingTags('amount');
|
||||||
@@ -96,20 +105,23 @@
|
|||||||
</Table.Row>
|
</Table.Row>
|
||||||
</Table.Header>
|
</Table.Header>
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
{#each $newZaps as [id, zapReceipt]}
|
{#each $newZaps as [id, zapReceipt], _ (id)}
|
||||||
<Table.Row on:click={()=>{console.log(getZapRequest(zapReceipt)?.rawEvent())}} class=" bg-red-800">
|
<Table.Row on:click={()=>{console.log(getZapRequest(zapReceipt)?.rawEvent())}} class="bg-accent">
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
<div class="flex flex-nowrap">
|
<div class="flex flex-nowrap">
|
||||||
|
<div class=" hidden">{getZapRequest(zapReceipt)?.author.pubkey}</div>
|
||||||
|
|
||||||
<Avatar
|
<Avatar
|
||||||
ndk={$ndk}
|
ndk={$ndk}
|
||||||
pubkey={getZapRequest(zapReceipt)?.author.pubkey}
|
pubkey={getPayerPubkey(zapReceipt)}
|
||||||
class="h-10 w-10 flex-none rounded-full object-cover"
|
class="h-10 w-10 flex-none rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
<Name
|
<Name
|
||||||
ndk={$ndk}
|
ndk={$ndk}
|
||||||
pubkey={getZapRequest(zapReceipt)?.author.pubkey}
|
pubkey={getZapRequest(zapReceipt)?.author.pubkey}
|
||||||
class="inline-block truncate p-2"
|
class="inline-block truncate p-2 max-w-32"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell class="hidden md:table-cell"
|
<Table.Cell class="hidden md:table-cell"
|
||||||
|
|||||||
Reference in New Issue
Block a user