@morpho-org/bundler-sdk-viem 2.0.0-next.27 → 2.0.0-next.28

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.
Files changed (2) hide show
  1. package/lib/operations.js +4 -3
  2. package/package.json +11 -11
package/lib/operations.js CHANGED
@@ -179,8 +179,9 @@ export const populateSubBundle = (inputOperation, data, options = {}) => {
179
179
  },
180
180
  });
181
181
  // Reallocate liquidity if necessary.
182
- if (mainOperation.type === "Blue_Borrow" ||
183
- mainOperation.type === "Blue_Withdraw") {
182
+ if (!!publicAllocatorOptions?.enabled &&
183
+ (mainOperation.type === "Blue_Borrow" ||
184
+ mainOperation.type === "Blue_Withdraw")) {
184
185
  const market = data
185
186
  .getMarket(mainOperation.args.id)
186
187
  .accrueInterest(data.block.timestamp);
@@ -195,7 +196,7 @@ export const populateSubBundle = (inputOperation, data, options = {}) => {
195
196
  const newTotalSupplyAssets = market.totalSupplyAssets - withdrawnAssets;
196
197
  const newTotalBorrowAssets = market.totalBorrowAssets + borrowedAssets;
197
198
  const reallocations = {};
198
- const supplyTargetUtilization = publicAllocatorOptions?.supplyTargetUtilization?.[market.params.id] ??
199
+ const supplyTargetUtilization = publicAllocatorOptions.supplyTargetUtilization?.[market.params.id] ??
199
200
  DEFAULT_SUPPLY_TARGET_UTILIZATION;
200
201
  if (MarketUtils.getUtilization({
201
202
  totalSupplyAssets: newTotalSupplyAssets,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@morpho-org/bundler-sdk-viem",
3
3
  "description": "Viem-based extension of `@morpho-org/simulation-sdk` that exports utilities to transform simple interactions on Morpho (such as `Blue_Borrow`) and Morpho Vaults (such as `MetaMorpho_Deposit`) into the required bundles (with ERC20 approvals, transfers, etc) to submit to the bundler onchain.",
4
- "version": "2.0.0-next.27",
4
+ "version": "2.0.0-next.28",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -20,10 +20,10 @@
20
20
  ],
21
21
  "peerDependencies": {
22
22
  "viem": "^2.0.0",
23
- "@morpho-org/blue-sdk": "^2.0.0-next.25",
24
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.23",
25
- "@morpho-org/morpho-ts": "^2.0.0-next.13",
26
- "@morpho-org/simulation-sdk": "^2.0.0-next.23"
23
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.24",
24
+ "@morpho-org/blue-sdk": "^2.0.0-next.26",
25
+ "@morpho-org/simulation-sdk": "^2.0.0-next.24",
26
+ "@morpho-org/morpho-ts": "^2.0.0-next.13"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@tanstack/query-core": "^5.60.5",
@@ -35,14 +35,14 @@
35
35
  "typescript": "^5.6.3",
36
36
  "viem": "^2.21.48",
37
37
  "vitest": "^2.1.5",
38
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.23",
39
- "@morpho-org/morpho-test": "^2.0.0-next.15",
38
+ "@morpho-org/blue-sdk": "^2.0.0-next.26",
40
39
  "@morpho-org/morpho-ts": "^2.0.0-next.13",
41
- "@morpho-org/blue-sdk": "^2.0.0-next.25",
42
- "@morpho-org/simulation-sdk": "^2.0.0-next.23",
43
- "@morpho-org/test": "^2.0.0-next.21",
40
+ "@morpho-org/morpho-test": "^2.0.0-next.15",
41
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.24",
42
+ "@morpho-org/simulation-sdk": "^2.0.0-next.24",
43
+ "@morpho-org/test-wagmi": "^2.0.0-next.21",
44
44
  "@morpho-org/simulation-sdk-wagmi": "^2.0.0-next.22",
45
- "@morpho-org/test-wagmi": "^2.0.0-next.21"
45
+ "@morpho-org/test": "^2.0.0-next.21"
46
46
  },
47
47
  "scripts": {
48
48
  "prepublish": "$npm_execpath build",