Skip to content

Commit a484bf0

Browse files
committed
do it
1 parent e5fda4b commit a484bf0

File tree

1 file changed

+2
-1
lines changed
  • governance/pyth_staking_sdk/src/utils

1 file changed

+2
-1
lines changed

governance/pyth_staking_sdk/src/utils/clock.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { Connection } from "@solana/web3.js";
33
import { EPOCH_DURATION } from "../constants";
44

55
export const getCurrentSolanaTimestamp = async (connection: Connection) => {
6-
const slot = await connection.getSlot();
6+
const slot = await connection.getSlot("finalized");
77
const blockTime = await connection.getBlockTime(slot);
88
if (blockTime === null) {
99
throw new Error("Block time is not available");
1010
}
11+
1112
return BigInt(blockTime);
1213
};
1314

0 commit comments

Comments
 (0)