@dynamic-labs/sdk-react-core 4.88.1 → 4.88.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +18 -153
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +12 -12
  5. package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.cjs +6 -0
  6. package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.js +6 -0
  7. package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +8 -0
  8. package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +8 -0
  9. package/src/lib/context/ConnectWithOtpContext/hooks/useRestoreOtpVerificationState/index.d.ts +1 -0
  10. package/src/lib/context/ConnectWithOtpContext/hooks/useRestoreOtpVerificationState/useRestoreOtpVerificationState.cjs +48 -0
  11. package/src/lib/context/ConnectWithOtpContext/hooks/useRestoreOtpVerificationState/useRestoreOtpVerificationState.d.ts +16 -0
  12. package/src/lib/context/ConnectWithOtpContext/hooks/useRestoreOtpVerificationState/useRestoreOtpVerificationState.js +44 -0
  13. package/src/lib/context/ConnectWithOtpContext/utils/buildEmailOtpHandler/buildEmailOtpHandler.cjs +88 -0
  14. package/src/lib/context/ConnectWithOtpContext/utils/buildEmailOtpHandler/buildEmailOtpHandler.d.ts +16 -0
  15. package/src/lib/context/ConnectWithOtpContext/utils/buildEmailOtpHandler/buildEmailOtpHandler.js +84 -0
  16. package/src/lib/context/ConnectWithOtpContext/utils/buildEmailOtpHandler/index.d.ts +1 -0
  17. package/src/lib/context/ConnectWithOtpContext/utils/buildSmsOtpHandler/buildSmsOtpHandler.cjs +67 -0
  18. package/src/lib/context/ConnectWithOtpContext/utils/buildSmsOtpHandler/buildSmsOtpHandler.d.ts +17 -0
  19. package/src/lib/context/ConnectWithOtpContext/utils/buildSmsOtpHandler/buildSmsOtpHandler.js +63 -0
  20. package/src/lib/context/ConnectWithOtpContext/utils/buildSmsOtpHandler/index.d.ts +1 -0
  21. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +23 -47
  22. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.d.ts +1 -1
  23. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +23 -47
  24. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +19 -34
  25. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.d.ts +1 -1
  26. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +19 -34
  27. package/src/lib/context/ConnectWithOtpContext/utils/otpVerificationStorage/index.d.ts +2 -0
  28. package/src/lib/context/ConnectWithOtpContext/utils/otpVerificationStorage/otpVerificationStorage.cjs +60 -0
  29. package/src/lib/context/ConnectWithOtpContext/utils/otpVerificationStorage/otpVerificationStorage.d.ts +30 -0
  30. package/src/lib/context/ConnectWithOtpContext/utils/otpVerificationStorage/otpVerificationStorage.js +54 -0
  31. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -3
  32. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +4 -4
  33. package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.cjs +10 -2
  34. package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.js +10 -2
  35. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +11 -10
  36. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +12 -11
  37. package/src/lib/utils/hooks/useReconcileInstalledWallets/index.d.ts +1 -0
  38. package/src/lib/utils/hooks/useReconcileInstalledWallets/useReconcileInstalledWallets.cjs +69 -0
  39. package/src/lib/utils/hooks/useReconcileInstalledWallets/useReconcileInstalledWallets.d.ts +7 -0
  40. package/src/lib/utils/hooks/useReconcileInstalledWallets/useReconcileInstalledWallets.js +65 -0
  41. package/src/lib/utils/hooks/useWalletList/buildWalletsList.cjs +42 -0
  42. package/src/lib/utils/hooks/useWalletList/buildWalletsList.d.ts +17 -0
  43. package/src/lib/utils/hooks/useWalletList/buildWalletsList.js +38 -0
  44. package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +27 -26
  45. package/src/lib/utils/hooks/useWalletList/useWalletList.js +27 -26
  46. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +26 -21
  47. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +26 -21
package/CHANGELOG.md CHANGED
@@ -1,4 +1,21 @@
1
1
 
2
+ ### [4.88.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.2...v4.88.3) (2026-06-09)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **ethereum:** bump @walletconnect/ethereum-provider to 2.23.2 ([#11497](https://github.com/dynamic-labs/dynamic-auth/issues/11497)) ([fb42c38](https://github.com/dynamic-labs/dynamic-auth/commit/fb42c3877f55d2dfaa3a3a46f8178a6b4a0e55d0))
8
+ * persist OTP verification state in sessionStorage to survive webview remounts ([#11499](https://github.com/dynamic-labs/dynamic-auth/issues/11499)) ([aa330df](https://github.com/dynamic-labs/dynamic-auth/commit/aa330dfc41e8fc81b823cce08b7c9b93588fc52c))
9
+
10
+ ### [4.88.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.1...v4.88.2) (2026-06-06)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **aleo:** support sendBalance on WaaS wallets (add connector.requestTransaction) ([#11474](https://github.com/dynamic-labs/dynamic-auth/issues/11474)) ([c11d49d](https://github.com/dynamic-labs/dynamic-auth/commit/c11d49d2cd1aeafdc6d6713a5c711dbe28ecf17d))
16
+ * remove rerenders from useDynamicWaas and useCreateDynamicEmbeddedWalletWallets ([#11482](https://github.com/dynamic-labs/dynamic-auth/issues/11482)) ([9724bf6](https://github.com/dynamic-labs/dynamic-auth/commit/9724bf67db7abd09366985b15e9687802e6ad3b1))
17
+ * **sdk-react-core:** reconcile installed wallets after late provider injection (DYNT-1074) ([#11480](https://github.com/dynamic-labs/dynamic-auth/issues/11480)) ([4d833da](https://github.com/dynamic-labs/dynamic-auth/commit/4d833daa5ee2e09780ee612ae93c6c5fddea9fdf))
18
+
2
19
  ### [4.88.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.0...v4.88.1) (2026-06-04)
3
20
 
4
21
 
@@ -6459,156 +6476,4 @@ Enjoy!
6459
6476
  ### Bug Fixes
6460
6477
 
6461
6478
  * **view-context:** refactor view context to have initial view ([#2268](https://github.com/dynamic-labs/DynamicAuth/issues/2268)) ([0afe6ae](https://github.com/dynamic-labs/DynamicAuth/commit/0afe6ae469f62fd16fd8471322f9295957f607f6))
6462
- * **wcv2:** upgrade universal provider and refactor wcv2 ([#2163](https://github.com/dynamic-labs/DynamicAuth/issues/2163)) ([e69c67c](https://github.com/dynamic-labs/DynamicAuth/commit/e69c67c95dca0f694c4a554702be96c3f7d3d77e))
6463
-
6464
- ## [0.17.0-RC.29](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.28...v0.17.0-RC.29) (2023-06-07)
6465
-
6466
-
6467
- ### Bug Fixes
6468
-
6469
- * de-duplicate authSuccess call ([#2269](https://github.com/dynamic-labs/DynamicAuth/issues/2269)) ([00268d0](https://github.com/dynamic-labs/DynamicAuth/commit/00268d001355946c98d285d71d7f7acc96d4c9f7))
6470
- * hide search when filtered wallets equal to number of shown wallets ([#2221](https://github.com/dynamic-labs/DynamicAuth/issues/2221)) ([fb0f629](https://github.com/dynamic-labs/DynamicAuth/commit/fb0f629ae76240fe681db91b485139934026054e))
6471
-
6472
- ## [0.17.0-RC.28](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.27...v0.17.0-RC.28) (2023-06-06)
6473
-
6474
-
6475
- ### Features
6476
-
6477
- * lower username minimum length requirement ([#2265](https://github.com/dynamic-labs/DynamicAuth/issues/2265)) ([ed891ca](https://github.com/dynamic-labs/DynamicAuth/commit/ed891cac8cceaf9e0556b679eda7a3575725805d))
6478
-
6479
-
6480
- ### Bug Fixes
6481
-
6482
- * **send_balance:** add amount validation to form ([#2261](https://github.com/dynamic-labs/DynamicAuth/issues/2261)) ([9a57cfe](https://github.com/dynamic-labs/DynamicAuth/commit/9a57cfe0dd7f97aa16351b091ab385b2b5c7c5e4))
6483
- * shrink dynamic widget in smaller containers ([#2260](https://github.com/dynamic-labs/DynamicAuth/issues/2260)) ([353f447](https://github.com/dynamic-labs/DynamicAuth/commit/353f44724db83e9f1500c606fdea7d50a8067711))
6484
-
6485
- ## [0.17.0-RC.27](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.26...v0.17.0-RC.27) (2023-06-06)
6486
-
6487
-
6488
- ### Features
6489
-
6490
- * sync wagmi to first connected eth wallet ([#2253](https://github.com/dynamic-labs/DynamicAuth/issues/2253)) ([c00aed7](https://github.com/dynamic-labs/DynamicAuth/commit/c00aed73a1014c668311c8cb59e5a466b5ee6779))
6491
-
6492
-
6493
- ### Bug Fixes
6494
-
6495
- * include username in userFieldsSchema ([#2257](https://github.com/dynamic-labs/DynamicAuth/issues/2257)) ([6e5431d](https://github.com/dynamic-labs/DynamicAuth/commit/6e5431d08323d718b11accf3790ef56fc7325b5c))
6496
-
6497
- ## [0.17.0-RC.26](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.25...v0.17.0-RC.26) (2023-06-05)
6498
-
6499
-
6500
- ### Features
6501
-
6502
- * disable button on social unlink ([#2234](https://github.com/dynamic-labs/DynamicAuth/issues/2234)) ([7f148de](https://github.com/dynamic-labs/DynamicAuth/commit/7f148de76b0fca632e1b4d6ff71c18eb0207c02b))
6503
- * update magic + email icon in auth flow views ([#2224](https://github.com/dynamic-labs/DynamicAuth/issues/2224)) ([93f1ed6](https://github.com/dynamic-labs/DynamicAuth/commit/93f1ed644428701c2747565033d0ad113fa8eeb2))
6504
-
6505
-
6506
- ### Bug Fixes
6507
-
6508
- * **wallets:** keep magic social wallet connector on mobile ([#2242](https://github.com/dynamic-labs/DynamicAuth/issues/2242)) ([35c092d](https://github.com/dynamic-labs/DynamicAuth/commit/35c092da3b8a76c74ae25558489d663ce963d72f))
6509
- * wrong logger instance in UserProfileSocialAccount ([#2248](https://github.com/dynamic-labs/DynamicAuth/issues/2248)) ([814108d](https://github.com/dynamic-labs/DynamicAuth/commit/814108d416d9d730bed8976956bc7974c7fde2a8))
6510
-
6511
- ## [0.17.0-RC.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.24...v0.17.0-RC.25) (2023-06-05)
6512
-
6513
-
6514
- ### Bug Fixes
6515
-
6516
- * **EmailOTPMagicWalletConnector:** allow user to reconnect with email wallet ([#2230](https://github.com/dynamic-labs/DynamicAuth/issues/2230)) ([6059886](https://github.com/dynamic-labs/DynamicAuth/commit/605988650a783ae824bb8c45edc5533fecf8726a))
6517
- * only set wagmi connector if connected chain is evm ([#2237](https://github.com/dynamic-labs/DynamicAuth/issues/2237)) ([a7be7d3](https://github.com/dynamic-labs/DynamicAuth/commit/a7be7d302d1e74088b0aa2b6848c879079e6f963))
6518
- * Revert "fix(ViewContext): only set view when on wallet list" ([#2235](https://github.com/dynamic-labs/DynamicAuth/issues/2235)) ([e790315](https://github.com/dynamic-labs/DynamicAuth/commit/e79031577f640161cc5f0b9b2e695e22d9a98901)), closes [#2226](https://github.com/dynamic-labs/DynamicAuth/issues/2226)
6519
- * set view to social-redirect-view while waiting to process magic redirect ([#2229](https://github.com/dynamic-labs/DynamicAuth/issues/2229)) ([f50a29c](https://github.com/dynamic-labs/DynamicAuth/commit/f50a29c0b9623c703f1577c7a41fcc5aee58abb8))
6520
- * user profile does not extend on mobile ([#2236](https://github.com/dynamic-labs/DynamicAuth/issues/2236)) ([5bb7912](https://github.com/dynamic-labs/DynamicAuth/commit/5bb7912a865338fdf6eca1a19ff4b74a3fb18eeb))
6521
- * **ViewContext:** only set view when on wallet list ([#2226](https://github.com/dynamic-labs/DynamicAuth/issues/2226)) ([85e8fc1](https://github.com/dynamic-labs/DynamicAuth/commit/85e8fc140069cabff41f4067ac93ea0c5cfaa161))
6522
-
6523
- ## [0.17.0-RC.24](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.23...v0.17.0-RC.24) (2023-06-02)
6524
-
6525
- ## [0.17.0-RC.23](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.22...v0.17.0-RC.23) (2023-06-02)
6526
-
6527
-
6528
- ### Bug Fixes
6529
-
6530
- * flow connection status improvements ([#2212](https://github.com/dynamic-labs/DynamicAuth/issues/2212)) ([5225e9f](https://github.com/dynamic-labs/DynamicAuth/commit/5225e9f3f19705cdde3c1d860ddf4e69689a839b))
6531
- * **useSyncPrimaryWallet:** disables the hook while connect state is loaded ([#2193](https://github.com/dynamic-labs/DynamicAuth/issues/2193)) ([d2a69c8](https://github.com/dynamic-labs/DynamicAuth/commit/d2a69c8edfbb2a19305b0fd322e24d909bbf9b4f)), closes [#2155](https://github.com/dynamic-labs/DynamicAuth/issues/2155)
6532
-
6533
- ## [0.17.0-RC.22](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.21...v0.17.0-RC.22) (2023-06-02)
6534
-
6535
-
6536
- ### Features
6537
-
6538
- * social copy update ([#2215](https://github.com/dynamic-labs/DynamicAuth/issues/2215)) ([1fe7316](https://github.com/dynamic-labs/DynamicAuth/commit/1fe7316a94284db7227d5ab09026354269559752))
6539
-
6540
- ## [0.17.0-RC.21](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.20...v0.17.0-RC.21) (2023-06-02)
6541
-
6542
-
6543
- ### Bug Fixes
6544
-
6545
- * social icon is missing on some views ([#2211](https://github.com/dynamic-labs/DynamicAuth/issues/2211)) ([bddd255](https://github.com/dynamic-labs/DynamicAuth/commit/bddd255f0aa61aed4b767145c51624ac1eb9b963))
6546
-
6547
- ## [0.17.0-RC.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.19...v0.17.0-RC.20) (2023-06-01)
6548
-
6549
-
6550
- ### Features
6551
-
6552
- * add AccessDeniedContext to lift denied wallet state up ([#2180](https://github.com/dynamic-labs/DynamicAuth/issues/2180)) ([509519d](https://github.com/dynamic-labs/DynamicAuth/commit/509519d08496248545f1548f676b13e140473e41))
6553
- * **DYN-2338:** update magic icons to social icons ([#2176](https://github.com/dynamic-labs/DynamicAuth/issues/2176)) ([42a4f63](https://github.com/dynamic-labs/DynamicAuth/commit/42a4f6367e6fa4ad8736f9ac42f535c8a9c1d377))
6554
- * **DynamicWidget:** add send balance button ([#2183](https://github.com/dynamic-labs/DynamicAuth/issues/2183)) ([d76355e](https://github.com/dynamic-labs/DynamicAuth/commit/d76355e1f9c3a7b05cbb5b7b3144dad379586689))
6555
- * handle magic redirect error ([#2203](https://github.com/dynamic-labs/DynamicAuth/issues/2203)) ([9a088c6](https://github.com/dynamic-labs/DynamicAuth/commit/9a088c6aad2eb2c1045f544a784083d2732df440))
6556
- * **SendBalanceModal:** adds openSendBalanceModal in dynamic context ([#2159](https://github.com/dynamic-labs/DynamicAuth/issues/2159)) ([f89b21b](https://github.com/dynamic-labs/DynamicAuth/commit/f89b21bfcd65bb61ef33b17b460140404574b235))
6557
- * social error handling improvements ([#2146](https://github.com/dynamic-labs/DynamicAuth/issues/2146)) ([a64a26a](https://github.com/dynamic-labs/DynamicAuth/commit/a64a26aa42c228654cb135cd6c4778e8bd2bd0e6))
6558
-
6559
-
6560
- ### Bug Fixes
6561
-
6562
- * amendments to user profile ([#2201](https://github.com/dynamic-labs/DynamicAuth/issues/2201)) ([5d12c17](https://github.com/dynamic-labs/DynamicAuth/commit/5d12c1716cdcd8d843ef3ff941e163bad28573b1))
6563
- * **formatBigNumber:** display the ceil value when value is too low ([#2165](https://github.com/dynamic-labs/DynamicAuth/issues/2165)) ([ad56fe1](https://github.com/dynamic-labs/DynamicAuth/commit/ad56fe11d55ee038e08ef77dfa2bd6155fee7fe3))
6564
- * use wcv2 only if wallet supports it ([#2198](https://github.com/dynamic-labs/DynamicAuth/issues/2198)) ([3d5fea7](https://github.com/dynamic-labs/DynamicAuth/commit/3d5fea7743a18b47f33ef371ecc2652003accb4d))
6565
-
6566
- ## [0.17.0-RC.19](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.18...v0.17.0-RC.19) (2023-05-30)
6567
-
6568
-
6569
- ### Features
6570
-
6571
- * add SocialWrongAccountView ([#2153](https://github.com/dynamic-labs/DynamicAuth/issues/2153)) ([531a29d](https://github.com/dynamic-labs/DynamicAuth/commit/531a29d7d87739d974ecc35c57ef0d333a5e7451))
6572
- * do not show unlink button for embedded wallets ([#2169](https://github.com/dynamic-labs/DynamicAuth/issues/2169)) ([f813058](https://github.com/dynamic-labs/DynamicAuth/commit/f8130585c82c7ae73d1e32e107f67ec86b4edb89))
6573
- * **DYN-2402:** coinbase issues after disconnecting ([#2149](https://github.com/dynamic-labs/DynamicAuth/issues/2149)) ([91d49fb](https://github.com/dynamic-labs/DynamicAuth/commit/91d49fb7f8c6fca3ab03098f3fba53d277c836ad))
6574
- * handle user reconnecting with wrong social account ([#2157](https://github.com/dynamic-labs/DynamicAuth/issues/2157)) ([4f7c6df](https://github.com/dynamic-labs/DynamicAuth/commit/4f7c6dff7df9a7966a644bf2510cb3825b2c6408))
6575
- * **social:** handle reconnect ([#2131](https://github.com/dynamic-labs/DynamicAuth/issues/2131)) ([2b3e5fb](https://github.com/dynamic-labs/DynamicAuth/commit/2b3e5fbb72bb7dafee3bd0bbfa73fae444055410))
6576
-
6577
- ## [0.17.0-RC.18](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.17...v0.17.0-RC.18) (2023-05-19)
6578
-
6579
-
6580
- ### Features
6581
-
6582
- * add getReferencedAccount ([#2141](https://github.com/dynamic-labs/DynamicAuth/issues/2141)) ([ac170a6](https://github.com/dynamic-labs/DynamicAuth/commit/ac170a6dfac25ff9911feb390495974aa5dbede6))
6583
- * add reconnectSocialWallet ([#2142](https://github.com/dynamic-labs/DynamicAuth/issues/2142)) ([fefd759](https://github.com/dynamic-labs/DynamicAuth/commit/fefd759b816b286dd8a7673cf6c839fee59768ac))
6584
- * **DYN-2220:** add Transaction Successfully Sent view ([#2134](https://github.com/dynamic-labs/DynamicAuth/issues/2134)) ([7db96ad](https://github.com/dynamic-labs/DynamicAuth/commit/7db96adcd3b84aef29fbabe40a1e048ea629d2bb))
6585
- * **MagicSocialWalletConnector:** store public address from redirect result in local storage ([#2139](https://github.com/dynamic-labs/DynamicAuth/issues/2139)) ([90b60e4](https://github.com/dynamic-labs/DynamicAuth/commit/90b60e485a53ff29a0e52ef27a58383771490974))
6586
-
6587
-
6588
- ### Bug Fixes
6589
-
6590
- * issue when linking from detect_new_wallet ([#2148](https://github.com/dynamic-labs/DynamicAuth/issues/2148)) ([98feb7b](https://github.com/dynamic-labs/DynamicAuth/commit/98feb7bde081a8107577ac7ec70d0f9c4b611a2b))
6591
- * multi-wallet flows ([#2150](https://github.com/dynamic-labs/DynamicAuth/issues/2150)) ([c82ef4a](https://github.com/dynamic-labs/DynamicAuth/commit/c82ef4a5cc75c9f8edb30620e32dd64bbdb0eb7f))
6592
- * starknet getConnectedAccounts should return an empty array if there's no address to return ([#2140](https://github.com/dynamic-labs/DynamicAuth/issues/2140)) ([ce39641](https://github.com/dynamic-labs/DynamicAuth/commit/ce39641a6dbec1d05d8d5cc611a02de8bd756351))
6593
-
6594
- ## [0.17.0-RC.17](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.16...v0.17.0-RC.17) (2023-05-17)
6595
-
6596
-
6597
- ### Features
6598
-
6599
- * distinguish walletconnect deeplink types ([#2093](https://github.com/dynamic-labs/DynamicAuth/issues/2093)) ([dcd29f7](https://github.com/dynamic-labs/DynamicAuth/commit/dcd29f7cfc5e6481aaaae502b3fc4e4d225f1fc1))
6600
- * **social:** pass did token to verify request ([#2124](https://github.com/dynamic-labs/DynamicAuth/issues/2124)) ([60d73a5](https://github.com/dynamic-labs/DynamicAuth/commit/60d73a5f432d488979f33fe29666d1afa8fc0e8e))
6601
- * support optional priority and stalltimeout for customer provided rpc urls ([#2091](https://github.com/dynamic-labs/DynamicAuth/issues/2091)) ([eebacda](https://github.com/dynamic-labs/DynamicAuth/commit/eebacda6a9d6ba583eff4e4e5a38eb9945c4825e))
6602
-
6603
-
6604
- ### Bug Fixes
6605
-
6606
- * add and remove event listeners for Solflare ([#2127](https://github.com/dynamic-labs/DynamicAuth/issues/2127)) ([978c7ba](https://github.com/dynamic-labs/DynamicAuth/commit/978c7ba0e3745e26d9dfc9b7c46a24adc913f02f))
6607
- * get publicKey from provider if no address and publicKey are returned on connect ([#2126](https://github.com/dynamic-labs/DynamicAuth/issues/2126)) ([c9c9b2a](https://github.com/dynamic-labs/DynamicAuth/commit/c9c9b2af81f660aa651fc4b0e01cd3c823bb0229))
6608
- * remove detect known secondary wallet modal ([#2117](https://github.com/dynamic-labs/DynamicAuth/issues/2117)) ([0e8bbd8](https://github.com/dynamic-labs/DynamicAuth/commit/0e8bbd8c385fe528a7af3ccc037812df9d6e0c84))
6609
- * revert changes for select wallet to work with solflare ([#2120](https://github.com/dynamic-labs/DynamicAuth/issues/2120)) ([76cf228](https://github.com/dynamic-labs/DynamicAuth/commit/76cf228c495d6592da4c88b8a0d5a5fc480861ae))
6610
- * setIsVerifying to false when selecting a connector ([#2133](https://github.com/dynamic-labs/DynamicAuth/issues/2133)) ([8ddeba3](https://github.com/dynamic-labs/DynamicAuth/commit/8ddeba377f35dfb4a104cd6bd7ee6315d574710f))
6611
- * setPrimaryWallet and useSyncPrimaryWallet updates ([#2128](https://github.com/dynamic-labs/DynamicAuth/issues/2128)) ([fb47b17](https://github.com/dynamic-labs/DynamicAuth/commit/fb47b17ddc7f41c29f140a1a85a1e47dbf017fff))
6612
- * update text color and add close button on extension not installed prompt ([#2122](https://github.com/dynamic-labs/DynamicAuth/issues/2122)) ([b4848a0](https://github.com/dynamic-labs/DynamicAuth/commit/b4848a0a8094b4ceac67e2667d277a9aa5e2e137))
6613
-
6614
- ## [0.17.0-RC.16](https://github.com/dynamic-labs/Dyna
6479
+ * **wcv2:** upgrade universal p
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.88.1";
6
+ var version = "4.88.3";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.1015",
9
9
  "@dynamic-labs-sdk/client": "1.7.0",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "4.88.1";
2
+ var version = "4.88.3";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.1015",
5
5
  "@dynamic-labs-sdk/client": "1.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.88.1",
3
+ "version": "4.88.3",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.1015",
6
6
  "@dynamic-labs-sdk/client": "1.7.0",
@@ -17,17 +17,17 @@
17
17
  "yup": "0.32.11",
18
18
  "react-international-phone": "4.5.0",
19
19
  "bs58": "5.0.0",
20
- "@dynamic-labs/assert-package-version": "4.88.1",
21
- "@dynamic-labs/iconic": "4.88.1",
22
- "@dynamic-labs/locale": "4.88.1",
23
- "@dynamic-labs/logger": "4.88.1",
24
- "@dynamic-labs/multi-wallet": "4.88.1",
25
- "@dynamic-labs/rpc-providers": "4.88.1",
26
- "@dynamic-labs/store": "4.88.1",
27
- "@dynamic-labs/types": "4.88.1",
28
- "@dynamic-labs/utils": "4.88.1",
29
- "@dynamic-labs/wallet-book": "4.88.1",
30
- "@dynamic-labs/wallet-connector-core": "4.88.1",
20
+ "@dynamic-labs/assert-package-version": "4.88.3",
21
+ "@dynamic-labs/iconic": "4.88.3",
22
+ "@dynamic-labs/locale": "4.88.3",
23
+ "@dynamic-labs/logger": "4.88.3",
24
+ "@dynamic-labs/multi-wallet": "4.88.3",
25
+ "@dynamic-labs/rpc-providers": "4.88.3",
26
+ "@dynamic-labs/store": "4.88.3",
27
+ "@dynamic-labs/types": "4.88.3",
28
+ "@dynamic-labs/utils": "4.88.3",
29
+ "@dynamic-labs/wallet-book": "4.88.3",
30
+ "@dynamic-labs/wallet-connector-core": "4.88.3",
31
31
  "eventemitter3": "5.0.1"
32
32
  },
33
33
  "devDependencies": {
@@ -9,6 +9,7 @@ var multiWallet = require('@dynamic-labs/multi-wallet');
9
9
  var rpcProviders = require('@dynamic-labs/rpc-providers');
10
10
  var walletBook = require('@dynamic-labs/wallet-book');
11
11
  var useWalletItemActions = require('../../utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
12
+ var useReconcileInstalledWallets = require('../../utils/hooks/useReconcileInstalledWallets/useReconcileInstalledWallets.cjs');
12
13
  require('@dynamic-labs/iconic');
13
14
  require('react/jsx-runtime');
14
15
  require('../../context/ViewContext/ViewContext.cjs');
@@ -33,6 +34,11 @@ const WalletConnectorEvents = ({ connectorProps, }) => {
33
34
  const injectedDebounceTimeoutRef = React.useRef();
34
35
  const pendingReadyConnectorsRef = React.useRef([]);
35
36
  const readyDebounceTimeoutRef = React.useRef();
37
+ // Re-check installed state for a short window after the wallet list is built,
38
+ // so a wallet whose provider injected just after the initial snapshot (common
39
+ // on typed/address-bar navigations) is upgraded to "installed" without a
40
+ // refresh (DYNT-1074).
41
+ useReconcileInstalledWallets.useReconcileInstalledWallets(walletBook.isWalletBookPopulated(connectorProps.walletBook));
36
42
  // need to add the timeout to ensure the setConnectorInitializing call is
37
43
  // not made in the same tick to avoid a bad setState call error from React
38
44
  const waitAndSetState = (func) => {
@@ -5,6 +5,7 @@ import { getWalletConnectorConstructorOptions } from '@dynamic-labs/multi-wallet
5
5
  import { ChainRpcProviders } from '@dynamic-labs/rpc-providers';
6
6
  import { isWalletBookPopulated } from '@dynamic-labs/wallet-book';
7
7
  import { useWalletItemActions } from '../../utils/hooks/useWalletItemActions/useWalletItemActions.js';
8
+ import { useReconcileInstalledWallets } from '../../utils/hooks/useReconcileInstalledWallets/useReconcileInstalledWallets.js';
8
9
  import '@dynamic-labs/iconic';
9
10
  import 'react/jsx-runtime';
10
11
  import '../../context/ViewContext/ViewContext.js';
@@ -29,6 +30,11 @@ const WalletConnectorEvents = ({ connectorProps, }) => {
29
30
  const injectedDebounceTimeoutRef = useRef();
30
31
  const pendingReadyConnectorsRef = useRef([]);
31
32
  const readyDebounceTimeoutRef = useRef();
33
+ // Re-check installed state for a short window after the wallet list is built,
34
+ // so a wallet whose provider injected just after the initial snapshot (common
35
+ // on typed/address-bar navigations) is upgraded to "installed" without a
36
+ // refresh (DYNT-1074).
37
+ useReconcileInstalledWallets(isWalletBookPopulated(connectorProps.walletBook));
32
38
  // need to add the timeout to ensure the setConnectorInitializing call is
33
39
  // not made in the same tick to avoid a bad setState call error from React
34
40
  const waitAndSetState = (func) => {
@@ -89,8 +89,10 @@ require('../../utils/hooks/useWalletBackup/types.cjs');
89
89
  require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
90
90
  require('../IpConfigurationContext/IpConfigurationContext.cjs');
91
91
  var ConnectWithOtpContext = require('./ConnectWithOtpContext.cjs');
92
+ var useRestoreOtpVerificationState = require('./hooks/useRestoreOtpVerificationState/useRestoreOtpVerificationState.cjs');
92
93
  var createEmailHandler = require('./utils/createEmailHandler.cjs');
93
94
  var createSmsHandler = require('./utils/createSmsHandler.cjs');
95
+ var otpVerificationStorage = require('./utils/otpVerificationStorage/otpVerificationStorage.cjs');
94
96
  require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
95
97
  require('@hcaptcha/react-hcaptcha');
96
98
  require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
@@ -126,6 +128,11 @@ const ConnectWithOtpProvider = ({ children }) => {
126
128
  projectSettings,
127
129
  });
128
130
  const lastVerificationHandlerRef = React.useRef(null);
131
+ useRestoreOtpVerificationState.useRestoreOtpVerificationState({
132
+ embeddedWalletSessionKeys,
133
+ environmentId,
134
+ handlerRef: lastVerificationHandlerRef,
135
+ });
129
136
  const providers = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) || [];
130
137
  const mapProvider = {
131
138
  [sdkApiCore.ProviderEnum.Dynamic]: {
@@ -187,6 +194,7 @@ const ConnectWithOtpProvider = ({ children }) => {
187
194
  //EMAIL
188
195
  dynamicEvents.dynamicEvents.emit('emailVerificationResult', verified, destination);
189
196
  }
197
+ otpVerificationStorage.clearOtpVerificationState();
190
198
  // Avoid calling authSuccess if we're only verifying
191
199
  if (!(options === null || options === void 0 ? void 0 : options.skipSetUserAndAuthToken)) {
192
200
  setCallback('authSuccess');
@@ -85,8 +85,10 @@ import '../../utils/hooks/useWalletBackup/types.js';
85
85
  import '../../utils/hooks/useWalletBackup/cloudProviders.js';
86
86
  import '../IpConfigurationContext/IpConfigurationContext.js';
87
87
  import { ConnectWithOtpContext } from './ConnectWithOtpContext.js';
88
+ import { useRestoreOtpVerificationState } from './hooks/useRestoreOtpVerificationState/useRestoreOtpVerificationState.js';
88
89
  import { createEmailHandler } from './utils/createEmailHandler.js';
89
90
  import { createSmsHandler } from './utils/createSmsHandler.js';
91
+ import { clearOtpVerificationState } from './utils/otpVerificationStorage/otpVerificationStorage.js';
90
92
  import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
91
93
  import '@hcaptcha/react-hcaptcha';
92
94
  import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
@@ -122,6 +124,11 @@ const ConnectWithOtpProvider = ({ children }) => {
122
124
  projectSettings,
123
125
  });
124
126
  const lastVerificationHandlerRef = useRef(null);
127
+ useRestoreOtpVerificationState({
128
+ embeddedWalletSessionKeys,
129
+ environmentId,
130
+ handlerRef: lastVerificationHandlerRef,
131
+ });
125
132
  const providers = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) || [];
126
133
  const mapProvider = {
127
134
  [ProviderEnum.Dynamic]: {
@@ -183,6 +190,7 @@ const ConnectWithOtpProvider = ({ children }) => {
183
190
  //EMAIL
184
191
  dynamicEvents.emit('emailVerificationResult', verified, destination);
185
192
  }
193
+ clearOtpVerificationState();
186
194
  // Avoid calling authSuccess if we're only verifying
187
195
  if (!(options === null || options === void 0 ? void 0 : options.skipSetUserAndAuthToken)) {
188
196
  setCallback('authSuccess');
@@ -0,0 +1 @@
1
+ export { useRestoreOtpVerificationState } from './useRestoreOtpVerificationState';
@@ -0,0 +1,48 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var React = require('react');
7
+ var buildEmailOtpHandler = require('../../utils/buildEmailOtpHandler/buildEmailOtpHandler.cjs');
8
+ var buildSmsOtpHandler = require('../../utils/buildSmsOtpHandler/buildSmsOtpHandler.cjs');
9
+ var otpVerificationStorage = require('../../utils/otpVerificationStorage/otpVerificationStorage.cjs');
10
+
11
+ /**
12
+ * Restores a persisted OTP verification handler from localStorage on mount.
13
+ * This handles the case where the webview was killed by Android on low-memory
14
+ * devices and needs to resume an in-progress OTP flow.
15
+ */
16
+ const useRestoreOtpVerificationState = ({ embeddedWalletSessionKeys, environmentId, handlerRef, }) => {
17
+ React.useEffect(() => {
18
+ if (handlerRef.current) {
19
+ return;
20
+ }
21
+ const persisted = otpVerificationStorage.restoreOtpVerificationState();
22
+ if (!persisted) {
23
+ return;
24
+ }
25
+ if (persisted.type === 'email') {
26
+ handlerRef.current = buildEmailOtpHandler.buildEmailOtpHandler({
27
+ captchaToken: persisted.captchaToken,
28
+ email: persisted.destination,
29
+ embeddedWalletSessionKeys,
30
+ environmentId,
31
+ initialVerificationUUID: persisted.verificationUUID,
32
+ });
33
+ }
34
+ else {
35
+ handlerRef.current = buildSmsOtpHandler.buildSmsOtpHandler({
36
+ captchaToken: persisted.captchaToken,
37
+ embeddedWalletSessionKeys,
38
+ environmentId,
39
+ phone: persisted.destination,
40
+ verificationUUID: persisted.verificationUUID,
41
+ });
42
+ }
43
+ // Only needs to run once on mount
44
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45
+ }, []);
46
+ };
47
+
48
+ exports.useRestoreOtpVerificationState = useRestoreOtpVerificationState;
@@ -0,0 +1,16 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { PhoneData } from '@dynamic-labs/types';
3
+ import { useEmbeddedWalletSessionKeys } from '../../../../utils/hooks';
4
+ import { ProviderVerificationHandler } from '../../types';
5
+ type UseRestoreOtpVerificationStateParams = {
6
+ embeddedWalletSessionKeys: ReturnType<typeof useEmbeddedWalletSessionKeys>;
7
+ environmentId: string;
8
+ handlerRef: MutableRefObject<ProviderVerificationHandler<string | PhoneData> | null>;
9
+ };
10
+ /**
11
+ * Restores a persisted OTP verification handler from localStorage on mount.
12
+ * This handles the case where the webview was killed by Android on low-memory
13
+ * devices and needs to resume an in-progress OTP flow.
14
+ */
15
+ export declare const useRestoreOtpVerificationState: ({ embeddedWalletSessionKeys, environmentId, handlerRef, }: UseRestoreOtpVerificationStateParams) => void;
16
+ export {};
@@ -0,0 +1,44 @@
1
+ 'use client'
2
+ import { useEffect } from 'react';
3
+ import { buildEmailOtpHandler } from '../../utils/buildEmailOtpHandler/buildEmailOtpHandler.js';
4
+ import { buildSmsOtpHandler } from '../../utils/buildSmsOtpHandler/buildSmsOtpHandler.js';
5
+ import { restoreOtpVerificationState } from '../../utils/otpVerificationStorage/otpVerificationStorage.js';
6
+
7
+ /**
8
+ * Restores a persisted OTP verification handler from localStorage on mount.
9
+ * This handles the case where the webview was killed by Android on low-memory
10
+ * devices and needs to resume an in-progress OTP flow.
11
+ */
12
+ const useRestoreOtpVerificationState = ({ embeddedWalletSessionKeys, environmentId, handlerRef, }) => {
13
+ useEffect(() => {
14
+ if (handlerRef.current) {
15
+ return;
16
+ }
17
+ const persisted = restoreOtpVerificationState();
18
+ if (!persisted) {
19
+ return;
20
+ }
21
+ if (persisted.type === 'email') {
22
+ handlerRef.current = buildEmailOtpHandler({
23
+ captchaToken: persisted.captchaToken,
24
+ email: persisted.destination,
25
+ embeddedWalletSessionKeys,
26
+ environmentId,
27
+ initialVerificationUUID: persisted.verificationUUID,
28
+ });
29
+ }
30
+ else {
31
+ handlerRef.current = buildSmsOtpHandler({
32
+ captchaToken: persisted.captchaToken,
33
+ embeddedWalletSessionKeys,
34
+ environmentId,
35
+ phone: persisted.destination,
36
+ verificationUUID: persisted.verificationUUID,
37
+ });
38
+ }
39
+ // Only needs to run once on mount
40
+ // eslint-disable-next-line react-hooks/exhaustive-deps
41
+ }, []);
42
+ };
43
+
44
+ export { useRestoreOtpVerificationState };
@@ -0,0 +1,88 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../../../../../_virtual/_tslib.cjs');
7
+ require('@dynamic-labs-sdk/client/core');
8
+ require('@dynamic-labs/sdk-api-core');
9
+ require('react');
10
+ require('eventemitter3');
11
+ require('@dynamic-labs/utils');
12
+ require('@dynamic-labs-sdk/client');
13
+ require('../../../../config/ApiEndpoint.cjs');
14
+ require('@dynamic-labs/iconic');
15
+ require('@dynamic-labs/wallet-connector-core');
16
+ require('react/jsx-runtime');
17
+ require('../../../ViewContext/ViewContext.cjs');
18
+ require('../../../../shared/logger.cjs');
19
+ require('@dynamic-labs/wallet-book');
20
+ require('../../../../utils/constants/colors.cjs');
21
+ require('../../../../utils/constants/values.cjs');
22
+ require('../../../../shared/consts/index.cjs');
23
+ require('@dynamic-labs/multi-wallet');
24
+ require('react-international-phone');
25
+ require('../../../../store/state/nonce/nonce.cjs');
26
+ var email = require('../../../../data/api/email/email.cjs');
27
+ require('@dynamic-labs/locale');
28
+ require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
29
+ require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
30
+ require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
31
+ require('../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
32
+ require('../../../../events/dynamicEvents.cjs');
33
+ var storeTokenAndUser = require('../../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
34
+ var generateSessionKeys = require('../../../../client/extension/functions/generateSessionKeys/generateSessionKeys.cjs');
35
+ var otpVerificationStorage = require('../otpVerificationStorage/otpVerificationStorage.cjs');
36
+
37
+ /**
38
+ * Builds a ProviderVerificationHandler for email OTP from the given parameters.
39
+ * Used both after creating a new email verification and when restoring a
40
+ * persisted verification state after a webview remount.
41
+ */
42
+ const buildEmailOtpHandler = ({ captchaToken, email: email$1, embeddedWalletSessionKeys: { shouldRegisterSessionKeysOnSignin, generateSessionKey, }, environmentId, initialVerificationUUID, }) => {
43
+ // Mutable so retry can update the UUID for subsequent verify calls
44
+ let verificationUUID = initialVerificationUUID;
45
+ return {
46
+ retry: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
47
+ const retryEmailVerificationResponse = yield email.retryEmailVerification({
48
+ email: email$1,
49
+ environmentId,
50
+ verificationUUID,
51
+ });
52
+ // eslint-disable-next-line prefer-destructuring
53
+ verificationUUID = retryEmailVerificationResponse.verificationUUID;
54
+ otpVerificationStorage.persistOtpVerificationState({
55
+ captchaToken,
56
+ destination: email$1,
57
+ type: 'email',
58
+ verificationUUID,
59
+ });
60
+ }),
61
+ type: 'email',
62
+ verify: (oneTimePassword, options) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
63
+ let sessionPublicKey = undefined;
64
+ if (shouldRegisterSessionKeysOnSignin()) {
65
+ const keypair = yield generateSessionKey();
66
+ sessionPublicKey = keypair.publicKey;
67
+ }
68
+ yield generateSessionKeys.generateSessionKeys();
69
+ const response = yield email.signInWithEmailVerification({
70
+ captchaToken,
71
+ environmentId,
72
+ sessionPublicKey,
73
+ verificationToken: oneTimePassword,
74
+ verificationUUID,
75
+ });
76
+ if (!(options === null || options === void 0 ? void 0 : options.skipSetUserAndAuthToken)) {
77
+ storeTokenAndUser.storeTokenAndUser(response);
78
+ }
79
+ return {
80
+ destination: email$1,
81
+ response: response,
82
+ verified: true,
83
+ };
84
+ }),
85
+ };
86
+ };
87
+
88
+ exports.buildEmailOtpHandler = buildEmailOtpHandler;
@@ -0,0 +1,16 @@
1
+ import { useEmbeddedWalletSessionKeys } from '../../../../utils/hooks';
2
+ import { ProviderVerificationHandler } from '../../types';
3
+ type BuildEmailOtpHandlerParams = {
4
+ captchaToken: string | undefined;
5
+ email: string;
6
+ embeddedWalletSessionKeys: ReturnType<typeof useEmbeddedWalletSessionKeys>;
7
+ environmentId: string;
8
+ initialVerificationUUID: string;
9
+ };
10
+ /**
11
+ * Builds a ProviderVerificationHandler for email OTP from the given parameters.
12
+ * Used both after creating a new email verification and when restoring a
13
+ * persisted verification state after a webview remount.
14
+ */
15
+ export declare const buildEmailOtpHandler: ({ captchaToken, email, embeddedWalletSessionKeys: { shouldRegisterSessionKeysOnSignin, generateSessionKey, }, environmentId, initialVerificationUUID, }: BuildEmailOtpHandlerParams) => ProviderVerificationHandler<string>;
16
+ export {};