{#each payments as p, i} {@const amount = fund ? -p.amount : p.amount}
goto(`/payment/${p.id}`)} onkeydown={(e) => (e.key === "Enter" || e.key === " ") && goto(`/payment/${p.id}`)} role="button" tabindex="0" >
{#if p.tip}
+{Math.round((p.tip / Math.abs(amount)) * 100)}%
{/if}
{#if p.type === types.fund} {#if fund}
{p.user.username}
{:else}
{$t("payments.fund")}
{/if} {:else if p.with}
{p.with.username}
{:else}
{#if p.type === types.lightning || p.type === types.bolt12} {:else if p.type === types.ecash} Ecash {:else if p.type === types.bitcoin} {:else if p.type === types.liquid}
Liquid
{:else if p.type === types.ark} Ark {/if}
{#if p.type === types.ecash} {amount > 0 ? $t("payments.redeemed") : $t("payments.minted")} {:else} {amount > 0 ? p.confirmed ? $t("payments.received") : $t("payments.pending") : $t("payments.sent")} {/if}
{/if}
{formatDate(new Date(p.created), language, { month: "short", day: "numeric", year: "2-digit" })}
{formatDate(new Date(p.created), language, { hour: "numeric", minute: "2-digit" })}
{:else}

{$t("payments.empty")}

{/each}