From 6bc68707d0be1e2e5d797018a3da39dedf7639ba Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Mon, 27 Nov 2023 10:02:54 -0800 Subject: [PATCH] feat(warp): add block timestamp to interactions endpoint We already fetch the height, so easy enough to add the timestamp --- src/api/graphql.ts | 2 ++ src/types.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/api/graphql.ts b/src/api/graphql.ts index d53d992..e55abd1 100644 --- a/src/api/graphql.ts +++ b/src/api/graphql.ts @@ -149,6 +149,7 @@ export async function getWalletInteractionsForContract( } block { height + timestamp } } } @@ -177,6 +178,7 @@ export async function getWalletInteractionsForContract( : undefined; interactions.set(e.node.id, { height: e.node.block.height, + timestamp: e.node.block.timestamp, input: parsedInput, owner: e.node.owner.address, }); diff --git a/src/types.ts b/src/types.ts index 0fd911e..a5baa1e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -54,6 +54,7 @@ export type ArNSInteraction = { input: PstInput | undefined; height: number; owner: string; + timestamp: number; errorMessage?: string; };