@dynamic-labs/ethereum-aa 2.0.0-alpha.13 → 2.0.0-alpha.14

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/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## [2.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2024-03-14)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * convert empty value when checking for gas sponsorship ([#4970](https://github.com/dynamic-labs/DynamicAuth/issues/4970)) ([8439a20](https://github.com/dynamic-labs/DynamicAuth/commit/8439a2035729150f33507b22c2678b16ae47976b))
8
+ * omit wallet connect on mobile ([#4954](https://github.com/dynamic-labs/DynamicAuth/issues/4954)) ([6ac29a8](https://github.com/dynamic-labs/DynamicAuth/commit/6ac29a8961dc010688425fb67a4fb621ca9f80b2))
9
+
2
10
  ## [2.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2024-03-14)
3
11
 
4
12
  ## [2.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-03-13)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,13 +26,13 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api": "0.0.387",
30
- "@dynamic-labs/logger": "2.0.0-alpha.13",
31
- "@dynamic-labs/types": "2.0.0-alpha.13",
32
- "@dynamic-labs/utils": "2.0.0-alpha.13",
33
- "@dynamic-labs/viem-utils": "2.0.0-alpha.13",
34
- "@dynamic-labs/wallet-book": "2.0.0-alpha.13",
35
- "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.13"
29
+ "@dynamic-labs/sdk-api": "0.0.389",
30
+ "@dynamic-labs/logger": "2.0.0-alpha.14",
31
+ "@dynamic-labs/types": "2.0.0-alpha.14",
32
+ "@dynamic-labs/utils": "2.0.0-alpha.14",
33
+ "@dynamic-labs/viem-utils": "2.0.0-alpha.14",
34
+ "@dynamic-labs/wallet-book": "2.0.0-alpha.14",
35
+ "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.14"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@zerodev/presets": "^5.1.4",
@@ -162,7 +162,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
162
162
  types: signTypedData.types,
163
163
  });
164
164
  }),
165
- provider,
165
+ provider: provider.extend(viem.publicActions),
166
166
  transport: viem.custom(provider),
167
167
  walletConnector: this,
168
168
  walletUiUtils: this._walletUiUtils,
@@ -212,9 +212,13 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
212
212
  callData: yield this.kernelClientWithSponsorship.account.encodeCallData({
213
213
  data: transaction.data ? transaction.data : '0x',
214
214
  to: transaction.to,
215
- value: viem.isHex(transaction.value)
215
+ /**
216
+ * if value is undefined, it will be set to 0x0 so the sponsorship
217
+ * check does not fail
218
+ */
219
+ value: transaction.value && viem.isHex(transaction.value)
216
220
  ? viem.fromHex(transaction.value, 'bigint')
217
- : transaction.value,
221
+ : '0x0',
218
222
  }),
219
223
  };
220
224
  const result = yield this.kernelClientWithSponsorship.prepareUserOperationRequest({
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { createEcdsaKernelAccountClient } from '@zerodev/presets';
3
- import { custom, createWalletClient, publicActions, isHex, fromHex, formatEther } from 'viem';
3
+ import { publicActions, custom, createWalletClient, isHex, fromHex, formatEther } from 'viem';
4
4
  import { walletClientToSmartAccountSigner } from 'permissionless';
5
5
  import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
6
6
  import { confirmationTransport, chainsMap, unFormatTransaction } from '@dynamic-labs/viem-utils';
@@ -158,7 +158,7 @@ class ZeroDevConnector extends WalletConnectorBase {
158
158
  types: signTypedData.types,
159
159
  });
160
160
  }),
161
- provider,
161
+ provider: provider.extend(publicActions),
162
162
  transport: custom(provider),
163
163
  walletConnector: this,
164
164
  walletUiUtils: this._walletUiUtils,
@@ -208,9 +208,13 @@ class ZeroDevConnector extends WalletConnectorBase {
208
208
  callData: yield this.kernelClientWithSponsorship.account.encodeCallData({
209
209
  data: transaction.data ? transaction.data : '0x',
210
210
  to: transaction.to,
211
- value: isHex(transaction.value)
211
+ /**
212
+ * if value is undefined, it will be set to 0x0 so the sponsorship
213
+ * check does not fail
214
+ */
215
+ value: transaction.value && isHex(transaction.value)
212
216
  ? fromHex(transaction.value, 'bigint')
213
- : transaction.value,
217
+ : '0x0',
214
218
  }),
215
219
  };
216
220
  const result = yield this.kernelClientWithSponsorship.prepareUserOperationRequest({