@dynamic-labs/wallet-book 4.0.0-alpha.11 → 4.0.0-alpha.13

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,29 @@
1
1
 
2
+ ## [4.0.0-alpha.13](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.12...v4.0.0-alpha.13) (2024-10-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * improve displayed chain name in network switcher ([#7153](https://github.com/dynamic-labs/dynamic-auth/issues/7153)) ([55d2e5a](https://github.com/dynamic-labs/dynamic-auth/commit/55d2e5a9954bf0255b5caf7aba7a6f1f2e215967))
8
+
9
+ ## [4.0.0-alpha.12](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-10-18)
10
+
11
+
12
+ ### Features
13
+
14
+ * add support for xverse account change event ([#7114](https://github.com/dynamic-labs/dynamic-auth/issues/7114)) ([79df047](https://github.com/dynamic-labs/dynamic-auth/commit/79df04775edb297a339e2d74adcc873584a6d8af))
15
+ * solana embedded signall headless ([#7132](https://github.com/dynamic-labs/dynamic-auth/issues/7132)) ([fe16b71](https://github.com/dynamic-labs/dynamic-auth/commit/fe16b71a4c0ad775f8de87ca899cfdd1071f11d6))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * bug where embeddedWalletCreated event was fired before listener … ([#7151](https://github.com/dynamic-labs/dynamic-auth/issues/7151)) ([ae9da56](https://github.com/dynamic-labs/dynamic-auth/commit/ae9da56850130491384a2d5f47c1617815dcce5b))
21
+ * edge case where wallet book fails to load ([#7148](https://github.com/dynamic-labs/dynamic-auth/issues/7148)) ([805dc6d](https://github.com/dynamic-labs/dynamic-auth/commit/805dc6d7cc4cdf0b23748d82b3bd8216d88d55b5))
22
+ * issues where native currency icons were incorrect ([#7126](https://github.com/dynamic-labs/dynamic-auth/issues/7126)) ([8b8891a](https://github.com/dynamic-labs/dynamic-auth/commit/8b8891a52397e17cc127ea3a09ade14c4b70a8ee))
23
+ * remove now-unused sessionTimeout from useSocial ([#7123](https://github.com/dynamic-labs/dynamic-auth/issues/7123)) ([7959a8a](https://github.com/dynamic-labs/dynamic-auth/commit/7959a8a4c8ceb76c5c4f1ae91af204bf9c5cae7b))
24
+ * Revert: Update Exodus extension version " ([#7130](https://github.com/dynamic-labs/dynamic-auth/issues/7130)) ([f2274ae](https://github.com/dynamic-labs/dynamic-auth/commit/f2274aefd29bb9f3fb6de8493e4a5f73946a5600)), closes [#7129](https://github.com/dynamic-labs/dynamic-auth/issues/7129)
25
+ * use embedded primaryChain when passing undefined chains list to createTurnkeyWallet ([#7149](https://github.com/dynamic-labs/dynamic-auth/issues/7149)) ([c73a3ae](https://github.com/dynamic-labs/dynamic-auth/commit/c73a3aeeda8045b936d218f7078ad79967c321ef))
26
+
2
27
  ## [4.0.0-alpha.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.10...v4.0.0-alpha.11) (2024-10-15)
3
28
 
4
29
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.11";
6
+ var version = "4.0.0-alpha.13";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.11";
2
+ var version = "4.0.0-alpha.13";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-book",
3
- "version": "4.0.0-alpha.11",
3
+ "version": "4.0.0-alpha.13",
4
4
  "author": "Dynamic Labs, Inc.",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.cjs",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "zod": "3.22.4",
20
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.11",
21
- "@dynamic-labs/iconic": "4.0.0-alpha.11",
22
- "@dynamic-labs/logger": "4.0.0-alpha.11",
23
- "@dynamic-labs/utils": "4.0.0-alpha.11",
20
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.13",
21
+ "@dynamic-labs/iconic": "4.0.0-alpha.13",
22
+ "@dynamic-labs/logger": "4.0.0-alpha.13",
23
+ "@dynamic-labs/utils": "4.0.0-alpha.13",
24
24
  "eventemitter3": "5.0.1",
25
25
  "util": "0.12.5"
26
26
  },
@@ -12,6 +12,19 @@ const useWalletBookCdn = () => {
12
12
  const [walletBookState, setWalletBookState] = react.useState(fetchWalletBook.walletBookCache.current);
13
13
  react.useEffect(() => {
14
14
  fetchWalletBook.walletBookEmitter.on('walletBookLoaded', setWalletBookState);
15
+ /**
16
+ * Justification for this setWalletBookState call — imagine the following scenario:
17
+ *
18
+ * 1. fetchWalletBook() is called — the wallet book is not yet loaded
19
+ * 2. useState(walletBookCache.current) is called, and therefore initializes walletBookState to {}
20
+ * 3. Before this effect runs — wallet book is loaded, and the walletBookLoaded event is emitted
21
+ * 4. This effect finally runs and only then subscribes to the walletBookLoaded event
22
+ *
23
+ * In this case, walletBookState would be initialized to {}, and would never be updated to the actual wallet book
24
+ * Therefore, we need to call setWalletBookState(walletBookCache.current)
25
+ * to ensure that walletBookState is initialized to the correct value in this edge case
26
+ */
27
+ setWalletBookState(fetchWalletBook.walletBookCache.current);
15
28
  return () => {
16
29
  fetchWalletBook.walletBookEmitter.off('walletBookLoaded', setWalletBookState);
17
30
  };
@@ -8,6 +8,19 @@ const useWalletBookCdn = () => {
8
8
  const [walletBookState, setWalletBookState] = useState(walletBookCache.current);
9
9
  useEffect(() => {
10
10
  walletBookEmitter.on('walletBookLoaded', setWalletBookState);
11
+ /**
12
+ * Justification for this setWalletBookState call — imagine the following scenario:
13
+ *
14
+ * 1. fetchWalletBook() is called — the wallet book is not yet loaded
15
+ * 2. useState(walletBookCache.current) is called, and therefore initializes walletBookState to {}
16
+ * 3. Before this effect runs — wallet book is loaded, and the walletBookLoaded event is emitted
17
+ * 4. This effect finally runs and only then subscribes to the walletBookLoaded event
18
+ *
19
+ * In this case, walletBookState would be initialized to {}, and would never be updated to the actual wallet book
20
+ * Therefore, we need to call setWalletBookState(walletBookCache.current)
21
+ * to ensure that walletBookState is initialized to the correct value in this edge case
22
+ */
23
+ setWalletBookState(walletBookCache.current);
11
24
  return () => {
12
25
  walletBookEmitter.off('walletBookLoaded', setWalletBookState);
13
26
  };
@@ -1311,9 +1311,6 @@ var wallets = {
1311
1311
  name: "Xverse",
1312
1312
  walletLimitations: {
1313
1313
  browserExtension: {
1314
- unsupportedEvents: [
1315
- "accountChanged"
1316
- ],
1317
1314
  unsupportedMethods: [
1318
1315
  "getConnectedAccounts"
1319
1316
  ]
@@ -1336,6 +1333,26 @@ var wallets = {
1336
1333
  ]
1337
1334
  }
1338
1335
  }
1336
+ },
1337
+ oylwallet: {
1338
+ brand: {
1339
+ alt: "Oyl Wallet",
1340
+ spriteId: "oyl"
1341
+ },
1342
+ desktop: {
1343
+ chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
1344
+ },
1345
+ injectedConfig: [
1346
+ {
1347
+ chain: "btc",
1348
+ extensionLocators: [
1349
+ ],
1350
+ windowLocations: [
1351
+ "oyl"
1352
+ ]
1353
+ }
1354
+ ],
1355
+ name: "Oyl Wallet"
1339
1356
  }
1340
1357
  };
1341
1358
  var walletBookFallbacks = {
@@ -1307,9 +1307,6 @@ var wallets = {
1307
1307
  name: "Xverse",
1308
1308
  walletLimitations: {
1309
1309
  browserExtension: {
1310
- unsupportedEvents: [
1311
- "accountChanged"
1312
- ],
1313
1310
  unsupportedMethods: [
1314
1311
  "getConnectedAccounts"
1315
1312
  ]
@@ -1332,6 +1329,26 @@ var wallets = {
1332
1329
  ]
1333
1330
  }
1334
1331
  }
1332
+ },
1333
+ oylwallet: {
1334
+ brand: {
1335
+ alt: "Oyl Wallet",
1336
+ spriteId: "oyl"
1337
+ },
1338
+ desktop: {
1339
+ chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
1340
+ },
1341
+ injectedConfig: [
1342
+ {
1343
+ chain: "btc",
1344
+ extensionLocators: [
1345
+ ],
1346
+ windowLocations: [
1347
+ "oyl"
1348
+ ]
1349
+ }
1350
+ ],
1351
+ name: "Oyl Wallet"
1335
1352
  }
1336
1353
  };
1337
1354
  var walletBookFallbacks = {