Skip to content

Commit

Permalink
add timestamp to event data
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters authored and evan-gray committed Oct 6, 2024
1 parent 899ac24 commit 3f14b05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud_functions/src/getSolanaEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const getEventData = (
token: tokenBridgeIx.accounts[3]?.toString() || '', // mint account
amount: transferIx.parsed.info?.amount,
isDeposit: true,
timestamp: tx.blockTime || undefined,
};
}
break;
Expand Down Expand Up @@ -243,6 +244,7 @@ const getEventData = (
token: tokenBridgeIx.accounts[4]?.toString() || '', // mint account
amount: burnIx.parsed.info?.amount,
isDeposit: false,
timestamp: tx.blockTime || undefined,
};
}
break;
Expand All @@ -268,6 +270,7 @@ const getEventData = (
token: tokenBridgeIx.accounts[mintAccountIndex]?.toString() || '', // mint account
amount: transferIx.parsed.info?.amount,
isDeposit: false,
timestamp: tx.blockTime || undefined,
};
}
break;
Expand All @@ -294,6 +297,7 @@ const getEventData = (
token: mintToIx.parsed.info?.mint,
amount: mintToIx.parsed.info?.amount,
isDeposit: false,
timestamp: tx.blockTime || undefined,
};
}
break;
Expand Down
1 change: 1 addition & 0 deletions common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export interface EventData {
token: string;
amount: string;
isDeposit: boolean;
timestamp?: number;
}

export type TokenAmount = {
Expand Down

0 comments on commit 3f14b05

Please sign in to comment.