Skip to content

Commit

Permalink
Chore: add receipt CID to image modal
Browse files Browse the repository at this point in the history
  • Loading branch information
avivash committed Nov 15, 2023
1 parent 3370e2c commit 6718cda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/lib/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type Receipt = {
prf: string[]
ran: string
replayed?: boolean
receiptCID?: string
}

export type Meta = {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/workflows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ export const handleMessage = async (message: Message): Promise<void> => {
{
...receipt,
replayed: message.metadata.replayed,
status: message.metadata.replayed ? 'from cache' : 'success'
status: message.metadata.replayed ? 'from cache' : 'success',
receiptCID: message.receipt_cid
}
]

Expand Down
9 changes: 6 additions & 3 deletions src/routes/workflows/components/graph/Node.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,16 @@
alt="uploaded workflow asset"
/>

<!-- {#if receipt?.ran}
{#if receipt?.receiptCID}
<p
class="text-input-xs font-mono text-base-content self-start whitespace-nowrap"
>
Receipt CID: {uint8arrays.toString(receipt?.ran, 'base64')}
Receipt CID: {uint8arrays.toString(
receipt?.receiptCID?.bytes,
'base64'
)}
</p>
{/if} -->
{/if}
</div>
</div>
{/if}

0 comments on commit 6718cda

Please sign in to comment.