@dynamic-labs/ethereum-aa 4.29.0 → 4.29.1

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,14 @@
1
1
 
2
+ ### [4.29.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.0...v4.29.1) (2025-08-21)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * clear user op cache on send transaction ([#9382](https://github.com/dynamic-labs/dynamic-auth/issues/9382)) ([ddef1e1](https://github.com/dynamic-labs/dynamic-auth/commit/ddef1e16367e04d217e6d79a138988394605dda6))
8
+ * display error when trying to register a previously registered passkey ([#9381](https://github.com/dynamic-labs/dynamic-auth/issues/9381)) ([51ecdd8](https://github.com/dynamic-labs/dynamic-auth/commit/51ecdd84a3d1a36435cc79063caa2fd7187a25db))
9
+ * do not double disable confirmation ui ([#9385](https://github.com/dynamic-labs/dynamic-auth/issues/9385)) ([2deb3ae](https://github.com/dynamic-labs/dynamic-auth/commit/2deb3aeb3055ceb79ea2e8410cce94448b18f8c5))
10
+ * **react-native:** dont emit network change events for disabled chains ([#9375](https://github.com/dynamic-labs/dynamic-auth/issues/9375)) ([f03151e](https://github.com/dynamic-labs/dynamic-auth/commit/f03151ea6b065f6b297edb053fbf84f1060b35e4))
11
+
2
12
  ## [4.29.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.28.0...v4.29.0) (2025-08-19)
3
13
 
4
14
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.29.0";
6
+ var version = "4.29.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.29.0";
2
+ var version = "4.29.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-aa",
3
- "version": "4.29.0",
3
+ "version": "4.29.1",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "@zerodev/ecdsa-validator": "5.4.9",
23
23
  "@zerodev/multi-chain-ecdsa-validator": "5.4.5",
24
24
  "@zerodev/sdk": "5.4.36",
25
- "@dynamic-labs/assert-package-version": "4.29.0",
26
- "@dynamic-labs/ethereum-aa-core": "4.29.0",
27
- "@dynamic-labs/ethereum-core": "4.29.0",
28
- "@dynamic-labs/logger": "4.29.0",
29
- "@dynamic-labs/types": "4.29.0",
30
- "@dynamic-labs/utils": "4.29.0",
31
- "@dynamic-labs/wallet-book": "4.29.0",
32
- "@dynamic-labs/wallet-connector-core": "4.29.0"
25
+ "@dynamic-labs/assert-package-version": "4.29.1",
26
+ "@dynamic-labs/ethereum-aa-core": "4.29.1",
27
+ "@dynamic-labs/ethereum-core": "4.29.1",
28
+ "@dynamic-labs/logger": "4.29.1",
29
+ "@dynamic-labs/types": "4.29.1",
30
+ "@dynamic-labs/utils": "4.29.1",
31
+ "@dynamic-labs/wallet-book": "4.29.1",
32
+ "@dynamic-labs/wallet-connector-core": "4.29.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "viem": "^2.28.4"
@@ -54,6 +54,8 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
54
54
  * Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
55
55
  */
56
56
  this.shouldUseEIP7702Mode = false;
57
+ // Avoid double-disabling confirmation UI when sendUserOperation is invoked within onSendTransaction
58
+ this.isInOnSendTransactionFlow = false;
57
59
  this._walletUiUtils = opts.walletUiUtils;
58
60
  this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
59
61
  this.is7702EnabledOnDashboard =
@@ -315,7 +317,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
315
317
  kernelClient = yield createEcdsaKernelAccountClient.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator.getEcdsaValidator(this.ecdsaProviderType) }));
316
318
  }
317
319
  utils.wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
318
- this._walletUiUtils.disabledConfirmationOnce();
320
+ if (!this.isInOnSendTransactionFlow) {
321
+ this._walletUiUtils.disabledConfirmationOnce();
322
+ }
319
323
  return original(...args);
320
324
  });
321
325
  return kernelClient;
@@ -420,8 +424,8 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
420
424
  return this.internalSignMessage(message);
421
425
  }),
422
426
  onSendTransaction: (_b) => _tslib.__awaiter(this, [_b], void 0, function* ({ transaction }) {
427
+ this.isInOnSendTransactionFlow = true;
423
428
  try {
424
- this._walletUiUtils.disabledConfirmationOnce();
425
429
  const effectiveProvider = this.isGasSponsorshipDisabled()
426
430
  ? provider
427
431
  : this.kernelClientWithSponsorship;
@@ -432,17 +436,22 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
432
436
  const key = `${unformattedTransaction.from}-${unformattedTransaction.to}-${unformattedTransaction.data}`;
433
437
  const cachedTransaction = this.userOperationCache[key];
434
438
  const isWaasEOAConnector = this.eoaConnector && walletConnectorCore.isDynamicWaasConnector(this.eoaConnector);
439
+ let response;
435
440
  if (isWaasEOAConnector) {
436
441
  const userOperation = (cachedTransaction === null || cachedTransaction === void 0 ? void 0 : cachedTransaction.userOperation) ||
437
442
  (yield this.getCurrentUserOperation(unformattedTransaction))
438
443
  .userOperation;
439
- return this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
444
+ response = yield this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
440
445
  }
441
- if (cachedTransaction) {
446
+ else if (cachedTransaction) {
447
+ this._walletUiUtils.disabledConfirmationOnce();
442
448
  const signedTransaction = yield effectiveProvider.signUserOperation(cachedTransaction.userOperation);
443
- return effectiveProvider.sendUserOperation(signedTransaction);
449
+ response = yield effectiveProvider.sendUserOperation(signedTransaction);
450
+ }
451
+ else {
452
+ response = yield effectiveProvider.sendTransaction(unformattedTransaction);
444
453
  }
445
- const response = yield effectiveProvider.sendTransaction(unformattedTransaction);
454
+ this.userOperationCache = {};
446
455
  return response;
447
456
  }
448
457
  catch (err) {
@@ -455,6 +464,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
455
464
  }
456
465
  throw err;
457
466
  }
467
+ finally {
468
+ this.isInOnSendTransactionFlow = false;
469
+ }
458
470
  }),
459
471
  onSignTypedData: (_c) => _tslib.__awaiter(this, [_c], void 0, function* ({ message }) {
460
472
  this._walletUiUtils.disabledConfirmationOnce();
@@ -75,6 +75,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
75
75
  * Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
76
76
  */
77
77
  private shouldUseEIP7702Mode;
78
+ private isInOnSendTransactionFlow;
78
79
  constructor(opts: ZeroDevConnectorProps);
79
80
  confirmTransactionStatus(): Promise<TransactionReceipt>;
80
81
  get currentNetworkProvider(): {
@@ -50,6 +50,8 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
50
50
  * Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
51
51
  */
52
52
  this.shouldUseEIP7702Mode = false;
53
+ // Avoid double-disabling confirmation UI when sendUserOperation is invoked within onSendTransaction
54
+ this.isInOnSendTransactionFlow = false;
53
55
  this._walletUiUtils = opts.walletUiUtils;
54
56
  this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
55
57
  this.is7702EnabledOnDashboard =
@@ -311,7 +313,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
311
313
  kernelClient = yield createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator(this.ecdsaProviderType) }));
312
314
  }
313
315
  wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
314
- this._walletUiUtils.disabledConfirmationOnce();
316
+ if (!this.isInOnSendTransactionFlow) {
317
+ this._walletUiUtils.disabledConfirmationOnce();
318
+ }
315
319
  return original(...args);
316
320
  });
317
321
  return kernelClient;
@@ -416,8 +420,8 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
416
420
  return this.internalSignMessage(message);
417
421
  }),
418
422
  onSendTransaction: (_b) => __awaiter(this, [_b], void 0, function* ({ transaction }) {
423
+ this.isInOnSendTransactionFlow = true;
419
424
  try {
420
- this._walletUiUtils.disabledConfirmationOnce();
421
425
  const effectiveProvider = this.isGasSponsorshipDisabled()
422
426
  ? provider
423
427
  : this.kernelClientWithSponsorship;
@@ -428,17 +432,22 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
428
432
  const key = `${unformattedTransaction.from}-${unformattedTransaction.to}-${unformattedTransaction.data}`;
429
433
  const cachedTransaction = this.userOperationCache[key];
430
434
  const isWaasEOAConnector = this.eoaConnector && isDynamicWaasConnector(this.eoaConnector);
435
+ let response;
431
436
  if (isWaasEOAConnector) {
432
437
  const userOperation = (cachedTransaction === null || cachedTransaction === void 0 ? void 0 : cachedTransaction.userOperation) ||
433
438
  (yield this.getCurrentUserOperation(unformattedTransaction))
434
439
  .userOperation;
435
- return this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
440
+ response = yield this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
436
441
  }
437
- if (cachedTransaction) {
442
+ else if (cachedTransaction) {
443
+ this._walletUiUtils.disabledConfirmationOnce();
438
444
  const signedTransaction = yield effectiveProvider.signUserOperation(cachedTransaction.userOperation);
439
- return effectiveProvider.sendUserOperation(signedTransaction);
445
+ response = yield effectiveProvider.sendUserOperation(signedTransaction);
446
+ }
447
+ else {
448
+ response = yield effectiveProvider.sendTransaction(unformattedTransaction);
440
449
  }
441
- const response = yield effectiveProvider.sendTransaction(unformattedTransaction);
450
+ this.userOperationCache = {};
442
451
  return response;
443
452
  }
444
453
  catch (err) {
@@ -451,6 +460,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
451
460
  }
452
461
  throw err;
453
462
  }
463
+ finally {
464
+ this.isInOnSendTransactionFlow = false;
465
+ }
454
466
  }),
455
467
  onSignTypedData: (_c) => __awaiter(this, [_c], void 0, function* ({ message }) {
456
468
  this._walletUiUtils.disabledConfirmationOnce();