@orca-so/whirlpools-sdk
Advanced tools
Comparing version 0.11.8 to 0.11.9
@@ -20,2 +20,3 @@ "use strict"; | ||
const util_1 = require("./util"); | ||
const txn_utils_1 = require("../utils/txn-utils"); | ||
class WhirlpoolImpl { | ||
@@ -288,8 +289,14 @@ constructor(ctx, address, tokenAInfo, tokenBInfo, tokenVaultAInfo, tokenVaultBInfo, rewardInfos, data) { | ||
txBuilder.addInstruction(positionIx); | ||
const txBuilders = []; | ||
if (!tokenAccountsTxBuilder.isEmpty()) { | ||
txBuilders.push(tokenAccountsTxBuilder); | ||
if (tokenAccountsTxBuilder.isEmpty()) { | ||
return [txBuilder]; | ||
} | ||
txBuilders.push(txBuilder); | ||
return txBuilders; | ||
// This handles an edge case where the instructions are too | ||
// large to fit in a single transaction and we need to split the | ||
// instructions into two transactions. | ||
const canFitInOneTransaction = await (0, txn_utils_1.checkMergedTransactionSizeIsValid)(this.ctx, [tokenAccountsTxBuilder, txBuilder], common_sdk_1.MEASUREMENT_BLOCKHASH); | ||
if (!canFitInOneTransaction) { | ||
return [tokenAccountsTxBuilder, txBuilder]; | ||
} | ||
tokenAccountsTxBuilder.addInstruction(txBuilder.compressIx(false)); | ||
return [tokenAccountsTxBuilder]; | ||
} | ||
@@ -296,0 +303,0 @@ async refresh() { |
{ | ||
"name": "@orca-so/whirlpools-sdk", | ||
"version": "0.11.8", | ||
"version": "0.11.9", | ||
"description": "Typescript SDK to interact with Orca's Whirlpool program.", | ||
@@ -10,3 +10,3 @@ "license": "Apache-2.0", | ||
"@coral-xyz/anchor": "~0.27.0", | ||
"@orca-so/common-sdk": "^0.3.3", | ||
"@orca-so/common-sdk": "^0.3.6", | ||
"@solana/spl-token": "^0.3.8", | ||
@@ -13,0 +13,0 @@ "@solana/web3.js": "^1.75.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20017
940955
1
Updated@orca-so/common-sdk@^0.3.6