diff --git a/target_chains/solana/sdk/js/pyth_solana_receiver/examples/post_twap_update.ts b/target_chains/solana/sdk/js/pyth_solana_receiver/examples/post_twap_update.ts index 4f3f21b98..4109be829 100644 --- a/target_chains/solana/sdk/js/pyth_solana_receiver/examples/post_twap_update.ts +++ b/target_chains/solana/sdk/js/pyth_solana_receiver/examples/post_twap_update.ts @@ -40,8 +40,9 @@ async function main() { // Post the TWAP updates to ephemeral accounts, one per price feed await transactionBuilder.addPostTwapUpdates(twapUpdateData); console.log( - "The SOL/USD TWAP update will get posted to:", - transactionBuilder.getTwapUpdateAccount(SOL_PRICE_FEED_ID).toBase58() + `\nThe SOL/USD TWAP update will get posted to: ${transactionBuilder + .getTwapUpdateAccount(SOL_PRICE_FEED_ID) + .toBase58()}\n` ); await transactionBuilder.addTwapConsumerInstructions( @@ -69,10 +70,10 @@ async function main() { async function getTwapUpdateData() { const hermesConnection = new HermesClient("https://hermes.pyth.network/", {}); - // Request TWAP updates for the last hour (3600 seconds) + // Request TWAP updates with a 5 minute window (300 seconds) const response = await hermesConnection.getLatestTwaps( [SOL_PRICE_FEED_ID, ETH_PRICE_FEED_ID], - 3600, + 300, { encoding: "base64" } );