@dynamic-labs/solana 4.88.0 → 4.88.2

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,20 @@
1
1
 
2
+ ### [4.88.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.1...v4.88.2) (2026-06-06)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **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))
8
+ * 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))
9
+ * **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))
10
+
11
+ ### [4.88.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.0...v4.88.1) (2026-06-04)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **solana:** poll wallet-standard registry to catch late-injecting wallets ([#11464](https://github.com/dynamic-labs/dynamic-auth/issues/11464)) ([afa8ae7](https://github.com/dynamic-labs/dynamic-auth/commit/afa8ae785d7be58775addc4bb2db3dc1b5500f87))
17
+
2
18
  ## [4.88.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.87.2...v4.88.0) (2026-06-04)
3
19
 
4
20
 
@@ -6452,156 +6468,4 @@ Enjoy!
6452
6468
  ### Bug Fixes
6453
6469
 
6454
6470
  * **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))
6455
- * **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))
6456
-
6457
- ## [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)
6458
-
6459
-
6460
- ### Bug Fixes
6461
-
6462
- * de-duplicate authSuccess call ([#2269](https://github.com/dynamic-labs/DynamicAuth/issues/2269)) ([00268d0](https://github.com/dynamic-labs/DynamicAuth/commit/00268d001355946c98d285d71d7f7acc96d4c9f7))
6463
- * 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))
6464
-
6465
- ## [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)
6466
-
6467
-
6468
- ### Features
6469
-
6470
- * lower username minimum length requirement ([#2265](https://github.com/dynamic-labs/DynamicAuth/issues/2265)) ([ed891ca](https://github.com/dynamic-labs/DynamicAuth/commit/ed891cac8cceaf9e0556b679eda7a3575725805d))
6471
-
6472
-
6473
- ### Bug Fixes
6474
-
6475
- * **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))
6476
- * shrink dynamic widget in smaller containers ([#2260](https://github.com/dynamic-labs/DynamicAuth/issues/2260)) ([353f447](https://github.com/dynamic-labs/DynamicAuth/commit/353f44724db83e9f1500c606fdea7d50a8067711))
6477
-
6478
- ## [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)
6479
-
6480
-
6481
- ### Features
6482
-
6483
- * 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))
6484
-
6485
-
6486
- ### Bug Fixes
6487
-
6488
- * include username in userFieldsSchema ([#2257](https://github.com/dynamic-labs/DynamicAuth/issues/2257)) ([6e5431d](https://github.com/dynamic-labs/DynamicAuth/commit/6e5431d08323d718b11accf3790ef56fc7325b5c))
6489
-
6490
- ## [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)
6491
-
6492
-
6493
- ### Features
6494
-
6495
- * disable button on social unlink ([#2234](https://github.com/dynamic-labs/DynamicAuth/issues/2234)) ([7f148de](https://github.com/dynamic-labs/DynamicAuth/commit/7f148de76b0fca632e1b4d6ff71c18eb0207c02b))
6496
- * 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))
6497
-
6498
-
6499
- ### Bug Fixes
6500
-
6501
- * **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))
6502
- * wrong logger instance in UserProfileSocialAccount ([#2248](https://github.com/dynamic-labs/DynamicAuth/issues/2248)) ([814108d](https://github.com/dynamic-labs/DynamicAuth/commit/814108d416d9d730bed8976956bc7974c7fde2a8))
6503
-
6504
- ## [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)
6505
-
6506
-
6507
- ### Bug Fixes
6508
-
6509
- * **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))
6510
- * 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))
6511
- * 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)
6512
- * 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))
6513
- * 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))
6514
- * **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))
6515
-
6516
- ## [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)
6517
-
6518
- ## [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)
6519
-
6520
-
6521
- ### Bug Fixes
6522
-
6523
- * flow connection status improvements ([#2212](https://github.com/dynamic-labs/DynamicAuth/issues/2212)) ([5225e9f](https://github.com/dynamic-labs/DynamicAuth/commit/5225e9f3f19705cdde3c1d860ddf4e69689a839b))
6524
- * **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)
6525
-
6526
- ## [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)
6527
-
6528
-
6529
- ### Features
6530
-
6531
- * social copy update ([#2215](https://github.com/dynamic-labs/DynamicAuth/issues/2215)) ([1fe7316](https://github.com/dynamic-labs/DynamicAuth/commit/1fe7316a94284db7227d5ab09026354269559752))
6532
-
6533
- ## [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)
6534
-
6535
-
6536
- ### Bug Fixes
6537
-
6538
- * 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))
6539
-
6540
- ## [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)
6541
-
6542
-
6543
- ### Features
6544
-
6545
- * 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))
6546
- * **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))
6547
- * **DynamicWidget:** add send balance button ([#2183](https://github.com/dynamic-labs/DynamicAuth/issues/2183)) ([d76355e](https://github.com/dynamic-labs/DynamicAuth/commit/d76355e1f9c3a7b05cbb5b7b3144dad379586689))
6548
- * handle magic redirect error ([#2203](https://github.com/dynamic-labs/DynamicAuth/issues/2203)) ([9a088c6](https://github.com/dynamic-labs/DynamicAuth/commit/9a088c6aad2eb2c1045f544a784083d2732df440))
6549
- * **SendBalanceModal:** adds openSendBalanceModal in dynamic context ([#2159](https://github.com/dynamic-labs/DynamicAuth/issues/2159)) ([f89b21b](https://github.com/dynamic-labs/DynamicAuth/commit/f89b21bfcd65bb61ef33b17b460140404574b235))
6550
- * social error handling improvements ([#2146](https://github.com/dynamic-labs/DynamicAuth/issues/2146)) ([a64a26a](https://github.com/dynamic-labs/DynamicAuth/commit/a64a26aa42c228654cb135cd6c4778e8bd2bd0e6))
6551
-
6552
-
6553
- ### Bug Fixes
6554
-
6555
- * amendments to user profile ([#2201](https://github.com/dynamic-labs/DynamicAuth/issues/2201)) ([5d12c17](https://github.com/dynamic-labs/DynamicAuth/commit/5d12c1716cdcd8d843ef3ff941e163bad28573b1))
6556
- * **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))
6557
- * 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))
6558
-
6559
- ## [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)
6560
-
6561
-
6562
- ### Features
6563
-
6564
- * add SocialWrongAccountView ([#2153](https://github.com/dynamic-labs/DynamicAuth/issues/2153)) ([531a29d](https://github.com/dynamic-labs/DynamicAuth/commit/531a29d7d87739d974ecc35c57ef0d333a5e7451))
6565
- * 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))
6566
- * **DYN-2402:** coinbase issues after disconnecting ([#2149](https://github.com/dynamic-labs/DynamicAuth/issues/2149)) ([91d49fb](https://github.com/dynamic-labs/DynamicAuth/commit/91d49fb7f8c6fca3ab03098f3fba53d277c836ad))
6567
- * 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))
6568
- * **social:** handle reconnect ([#2131](https://github.com/dynamic-labs/DynamicAuth/issues/2131)) ([2b3e5fb](https://github.com/dynamic-labs/DynamicAuth/commit/2b3e5fbb72bb7dafee3bd0bbfa73fae444055410))
6569
-
6570
- ## [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)
6571
-
6572
-
6573
- ### Features
6574
-
6575
- * add getReferencedAccount ([#2141](https://github.com/dynamic-labs/DynamicAuth/issues/2141)) ([ac170a6](https://github.com/dynamic-labs/DynamicAuth/commit/ac170a6dfac25ff9911feb390495974aa5dbede6))
6576
- * add reconnectSocialWallet ([#2142](https://github.com/dynamic-labs/DynamicAuth/issues/2142)) ([fefd759](https://github.com/dynamic-labs/DynamicAuth/commit/fefd759b816b286dd8a7673cf6c839fee59768ac))
6577
- * **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))
6578
- * **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))
6579
-
6580
-
6581
- ### Bug Fixes
6582
-
6583
- * 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))
6584
- * multi-wallet flows ([#2150](https://github.com/dynamic-labs/DynamicAuth/issues/2150)) ([c82ef4a](https://github.com/dynamic-labs/DynamicAuth/commit/c82ef4a5cc75c9f8edb30620e32dd64bbdb0eb7f))
6585
- * 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))
6586
-
6587
- ## [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)
6588
-
6589
-
6590
- ### Features
6591
-
6592
- * distinguish walletconnect deeplink types ([#2093](https://github.com/dynamic-labs/DynamicAuth/issues/2093)) ([dcd29f7](https://github.com/dynamic-labs/DynamicAuth/commit/dcd29f7cfc5e6481aaaae502b3fc4e4d225f1fc1))
6593
- * **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))
6594
- * 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))
6595
-
6596
-
6597
- ### Bug Fixes
6598
-
6599
- * 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))
6600
- * 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))
6601
- * remove detect known secondary wallet modal ([#2117](https://github.com/dynamic-labs/DynamicAuth/issues/2117)) ([0e8bbd8](https://github.com/dynamic-labs/DynamicAuth/commit/0e8bbd8c385fe528a7af3ccc037812df9d6e0c84))
6602
- * 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))
6603
- * 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))
6604
- * setPrimaryWallet and useSyncPrimaryWallet updates ([#2128](https://github.com/dynamic-labs/DynamicAuth/issues/2128)) ([fb47b17](https://github.com/dynamic-labs/DynamicAuth/commit/fb47b17ddc7f41c29f140a1a85a1e47dbf017fff))
6605
- * 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))
6606
-
6607
- ## [0.17.0-RC.16](https://github.com/dynamic-labs/Dyna
6471
+ * **wcv2:** upgrade universal p
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.88.0";
6
+ var version = "4.88.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.88.0";
2
+ var version = "4.88.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana",
3
- "version": "4.88.0",
3
+ "version": "4.88.2",
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",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/wallet-connect": "4.88.0",
21
+ "@dynamic-labs/wallet-connect": "4.88.2",
22
22
  "@dynamic-labs-connectors/metamask-solana": "4.6.7",
23
23
  "@solana/web3.js": "1.98.1",
24
24
  "@wallet-standard/app": "1.0.1",
@@ -30,17 +30,17 @@
30
30
  "@walletconnect/sign-client": "2.21.5",
31
31
  "@walletconnect/utils": "2.21.5",
32
32
  "@walletconnect/types": "2.21.5",
33
- "@dynamic-labs/assert-package-version": "4.88.0",
34
- "@dynamic-labs/embedded-wallet-solana": "4.88.0",
35
- "@dynamic-labs/logger": "4.88.0",
36
- "@dynamic-labs/rpc-providers": "4.88.0",
33
+ "@dynamic-labs/assert-package-version": "4.88.2",
34
+ "@dynamic-labs/embedded-wallet-solana": "4.88.2",
35
+ "@dynamic-labs/logger": "4.88.2",
36
+ "@dynamic-labs/rpc-providers": "4.88.2",
37
37
  "@dynamic-labs/sdk-api-core": "0.0.1015",
38
- "@dynamic-labs/solana-core": "4.88.0",
39
- "@dynamic-labs/types": "4.88.0",
40
- "@dynamic-labs/utils": "4.88.0",
41
- "@dynamic-labs/waas-svm": "4.88.0",
42
- "@dynamic-labs/wallet-book": "4.88.0",
43
- "@dynamic-labs/wallet-connector-core": "4.88.0",
38
+ "@dynamic-labs/solana-core": "4.88.2",
39
+ "@dynamic-labs/types": "4.88.2",
40
+ "@dynamic-labs/utils": "4.88.2",
41
+ "@dynamic-labs/waas-svm": "4.88.2",
42
+ "@dynamic-labs/wallet-book": "4.88.2",
43
+ "@dynamic-labs/wallet-connector-core": "4.88.2",
44
44
  "eventemitter3": "5.0.1"
45
45
  },
46
46
  "peerDependencies": {}
@@ -15,7 +15,17 @@ var getConnectorConstructorForWalletStandardWallet = require('./walletStandard/g
15
15
  var getWalletStandardWallets = require('./walletStandard/getWalletStandardWallets/getWalletStandardWallets.cjs');
16
16
  var hasAllWalletStandardRequiredFeatures = require('./walletStandard/hasAllWalletStandardRequiredFeatures/hasAllWalletStandardRequiredFeatures.cjs');
17
17
 
18
- let removeSolanaWalletStandardListener = null;
18
+ /**
19
+ * Teardown for the active wallet-standard discovery (register listener + poll).
20
+ * Recreated on each fetchInjectedWalletConnectors call.
21
+ */
22
+ let teardownSolanaWalletStandardDiscovery = null;
23
+ // Some extensions (e.g. Backpack/Eden/Solflare racing over the page) inject
24
+ // after the initial snapshot, and a one-shot register listener can miss an
25
+ // announcement that fires before we subscribe. Polling the wallet-standard
26
+ // registry for a short window catches those late arrivals without a refresh.
27
+ const SOLANA_WALLET_STANDARD_POLL_INTERVAL_MS = 300;
28
+ const SOLANA_WALLET_STANDARD_POLL_DURATION_MS = 5000;
19
29
  const injectedWalletOverrides = [
20
30
  CoinbaseSolana.CoinbaseSolana,
21
31
  BackpackSol.BackpackSol,
@@ -55,38 +65,69 @@ const shouldAddWalletStandardConnector = (wallet, walletBook, authMode) => {
55
65
  });
56
66
  return !shouldHandleFromWalletBook && hasAllFeatures;
57
67
  };
58
- const addSolanaWalletStandardListener = (walletBook$1, authMode) => {
68
+ const emitWalletStandardConnector = (wallet, walletBook$1) => {
69
+ var _a, _b;
70
+ logger.logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Emitting providerInjected for wallet-standard wallet', wallet.name);
71
+ const walletBookWallet = walletBook.findWalletBookWalletByNameAndChain(walletBook$1, wallet.name, 'sol');
72
+ const walletKey = walletBookWallet
73
+ ? (_b = Object.entries((_a = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
74
+ : undefined;
75
+ const walletBookMetadata = walletBookWallet &&
76
+ walletConnectorCore.getWalletMetadataFromWalletBook({
77
+ walletBook: walletBook$1,
78
+ walletBookWallet,
79
+ walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${utils.sanitizeName(wallet.name)}sol`,
80
+ });
81
+ const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
82
+ walletConnectorCore.walletConnectorEvents.emit('providerInjected', {
83
+ injectedConnectorConstructor,
84
+ });
85
+ };
86
+ const setupSolanaWalletStandardDiscovery = (walletBook, authMode) => {
59
87
  // check to ensure this method doesn't run with SSR
60
88
  if (typeof window === 'undefined') {
61
89
  return;
62
90
  }
63
- removeSolanaWalletStandardListener === null || removeSolanaWalletStandardListener === void 0 ? void 0 : removeSolanaWalletStandardListener();
64
- const { on } = getWalletStandardWallets.getWalletStandardWallets();
65
- removeSolanaWalletStandardListener = on('register', (wallet) => {
66
- var _a, _b;
67
- if (!shouldAddWalletStandardConnector(wallet, walletBook$1, authMode)) {
91
+ teardownSolanaWalletStandardDiscovery === null || teardownSolanaWalletStandardDiscovery === void 0 ? void 0 : teardownSolanaWalletStandardDiscovery();
92
+ // Tracks wallets already surfaced so neither the register listener nor the
93
+ // poll emits a duplicate providerInjected for the same wallet.
94
+ const discoveredWallets = new Set();
95
+ const handleWallet = (wallet) => {
96
+ if (discoveredWallets.has(wallet.name)) {
68
97
  return;
69
98
  }
70
- logger.logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Wallet registered via wallet-standard', wallet.name);
71
- const walletBookWallet = walletBook.findWalletBookWalletByNameAndChain(walletBook$1, wallet.name, 'sol');
72
- const walletKey = walletBookWallet
73
- ? (_b = Object.entries((_a = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
74
- : undefined;
75
- const walletBookMetadata = walletBookWallet &&
76
- walletConnectorCore.getWalletMetadataFromWalletBook({
77
- walletBook: walletBook$1,
78
- walletBookWallet,
79
- walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${utils.sanitizeName(wallet.name)}sol`,
80
- });
81
- const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
82
- walletConnectorCore.walletConnectorEvents.emit('providerInjected', {
83
- injectedConnectorConstructor,
84
- });
99
+ if (!shouldAddWalletStandardConnector(wallet, walletBook, authMode)) {
100
+ return;
101
+ }
102
+ discoveredWallets.add(wallet.name);
103
+ emitWalletStandardConnector(wallet, walletBook);
104
+ };
105
+ const { on, wallets: initialWallets } = getWalletStandardWallets.getWalletStandardWallets();
106
+ // Wallets already present are returned synchronously by
107
+ // fetchInjectedWalletConnectors, so seed them as discovered (no emit needed);
108
+ // the listener and poll then only fire for wallets that appear afterwards.
109
+ initialWallets.forEach((wallet) => {
110
+ if (shouldAddWalletStandardConnector(wallet, walletBook, authMode)) {
111
+ discoveredWallets.add(wallet.name);
112
+ }
85
113
  });
114
+ const removeRegisterListener = on('register', handleWallet);
115
+ const pollForNewWallets = () => {
116
+ getWalletStandardWallets.getWalletStandardWallets().wallets.forEach(handleWallet);
117
+ };
118
+ const pollIntervalId = setInterval(pollForNewWallets, SOLANA_WALLET_STANDARD_POLL_INTERVAL_MS);
119
+ const pollTimeoutId = setTimeout(() => {
120
+ clearInterval(pollIntervalId);
121
+ }, SOLANA_WALLET_STANDARD_POLL_DURATION_MS);
122
+ teardownSolanaWalletStandardDiscovery = () => {
123
+ removeRegisterListener === null || removeRegisterListener === void 0 ? void 0 : removeRegisterListener();
124
+ clearInterval(pollIntervalId);
125
+ clearTimeout(pollTimeoutId);
126
+ };
86
127
  };
87
128
  const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
88
129
  var _a;
89
- addSolanaWalletStandardListener(walletBook, authMode);
130
+ setupSolanaWalletStandardDiscovery(walletBook, authMode);
90
131
  const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
91
132
  .filter(([key, wallet]) => {
92
133
  var _a, _b, _c;
@@ -115,6 +156,10 @@ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
115
156
  walletConnectorCore.getWalletMetadataFromWalletBook({
116
157
  walletBook,
117
158
  walletBookWallet,
159
+ // walletBookKey and walletBookWallet come from the same find() tuple,
160
+ // so walletBookKey is always defined here; the fallback satisfies the
161
+ // typed walletKey but is unreachable at runtime.
162
+ /* istanbul ignore next */
118
163
  walletKey: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : `${utils.sanitizeName(wallet.name)}sol`,
119
164
  });
120
165
  return getConnectorConstructorForWalletStandardWallet.getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletBookKey);
@@ -2,6 +2,11 @@ import { WalletBookSchema } from '@dynamic-labs/wallet-book';
2
2
  import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
3
3
  import type { AuthMode } from '@dynamic-labs/types';
4
4
  export declare const injectedWalletOverrides: WalletConnectorConstructor[];
5
+ /**
6
+ * Stops the active wallet-standard discovery (register listener + poll).
7
+ * @internal - Exposed for test cleanup.
8
+ */
9
+ export declare const stopSolanaWalletStandardDiscovery: () => void;
5
10
  export declare const fetchInjectedWalletConnectors: ({ walletBook, authMode, }: {
6
11
  walletBook: WalletBookSchema;
7
12
  authMode: AuthMode;
@@ -11,7 +11,17 @@ import { getConnectorConstructorForWalletStandardWallet } from './walletStandard
11
11
  import { getWalletStandardWallets } from './walletStandard/getWalletStandardWallets/getWalletStandardWallets.js';
12
12
  import { hasAllWalletStandardRequiredFeatures } from './walletStandard/hasAllWalletStandardRequiredFeatures/hasAllWalletStandardRequiredFeatures.js';
13
13
 
14
- let removeSolanaWalletStandardListener = null;
14
+ /**
15
+ * Teardown for the active wallet-standard discovery (register listener + poll).
16
+ * Recreated on each fetchInjectedWalletConnectors call.
17
+ */
18
+ let teardownSolanaWalletStandardDiscovery = null;
19
+ // Some extensions (e.g. Backpack/Eden/Solflare racing over the page) inject
20
+ // after the initial snapshot, and a one-shot register listener can miss an
21
+ // announcement that fires before we subscribe. Polling the wallet-standard
22
+ // registry for a short window catches those late arrivals without a refresh.
23
+ const SOLANA_WALLET_STANDARD_POLL_INTERVAL_MS = 300;
24
+ const SOLANA_WALLET_STANDARD_POLL_DURATION_MS = 5000;
15
25
  const injectedWalletOverrides = [
16
26
  CoinbaseSolana,
17
27
  BackpackSol,
@@ -51,38 +61,69 @@ const shouldAddWalletStandardConnector = (wallet, walletBook, authMode) => {
51
61
  });
52
62
  return !shouldHandleFromWalletBook && hasAllFeatures;
53
63
  };
54
- const addSolanaWalletStandardListener = (walletBook, authMode) => {
64
+ const emitWalletStandardConnector = (wallet, walletBook) => {
65
+ var _a, _b;
66
+ logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Emitting providerInjected for wallet-standard wallet', wallet.name);
67
+ const walletBookWallet = findWalletBookWalletByNameAndChain(walletBook, wallet.name, 'sol');
68
+ const walletKey = walletBookWallet
69
+ ? (_b = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
70
+ : undefined;
71
+ const walletBookMetadata = walletBookWallet &&
72
+ getWalletMetadataFromWalletBook({
73
+ walletBook,
74
+ walletBookWallet,
75
+ walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${sanitizeName(wallet.name)}sol`,
76
+ });
77
+ const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
78
+ walletConnectorEvents.emit('providerInjected', {
79
+ injectedConnectorConstructor,
80
+ });
81
+ };
82
+ const setupSolanaWalletStandardDiscovery = (walletBook, authMode) => {
55
83
  // check to ensure this method doesn't run with SSR
56
84
  if (typeof window === 'undefined') {
57
85
  return;
58
86
  }
59
- removeSolanaWalletStandardListener === null || removeSolanaWalletStandardListener === void 0 ? void 0 : removeSolanaWalletStandardListener();
60
- const { on } = getWalletStandardWallets();
61
- removeSolanaWalletStandardListener = on('register', (wallet) => {
62
- var _a, _b;
87
+ teardownSolanaWalletStandardDiscovery === null || teardownSolanaWalletStandardDiscovery === void 0 ? void 0 : teardownSolanaWalletStandardDiscovery();
88
+ // Tracks wallets already surfaced so neither the register listener nor the
89
+ // poll emits a duplicate providerInjected for the same wallet.
90
+ const discoveredWallets = new Set();
91
+ const handleWallet = (wallet) => {
92
+ if (discoveredWallets.has(wallet.name)) {
93
+ return;
94
+ }
63
95
  if (!shouldAddWalletStandardConnector(wallet, walletBook, authMode)) {
64
96
  return;
65
97
  }
66
- logger.logVerboseTroubleshootingMessage('[SOL fetchInjectedWalletConnectors] Wallet registered via wallet-standard', wallet.name);
67
- const walletBookWallet = findWalletBookWalletByNameAndChain(walletBook, wallet.name, 'sol');
68
- const walletKey = walletBookWallet
69
- ? (_b = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).find(([, entry]) => entry === walletBookWallet)) === null || _b === void 0 ? void 0 : _b[0]
70
- : undefined;
71
- const walletBookMetadata = walletBookWallet &&
72
- getWalletMetadataFromWalletBook({
73
- walletBook,
74
- walletBookWallet,
75
- walletKey: walletKey !== null && walletKey !== void 0 ? walletKey : `${sanitizeName(wallet.name)}sol`,
76
- });
77
- const injectedConnectorConstructor = getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletKey);
78
- walletConnectorEvents.emit('providerInjected', {
79
- injectedConnectorConstructor,
80
- });
98
+ discoveredWallets.add(wallet.name);
99
+ emitWalletStandardConnector(wallet, walletBook);
100
+ };
101
+ const { on, wallets: initialWallets } = getWalletStandardWallets();
102
+ // Wallets already present are returned synchronously by
103
+ // fetchInjectedWalletConnectors, so seed them as discovered (no emit needed);
104
+ // the listener and poll then only fire for wallets that appear afterwards.
105
+ initialWallets.forEach((wallet) => {
106
+ if (shouldAddWalletStandardConnector(wallet, walletBook, authMode)) {
107
+ discoveredWallets.add(wallet.name);
108
+ }
81
109
  });
110
+ const removeRegisterListener = on('register', handleWallet);
111
+ const pollForNewWallets = () => {
112
+ getWalletStandardWallets().wallets.forEach(handleWallet);
113
+ };
114
+ const pollIntervalId = setInterval(pollForNewWallets, SOLANA_WALLET_STANDARD_POLL_INTERVAL_MS);
115
+ const pollTimeoutId = setTimeout(() => {
116
+ clearInterval(pollIntervalId);
117
+ }, SOLANA_WALLET_STANDARD_POLL_DURATION_MS);
118
+ teardownSolanaWalletStandardDiscovery = () => {
119
+ removeRegisterListener === null || removeRegisterListener === void 0 ? void 0 : removeRegisterListener();
120
+ clearInterval(pollIntervalId);
121
+ clearTimeout(pollTimeoutId);
122
+ };
82
123
  };
83
124
  const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
84
125
  var _a;
85
- addSolanaWalletStandardListener(walletBook, authMode);
126
+ setupSolanaWalletStandardDiscovery(walletBook, authMode);
86
127
  const walletBookConnectors = Object.entries((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
87
128
  .filter(([key, wallet]) => {
88
129
  var _a, _b, _c;
@@ -111,6 +152,10 @@ const fetchInjectedWalletConnectors = ({ walletBook, authMode, }) => {
111
152
  getWalletMetadataFromWalletBook({
112
153
  walletBook,
113
154
  walletBookWallet,
155
+ // walletBookKey and walletBookWallet come from the same find() tuple,
156
+ // so walletBookKey is always defined here; the fallback satisfies the
157
+ // typed walletKey but is unreachable at runtime.
158
+ /* istanbul ignore next */
114
159
  walletKey: walletBookKey !== null && walletBookKey !== void 0 ? walletBookKey : `${sanitizeName(wallet.name)}sol`,
115
160
  });
116
161
  return getConnectorConstructorForWalletStandardWallet(wallet, walletBookMetadata, walletBookKey);