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; }; diff --git a/tests/integration/routes.test.ts b/tests/integration/routes.test.ts index 4d5331e..1fdcbb9 100644 --- a/tests/integration/routes.test.ts +++ b/tests/integration/routes.test.ts @@ -78,10 +78,12 @@ describe('Integration tests', () => { ); expect(writeInteraction?.originalTxId).to.not.be.undefined; transferToAddress = address; + const interactionBlock = await arweave.blocks.getCurrent(); contractInteractions.push({ - height: (await arweave.blocks.getCurrent()).height, + height: interactionBlock.height, input: transferInteraction, owner: walletAddress, + timestamp: Math.floor(interactionBlock.timestamp / 1000), valid: true, id: writeInteraction!.originalTxId, });