Skip to content

Commit

Permalink
Remove 151 from blockheight check (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipzeta authored Nov 12, 2024
1 parent e31acc4 commit 10efca4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
Version changes are pinned to SDK releases.

## [1.50.0]

- Remove -151 magic number from blockhash confirmation ([#425](https://github.com/zetamarkets/sdk/pull/425))

## [1.49.0]

- New asset GOAT. ([#422](https://github.com/zetamarkets/sdk/pull/423))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zetamarkets/sdk",
"repository": "https://github.com/zetamarkets/sdk/",
"version": "1.49.0",
"version": "1.50.0",
"description": "Zeta SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 2 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1373,10 +1373,9 @@ export async function processVersionedTransaction(
let currentBlockHeight = 0;
if (!Exchange.skipRpcConfirmation) {
let resendCounter = 0;
// https://solana.com/docs/advanced/confirmation#how-does-transaction-expiration-work
while (
currentBlockHeight <
recentBlockhash.lastValidBlockHeight - 151
recentBlockhash.lastValidBlockHeight
) {
// Keep resending to maximise the chance of confirmation
resendCounter += 1;
Expand Down Expand Up @@ -1566,10 +1565,9 @@ export async function processTransaction(
let currentBlockHeight = 0;
if (!Exchange.skipRpcConfirmation) {
let resendCounter = 0;
// https://solana.com/docs/advanced/confirmation#how-does-transaction-expiration-work
while (
currentBlockHeight <
recentBlockhash.lastValidBlockHeight - 151
recentBlockhash.lastValidBlockHeight
) {
// Keep resending to maximise the chance of confirmation
resendCounter += 1;
Expand Down

0 comments on commit 10efca4

Please sign in to comment.