@gearbox-protocol/sdk 14.11.0-next.7 → 14.11.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,11 +21,14 @@ __export(simulatePoolOperation_exports, {
21
21
  simulatePoolOperation: () => simulatePoolOperation
22
22
  });
23
23
  module.exports = __toCommonJS(simulatePoolOperation_exports);
24
+ var import_constants = require("./constants.js");
24
25
  var import_errors = require("./errors.js");
25
26
  var import_simulatePoolOpMulticall = require("./simulatePoolOpMulticall.js");
26
27
  var import_simulatePoolOpV1 = require("./simulatePoolOpV1.js");
27
28
  async function simulatePoolOperation(input, options = {}) {
28
- const { logger, useSimulateV1 } = options;
29
+ const { sdk } = input;
30
+ const { logger } = options;
31
+ const useSimulateV1 = options.useSimulateV1 ?? import_constants.ETH_SIMULATE_V1_NETWORKS.has(sdk.networkType);
29
32
  logger?.debug(
30
33
  { wallet: input.wallet, to: input.to },
31
34
  "simulating pool operation"
@@ -1,3 +1,4 @@
1
+ import { ETH_SIMULATE_V1_NETWORKS } from "./constants.js";
1
2
  import {
2
3
  asPreviewSimulationError,
3
4
  combinePreviewSimulationErrors
@@ -5,7 +6,9 @@ import {
5
6
  import { simulatePoolOpMulticall } from "./simulatePoolOpMulticall.js";
6
7
  import { simulatePoolOpV1 } from "./simulatePoolOpV1.js";
7
8
  async function simulatePoolOperation(input, options = {}) {
8
- const { logger, useSimulateV1 } = options;
9
+ const { sdk } = input;
10
+ const { logger } = options;
11
+ const useSimulateV1 = options.useSimulateV1 ?? ETH_SIMULATE_V1_NETWORKS.has(sdk.networkType);
9
12
  logger?.debug(
10
13
  { wallet: input.wallet, to: input.to },
11
14
  "simulating pool operation"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.11.0-next.7",
3
+ "version": "14.11.0-next.8",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {