@morpho-org/bundler-sdk-viem 3.2.3 → 3.2.4

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/actions.js +2 -2
  2. package/package.json +10 -10
package/lib/actions.js CHANGED
@@ -564,7 +564,7 @@ const encodeOperation = (operation, dataBefore, supportsSignature = true, index
564
564
  .getAccrualVault(operation.address)
565
565
  .accrueInterest(dataBefore.block.timestamp);
566
566
  if (shares === 0n) {
567
- const minSharePrice = blue_sdk_1.MathLib.mulDivUp(assets, blue_sdk_1.MathLib.wToRay(blue_sdk_1.MathLib.WAD - slippage), vault.toShares(assets));
567
+ const minSharePrice = blue_sdk_1.MathLib.mulDivDown(assets, blue_sdk_1.MathLib.wToRay(blue_sdk_1.MathLib.WAD - slippage), vault.toShares(assets));
568
568
  actions.push({
569
569
  type: "erc4626Withdraw",
570
570
  args: [
@@ -578,7 +578,7 @@ const encodeOperation = (operation, dataBefore, supportsSignature = true, index
578
578
  });
579
579
  }
580
580
  else {
581
- const minSharePrice = blue_sdk_1.MathLib.mulDivUp(vault.toAssets(shares), blue_sdk_1.MathLib.wToRay(blue_sdk_1.MathLib.WAD - slippage), shares);
581
+ const minSharePrice = blue_sdk_1.MathLib.mulDivDown(vault.toAssets(shares), blue_sdk_1.MathLib.wToRay(blue_sdk_1.MathLib.WAD - slippage), shares);
582
582
  actions.push({
583
583
  type: "erc4626Redeem",
584
584
  args: [
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": "3.2.3",
4
+ "version": "3.2.4",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -19,10 +19,10 @@
19
19
  ],
20
20
  "peerDependencies": {
21
21
  "viem": "^2.0.0",
22
- "@morpho-org/blue-sdk": "^4.0.0",
23
- "@morpho-org/morpho-ts": "^2.4.0",
24
- "@morpho-org/blue-sdk-viem": "^3.1.1",
25
- "@morpho-org/simulation-sdk": "^3.1.1"
22
+ "@morpho-org/blue-sdk": "^4.4.0",
23
+ "@morpho-org/morpho-ts": "^2.4.1",
24
+ "@morpho-org/simulation-sdk": "^3.1.1",
25
+ "@morpho-org/blue-sdk-viem": "^3.1.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@tanstack/query-core": "^5.62.16",
@@ -34,14 +34,14 @@
34
34
  "typescript": "^5.7.2",
35
35
  "viem": "^2.23.0",
36
36
  "vitest": "^3.0.5",
37
- "@morpho-org/blue-sdk": "^4.0.0",
37
+ "@morpho-org/blue-sdk": "^4.4.0",
38
+ "@morpho-org/morpho-test": "^2.3.0",
38
39
  "@morpho-org/blue-sdk-viem": "^3.1.1",
39
- "@morpho-org/morpho-ts": "^2.4.0",
40
+ "@morpho-org/morpho-ts": "^2.4.1",
40
41
  "@morpho-org/simulation-sdk": "^3.1.1",
41
- "@morpho-org/morpho-test": "^2.3.0",
42
- "@morpho-org/simulation-sdk-wagmi": "^3.0.2",
43
42
  "@morpho-org/test": "^2.1.4",
44
- "@morpho-org/test-wagmi": "^2.0.4"
43
+ "@morpho-org/test-wagmi": "^2.0.4",
44
+ "@morpho-org/simulation-sdk-wagmi": "^3.0.2"
45
45
  },
46
46
  "scripts": {
47
47
  "prepublish": "$npm_execpath build",