@dynamic-labs/sdk-react-core 3.9.6 → 3.9.8

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
+ ### [3.9.8](https://github.com/dynamic-labs/DynamicAuth/compare/v3.9.7...v3.9.8) (2025-01-09)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * allow confirmed commitment transactions for solana ([#7735](https://github.com/dynamic-labs/DynamicAuth/issues/7735)) ([7a43b79](https://github.com/dynamic-labs/DynamicAuth/commit/7a43b792ba615e277573b5540801a8b3e0c68155))
8
+ * allow selecting wallet directly without showing group view if wallet key is the same as group key ([#7748](https://github.com/dynamic-labs/DynamicAuth/issues/7748)) ([b335cbd](https://github.com/dynamic-labs/DynamicAuth/commit/b335cbdafc22d757c84995bd276c55681e6b2de5))
9
+ * make transaction destination parsing for regular EVM transactions ([#7719](https://github.com/dynamic-labs/DynamicAuth/issues/7719)) ([890bc0f](https://github.com/dynamic-labs/DynamicAuth/commit/890bc0f32a79fe3670d9dc4474b34c85854c0e70))
10
+
11
+ ### [3.9.7](https://github.com/dynamic-labs/DynamicAuth/compare/v3.9.6...v3.9.7) (2025-01-02)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * wc wallet client interactions on some wallets ([#7728](https://github.com/dynamic-labs/DynamicAuth/issues/7728)) ([f1190d9](https://github.com/dynamic-labs/DynamicAuth/commit/f1190d9bd119f00787b61009d28c2d0f564f1ed8))
17
+
2
18
  ### [3.9.6](https://github.com/dynamic-labs/DynamicAuth/compare/v3.9.5...v3.9.6) (2024-12-28)
3
19
 
4
20
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.9.6";
6
+ var version = "3.9.8";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.570",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "3.9.6";
2
+ var version = "3.9.8";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.570",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "3.9.6",
3
+ "version": "3.9.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,16 +17,16 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/assert-package-version": "3.9.6",
21
- "@dynamic-labs/iconic": "3.9.6",
22
- "@dynamic-labs/logger": "3.9.6",
23
- "@dynamic-labs/multi-wallet": "3.9.6",
24
- "@dynamic-labs/rpc-providers": "3.9.6",
25
- "@dynamic-labs/store": "3.9.6",
26
- "@dynamic-labs/types": "3.9.6",
27
- "@dynamic-labs/utils": "3.9.6",
28
- "@dynamic-labs/wallet-book": "3.9.6",
29
- "@dynamic-labs/wallet-connector-core": "3.9.6",
20
+ "@dynamic-labs/assert-package-version": "3.9.8",
21
+ "@dynamic-labs/iconic": "3.9.8",
22
+ "@dynamic-labs/logger": "3.9.8",
23
+ "@dynamic-labs/multi-wallet": "3.9.8",
24
+ "@dynamic-labs/rpc-providers": "3.9.8",
25
+ "@dynamic-labs/store": "3.9.8",
26
+ "@dynamic-labs/types": "3.9.8",
27
+ "@dynamic-labs/utils": "3.9.8",
28
+ "@dynamic-labs/wallet-book": "3.9.8",
29
+ "@dynamic-labs/wallet-connector-core": "3.9.8",
30
30
  "bs58": "5.0.0",
31
31
  "eventemitter3": "5.0.1"
32
32
  },
@@ -1836,8 +1836,8 @@ const translation = {
1836
1836
  description: 'Please add {{amountLeft}} {{currencySymbol}} to continue.',
1837
1837
  },
1838
1838
  failed_simulation: {
1839
- title: 'Unable to simulate transaction',
1840
- description: 'Funds may be lost if submitted.',
1839
+ title: 'Transaction expected to fail',
1840
+ description: 'Something went wrong. Check your balances and try again.',
1841
1841
  },
1842
1842
  },
1843
1843
  error_message: {
@@ -1832,8 +1832,8 @@ const translation = {
1832
1832
  description: 'Please add {{amountLeft}} {{currencySymbol}} to continue.',
1833
1833
  },
1834
1834
  failed_simulation: {
1835
- title: 'Unable to simulate transaction',
1836
- description: 'Funds may be lost if submitted.',
1835
+ title: 'Transaction expected to fail',
1836
+ description: 'Something went wrong. Check your balances and try again.',
1837
1837
  },
1838
1838
  },
1839
1839
  error_message: {
@@ -118,17 +118,18 @@ const useWalletOptions = () => {
118
118
  });
119
119
  }, [walletBook$1, walletConnectorOptions]);
120
120
  const allWalletOptions = React.useMemo(() => getFilteredWalletOptions((options) => options), [getFilteredWalletOptions]);
121
- const selectWalletOption = (walletKey) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
121
+ const selectWalletOption = React.useCallback((walletKey_1, ...args_1) => _tslib.__awaiter(void 0, [walletKey_1, ...args_1], void 0, function* (walletKey, selectGroupIfAvailable = true) {
122
122
  const group = groupWalletOptions.groupWalletOptions(walletBook$1, walletConnectorOptions);
123
123
  const walletOption = group.find((wallet) => wallet.key === walletKey);
124
124
  logger.logger.logVerboseTroubleshootingMessage('[useWalletOptions] selectWalletOption', {
125
+ selectGroupIfAvailable,
125
126
  walletKey,
126
127
  walletOption: walletOption === null || walletOption === void 0 ? void 0 : walletOption.key,
127
128
  });
128
129
  if (!walletOption) {
129
130
  throw new utils.DynamicError('Invalid wallet option key provided.');
130
131
  }
131
- if (isWalletGroup.isWalletGroup(walletOption)) {
132
+ if (selectGroupIfAvailable && isWalletGroup.isWalletGroup(walletOption)) {
132
133
  navigateToWalletGroup(walletOption);
133
134
  }
134
135
  else if (walletConnectorCore.isHardwareWalletConnector(walletOption.walletConnector) &&
@@ -142,7 +143,14 @@ const useWalletOptions = () => {
142
143
  handleWalletItemClick(walletOption);
143
144
  }
144
145
  setShowAuthFlow(true);
145
- });
146
+ }), [
147
+ handleWalletItemClick,
148
+ navigateToWalletGroup,
149
+ setShowAuthFlow,
150
+ setView,
151
+ walletBook$1,
152
+ walletConnectorOptions,
153
+ ]);
146
154
  return {
147
155
  getFilteredWalletOptions,
148
156
  selectWalletOption,
@@ -9,7 +9,7 @@ export declare const useWalletOptions: () => {
9
9
  key: string;
10
10
  name: string;
11
11
  }[];
12
- selectWalletOption: (walletKey: string) => Promise<void>;
12
+ selectWalletOption: (walletKey: string, selectGroupIfAvailable?: boolean) => Promise<void>;
13
13
  walletOptions: {
14
14
  chain: "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "STARK" | "ATOM" | "COSMOS" | "BTC";
15
15
  group: string | undefined;
@@ -114,17 +114,18 @@ const useWalletOptions = () => {
114
114
  });
115
115
  }, [walletBook, walletConnectorOptions]);
116
116
  const allWalletOptions = useMemo(() => getFilteredWalletOptions((options) => options), [getFilteredWalletOptions]);
117
- const selectWalletOption = (walletKey) => __awaiter(void 0, void 0, void 0, function* () {
117
+ const selectWalletOption = useCallback((walletKey_1, ...args_1) => __awaiter(void 0, [walletKey_1, ...args_1], void 0, function* (walletKey, selectGroupIfAvailable = true) {
118
118
  const group = groupWalletOptions(walletBook, walletConnectorOptions);
119
119
  const walletOption = group.find((wallet) => wallet.key === walletKey);
120
120
  logger.logVerboseTroubleshootingMessage('[useWalletOptions] selectWalletOption', {
121
+ selectGroupIfAvailable,
121
122
  walletKey,
122
123
  walletOption: walletOption === null || walletOption === void 0 ? void 0 : walletOption.key,
123
124
  });
124
125
  if (!walletOption) {
125
126
  throw new DynamicError('Invalid wallet option key provided.');
126
127
  }
127
- if (isWalletGroup(walletOption)) {
128
+ if (selectGroupIfAvailable && isWalletGroup(walletOption)) {
128
129
  navigateToWalletGroup(walletOption);
129
130
  }
130
131
  else if (isHardwareWalletConnector(walletOption.walletConnector) &&
@@ -138,7 +139,14 @@ const useWalletOptions = () => {
138
139
  handleWalletItemClick(walletOption);
139
140
  }
140
141
  setShowAuthFlow(true);
141
- });
142
+ }), [
143
+ handleWalletItemClick,
144
+ navigateToWalletGroup,
145
+ setShowAuthFlow,
146
+ setView,
147
+ walletBook,
148
+ walletConnectorOptions,
149
+ ]);
142
150
  return {
143
151
  getFilteredWalletOptions,
144
152
  selectWalletOption,