Skip to content

Commit

Permalink
chore: SyncSwap change the timestamp field to number #51
Browse files Browse the repository at this point in the history
  • Loading branch information
Amedrontadora committed Apr 22, 2024
1 parent a84b44e commit 8948a57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/syncswap/src/sdk/positionSnapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface SubgraphResponse {

interface UserPositionSnapshotsAtBlockData {
block_number: number
timestamp: string
timestamp: number
user_address: string
token_address: string
token_symbol: string
Expand Down Expand Up @@ -102,7 +102,7 @@ export const getPositionsForAddressByPoolAtBlock = async (
}
userPositionSnapshotsAtBlockData.push({
user_address: positionSnapshot.account,
timestamp: new Date(positionSnapshot.timestamp * 1000).toISOString(),
timestamp: Math.floor(positionSnapshot.timestamp),
token_address: positionSnapshot.pair.id,
block_number: snapshotBlockNumber,
token_symbol: `${positionSnapshot.pair.token0.symbol}/${positionSnapshot.pair.token1.symbol} cSLP`,
Expand Down

0 comments on commit 8948a57

Please sign in to comment.