@morpho-org/bundler-sdk-viem 3.2.2 → 3.2.3
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.
- package/lib/operations.js +3 -1
- package/package.json +5 -5
package/lib/operations.js
CHANGED
|
@@ -402,7 +402,9 @@ const finalizeBundle = (operations, startData, receiver, unwrapTokens = new Set(
|
|
|
402
402
|
case "Erc20_Approve": {
|
|
403
403
|
const duplicateApproval = approvals.find((approval) => approval.address === operation.address &&
|
|
404
404
|
approval.sender === operation.sender &&
|
|
405
|
-
approval.args.spender === operation.args.spender
|
|
405
|
+
approval.args.spender === operation.args.spender &&
|
|
406
|
+
(!simulation_sdk_1.APPROVE_ONLY_ONCE_TOKENS[startData.chainId]?.includes(approval.address) ||
|
|
407
|
+
(approval.args.amount === 0n) === (operation.args.amount === 0n)));
|
|
406
408
|
if (duplicateApproval == null)
|
|
407
409
|
return approvals.push(operation);
|
|
408
410
|
duplicateApproval.args.amount += operation.args.amount;
|
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.
|
|
4
|
+
"version": "3.2.3",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"viem": "^2.0.0",
|
|
22
22
|
"@morpho-org/blue-sdk": "^4.0.0",
|
|
23
|
-
"@morpho-org/blue-sdk-viem": "^3.1.1",
|
|
24
23
|
"@morpho-org/morpho-ts": "^2.4.0",
|
|
24
|
+
"@morpho-org/blue-sdk-viem": "^3.1.1",
|
|
25
25
|
"@morpho-org/simulation-sdk": "^3.1.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"vitest": "^3.0.5",
|
|
37
37
|
"@morpho-org/blue-sdk": "^4.0.0",
|
|
38
38
|
"@morpho-org/blue-sdk-viem": "^3.1.1",
|
|
39
|
-
"@morpho-org/morpho-test": "^2.3.0",
|
|
40
39
|
"@morpho-org/morpho-ts": "^2.4.0",
|
|
41
40
|
"@morpho-org/simulation-sdk": "^3.1.1",
|
|
41
|
+
"@morpho-org/morpho-test": "^2.3.0",
|
|
42
42
|
"@morpho-org/simulation-sdk-wagmi": "^3.0.2",
|
|
43
|
-
"@morpho-org/test
|
|
44
|
-
"@morpho-org/test": "^2.
|
|
43
|
+
"@morpho-org/test": "^2.1.4",
|
|
44
|
+
"@morpho-org/test-wagmi": "^2.0.4"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"prepublish": "$npm_execpath build",
|