We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fda4b commit d290f4eCopy full SHA for d290f4e
governance/pyth_staking_sdk/src/utils/clock.ts
@@ -3,7 +3,7 @@ import { Connection } from "@solana/web3.js";
3
import { EPOCH_DURATION } from "../constants";
4
5
export const getCurrentSolanaTimestamp = async (connection: Connection) => {
6
- const slot = await connection.getSlot();
+ const slot = await connection.getSlot("finalized");
7
const blockTime = await connection.getBlockTime(slot);
8
if (blockTime === null) {
9
throw new Error("Block time is not available");
0 commit comments