@xyo-network/react-connected-accounts 7.5.8 → 7.5.12

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 (46) hide show
  1. package/dist/browser/classes/EnabledWallets.d.ts +5 -9
  2. package/dist/browser/classes/EnabledWallets.d.ts.map +1 -1
  3. package/dist/browser/hooks/useEnabledWallets.d.ts.map +1 -1
  4. package/dist/browser/index.mjs +377 -343
  5. package/dist/browser/index.mjs.map +1 -1
  6. package/package.json +61 -28
  7. package/src/classes/EnabledWallets.ts +0 -134
  8. package/src/classes/index.ts +0 -1
  9. package/src/components/ConnectedAccountsFlexbox.stories.tsx +0 -32
  10. package/src/components/ConnectedAccountsFlexbox.tsx +0 -43
  11. package/src/components/index.ts +0 -2
  12. package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +0 -20
  13. package/src/components/wallet/dialogs/connect/Dialog.tsx +0 -55
  14. package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +0 -36
  15. package/src/components/wallet/dialogs/connect/Permissions.tsx +0 -33
  16. package/src/components/wallet/dialogs/connect/index.ts +0 -2
  17. package/src/components/wallet/dialogs/index.ts +0 -2
  18. package/src/components/wallet/dialogs/revoke/Dialog.tsx +0 -44
  19. package/src/components/wallet/dialogs/revoke/index.ts +0 -1
  20. package/src/components/wallet/index.ts +0 -3
  21. package/src/components/wallet/lib/ActiveProvider.ts +0 -7
  22. package/src/components/wallet/lib/TableHeadData.ts +0 -39
  23. package/src/components/wallet/lib/index.ts +0 -2
  24. package/src/components/wallet/table/ConnectedWalletsTable.tsx +0 -62
  25. package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +0 -77
  26. package/src/components/wallet/table/cells/Accounts.tsx +0 -26
  27. package/src/components/wallet/table/cells/Actions.tsx +0 -38
  28. package/src/components/wallet/table/cells/Cells.tsx +0 -16
  29. package/src/components/wallet/table/cells/ChainName.tsx +0 -8
  30. package/src/components/wallet/table/cells/State.tsx +0 -30
  31. package/src/components/wallet/table/cells/Wallet.tsx +0 -21
  32. package/src/components/wallet/table/cells/index.ts +0 -6
  33. package/src/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.tsx +0 -17
  34. package/src/components/wallet/table/cells/lib/index.ts +0 -1
  35. package/src/components/wallet/table/hooks/index.ts +0 -1
  36. package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +0 -21
  37. package/src/components/wallet/table/index.ts +0 -4
  38. package/src/hooks/index.ts +0 -2
  39. package/src/hooks/useDetectWallets.tsx +0 -29
  40. package/src/hooks/useEnabledWallets.tsx +0 -47
  41. package/src/img/index.ts +0 -2
  42. package/src/img/xyo-color-logo-text-only.svg +0 -1
  43. package/src/img/xyo-color-logo.svg +0 -1
  44. package/src/index.ts +0 -3
  45. package/src/types/global.d.ts +0 -1
  46. package/src/types/images.d.ts +0 -5
@@ -1,12 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/classes/EnabledWallets.ts
5
2
  var DEFAULT_LOCAL_STORAGE_KEY = "XYO|EnabledWallets";
6
3
  var EnabledEthWalletConnections = class {
7
- static {
8
- __name(this, "EnabledEthWalletConnections");
9
- }
10
4
  // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)
11
5
  persistPreferences = true;
12
6
  // Map of wallet names and their enabled/disabled state
@@ -31,17 +25,17 @@ var EnabledEthWalletConnections = class {
31
25
  this.toggleEnabledWallet(rdns, true);
32
26
  }
33
27
  /**
34
- * Given a new set of wallets, set their enabled state based off previous preferences
35
- */
28
+ * Given a new set of wallets, set their enabled state based off previous preferences
29
+ */
36
30
  resetWallets(wallets) {
37
31
  const newWallets = {};
38
- const addWallet = /* @__PURE__ */ __name(([walletName, wallet]) => {
32
+ const addWallet = ([walletName, wallet]) => {
39
33
  newWallets[walletName] = {
40
34
  // preserve the existing enabled state
41
35
  enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,
42
36
  wallet
43
37
  };
44
- }, "addWallet");
38
+ };
45
39
  Object.entries(wallets).forEach((wallet) => {
46
40
  if (wallet !== void 0) {
47
41
  addWallet.bind(this);
@@ -51,10 +45,7 @@ var EnabledEthWalletConnections = class {
51
45
  this.emitChange();
52
46
  }
53
47
  subscribe(listener) {
54
- this.listeners = [
55
- ...this.listeners,
56
- listener
57
- ];
48
+ this.listeners = [...this.listeners, listener];
58
49
  return () => {
59
50
  this.listeners = this.listeners.filter((existingListener) => existingListener !== listener);
60
51
  };
@@ -62,9 +53,7 @@ var EnabledEthWalletConnections = class {
62
53
  toggleEnabledWallet(rdns, enabled) {
63
54
  if (rdns && this.ethWalletsState[rdns]) {
64
55
  this.ethWalletsState[rdns].enabled = enabled;
65
- this.ethWalletsState = {
66
- ...this.ethWalletsState
67
- };
56
+ this.ethWalletsState = { ...this.ethWalletsState };
68
57
  this.emitChange();
69
58
  }
70
59
  }
@@ -104,221 +93,236 @@ var EnabledEthWalletConnections = class {
104
93
  // src/components/ConnectedAccountsFlexbox.tsx
105
94
  import { Typography as Typography6, useTheme as useTheme2 } from "@mui/material";
106
95
  import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
107
- import React13 from "react";
108
96
 
109
97
  // src/hooks/useDetectWallets.tsx
110
98
  import { useWalletDiscovery } from "@xylabs/react-crypto";
111
99
  import { useMemo } from "react";
112
- var sortWallets = /* @__PURE__ */ __name((wallets) => {
100
+ var sortWallets = (wallets) => {
113
101
  const result = [];
114
102
  for (const wallet of Object.values(wallets)) {
115
103
  if (wallet) {
116
- if (wallet.allowedAccounts.length > 0) result.unshift(wallet);
117
- else result.push(wallet);
104
+ if (wallet.allowedAccounts.length > 0)
105
+ result.unshift(wallet);
106
+ else
107
+ result.push(wallet);
118
108
  }
119
109
  }
120
110
  return result;
121
- }, "sortWallets");
122
- var useDetectedWallets = /* @__PURE__ */ __name(() => {
111
+ };
112
+ var useDetectedWallets = () => {
123
113
  const wallets = useWalletDiscovery();
124
- const sortedWallets = useMemo(() => sortWallets(wallets), [
125
- wallets
126
- ]);
127
- const totalConnectedAccounts = useMemo(() => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0), [
128
- sortedWallets
129
- ]);
130
- return {
131
- sortedWallets,
132
- totalConnectedAccounts
133
- };
134
- }, "useDetectedWallets");
114
+ const sortedWallets = useMemo(() => sortWallets(wallets), [wallets]);
115
+ const totalConnectedAccounts = useMemo(
116
+ () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),
117
+ [sortedWallets]
118
+ );
119
+ return { sortedWallets, totalConnectedAccounts };
120
+ };
135
121
 
136
122
  // src/hooks/useEnabledWallets.tsx
137
123
  import { useWalletDiscovery as useWalletDiscovery2 } from "@xylabs/react-crypto";
138
124
  import { useMemo as useMemo2, useSyncExternalStore } from "react";
139
- var enabledEthWallets;
140
- var useEnabledWalletsInner = /* @__PURE__ */ __name((enabledWalletsRdns) => {
125
+ var enabledEthWalletsRef = { current: void 0 };
126
+ var useEnabledWalletsInner = (enabledWalletsRdns) => {
141
127
  const discoveredWallets = useWalletDiscovery2();
142
128
  const wallets = useMemo2(() => {
143
- if (enabledEthWallets === void 0) enabledEthWallets = new EnabledEthWalletConnections();
144
- enabledEthWallets.resetWallets(discoveredWallets);
145
- for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled);
146
- return enabledEthWallets;
147
- }, [
148
- discoveredWallets,
149
- enabledWalletsRdns
150
- ]);
129
+ if (enabledEthWalletsRef.current === void 0) enabledEthWalletsRef.current = new EnabledEthWalletConnections();
130
+ enabledEthWalletsRef.current.resetWallets(discoveredWallets);
131
+ for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWalletsRef.current?.toggleEnabledWallet(rdns, enabled);
132
+ return enabledEthWalletsRef.current;
133
+ }, [discoveredWallets, enabledWalletsRdns]);
151
134
  return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets);
152
- }, "useEnabledWalletsInner");
153
- var useEnabledWallets = /* @__PURE__ */ __name((enabledWalletsRdns) => {
135
+ };
136
+ var useEnabledWallets = (enabledWalletsRdns) => {
154
137
  const wallets = useEnabledWalletsInner(enabledWalletsRdns);
155
- const enabledWallets = useMemo2(() => (
156
- // eslint-disable-next-line unicorn/no-array-reduce
157
- Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
158
- if (wallet.enabled) acc[walletName] = wallet;
159
- return acc;
160
- }, {})
161
- ), [
162
- wallets
163
- ]);
138
+ const enabledWallets = useMemo2(
139
+ () => (
140
+ // eslint-disable-next-line unicorn/no-array-reduce
141
+ Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
142
+ if (wallet.enabled) acc[walletName] = wallet;
143
+ return acc;
144
+ }, {})
145
+ ),
146
+ [wallets]
147
+ );
164
148
  return {
165
- disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),
166
- enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),
149
+ disableWallet: enabledEthWalletsRef.current?.disableWallet.bind(enabledEthWalletsRef.current),
150
+ enableWallet: enabledEthWalletsRef.current?.enableWallet.bind(enabledEthWalletsRef.current),
167
151
  enabledWallets,
168
152
  wallets
169
153
  };
170
- }, "useEnabledWallets");
154
+ };
171
155
 
172
156
  // src/components/wallet/dialogs/connect/CheckboxFormControl.tsx
173
- import { Checkbox, FormControl, FormLabel } from "@mui/material";
174
- import React from "react";
175
- var CheckboxFormControl = /* @__PURE__ */ __name(({ onCheckChanged, ...props }) => {
176
- return /* @__PURE__ */ React.createElement(FormControl, props, /* @__PURE__ */ React.createElement(FormLabel, null, /* @__PURE__ */ React.createElement(Checkbox, {
177
- onChange: /* @__PURE__ */ __name((_, checked) => onCheckChanged?.(checked), "onChange")
178
- }), "Do not show this again."));
179
- }, "CheckboxFormControl");
157
+ import {
158
+ Checkbox,
159
+ FormControl,
160
+ FormLabel
161
+ } from "@mui/material";
162
+ import { jsx, jsxs } from "react/jsx-runtime";
163
+ var CheckboxFormControl = ({ onCheckChanged, ...props }) => {
164
+ return /* @__PURE__ */ jsx(FormControl, { ...props, children: /* @__PURE__ */ jsxs(FormLabel, { children: [
165
+ /* @__PURE__ */ jsx(Checkbox, { onChange: (_, checked) => onCheckChanged?.(checked) }),
166
+ "Do not show this again."
167
+ ] }) });
168
+ };
180
169
 
181
170
  // src/components/wallet/dialogs/connect/Dialog.tsx
182
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
183
- import React4 from "react";
171
+ import {
172
+ Button,
173
+ Dialog,
174
+ DialogActions,
175
+ DialogContent,
176
+ DialogTitle
177
+ } from "@mui/material";
184
178
 
185
179
  // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
186
180
  import { SyncAlt } from "@mui/icons-material";
187
181
  import { Typography } from "@mui/material";
188
182
  import { ConstrainedImage } from "@xylabs/react-crypto";
189
183
  import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
190
- import React2 from "react";
191
184
 
192
185
  // src/img/xyo-color-logo.svg
193
186
  var xyo_color_logo_default = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 238"><defs><style>.cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}</style></defs><path class="cls-1" d="M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z"/><path class="cls-2" d="M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z"/><path class="cls-3" d="M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z"/><path class="cls-4" d="M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z"/></svg>';
194
187
 
195
188
  // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
196
- var LinkedProvidersFlexbox = /* @__PURE__ */ __name(({ icon, providerName, ...props }) => {
197
- return /* @__PURE__ */ React2.createElement(FlexRow, {
198
- gap: 4,
199
- justifyContent: "space-evenly",
200
- ...props
201
- }, /* @__PURE__ */ React2.createElement(FlexCol, {
202
- gap: 0.5
203
- }, /* @__PURE__ */ React2.createElement("img", {
204
- alt: "XYO Logo",
205
- src: xyo_color_logo_default,
206
- style: {
207
- height: "48px"
208
- }
209
- }), /* @__PURE__ */ React2.createElement(Typography, {
210
- variant: "subtitle1"
211
- }, "XYO App")), /* @__PURE__ */ React2.createElement(SyncAlt, {
212
- fontSize: "large"
213
- }), /* @__PURE__ */ React2.createElement(FlexCol, {
214
- gap: 0.5
215
- }, /* @__PURE__ */ React2.createElement(ConstrainedImage, {
216
- constrainedValue: "48px",
217
- src: icon,
218
- alt: providerName,
219
- style: {
220
- height: "48px",
221
- maxWidth: "48px"
222
- }
223
- }), /* @__PURE__ */ React2.createElement(Typography, {
224
- variant: "subtitle1"
225
- }, providerName)));
226
- }, "LinkedProvidersFlexbox");
189
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
190
+ var LinkedProvidersFlexbox = ({
191
+ icon,
192
+ providerName,
193
+ ...props
194
+ }) => {
195
+ return /* @__PURE__ */ jsxs2(FlexRow, { gap: 4, justifyContent: "space-evenly", ...props, children: [
196
+ /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
197
+ /* @__PURE__ */ jsx2("img", { alt: "XYO Logo", src: xyo_color_logo_default, style: { height: "48px" } }),
198
+ /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: "XYO App" })
199
+ ] }),
200
+ /* @__PURE__ */ jsx2(SyncAlt, { fontSize: "large" }),
201
+ /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
202
+ /* @__PURE__ */ jsx2(
203
+ ConstrainedImage,
204
+ {
205
+ constrainedValue: "48px",
206
+ src: icon,
207
+ alt: providerName,
208
+ style: { height: "48px", maxWidth: "48px" }
209
+ }
210
+ ),
211
+ /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: providerName })
212
+ ] })
213
+ ] });
214
+ };
227
215
 
228
216
  // src/components/wallet/dialogs/connect/Permissions.tsx
229
217
  import { Link, Typography as Typography2 } from "@mui/material";
230
218
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
231
- import React3 from "react";
232
- var WalletPermissionsFlexbox = /* @__PURE__ */ __name((props) => {
233
- return /* @__PURE__ */ React3.createElement(FlexCol2, {
234
- gap: 4,
235
- ...props
236
- }, /* @__PURE__ */ React3.createElement(Typography2, {
237
- fontWeight: "bold",
238
- sx: {
239
- textAlign: "center"
240
- }
241
- }, "This will allow XYO to:"), /* @__PURE__ */ React3.createElement("ul", null, /* @__PURE__ */ React3.createElement("li", null, "View your wallet account(s) and address(es)"), /* @__PURE__ */ React3.createElement("li", null, "Read-only access to browse the public blockchain(s) you select")), /* @__PURE__ */ React3.createElement(Typography2, {
242
- variant: "subtitle1",
243
- sx: {
244
- textAlign: "center"
245
- }
246
- }, "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy", " ", /* @__PURE__ */ React3.createElement(Link, {
247
- href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
248
- sx: {
249
- fontWeight: "bold"
250
- },
251
- target: "_blank"
252
- }, "here"), "."));
253
- }, "WalletPermissionsFlexbox");
219
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
220
+ var WalletPermissionsFlexbox = (props) => {
221
+ return /* @__PURE__ */ jsxs3(FlexCol2, { gap: 4, ...props, children: [
222
+ /* @__PURE__ */ jsx3(Typography2, { fontWeight: "bold", sx: { textAlign: "center" }, children: "This will allow XYO to:" }),
223
+ /* @__PURE__ */ jsxs3("ul", { children: [
224
+ /* @__PURE__ */ jsx3("li", { children: "View your wallet account(s) and address(es)" }),
225
+ /* @__PURE__ */ jsx3("li", { children: "Read-only access to browse the public blockchain(s) you select" })
226
+ ] }),
227
+ /* @__PURE__ */ jsxs3(Typography2, { variant: "subtitle1", sx: { textAlign: "center" }, children: [
228
+ "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy",
229
+ " ",
230
+ /* @__PURE__ */ jsx3(
231
+ Link,
232
+ {
233
+ href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
234
+ sx: { fontWeight: "bold" },
235
+ target: "_blank",
236
+ children: "here"
237
+ }
238
+ ),
239
+ "."
240
+ ] })
241
+ ] });
242
+ };
254
243
 
255
244
  // src/components/wallet/dialogs/connect/Dialog.tsx
256
- var ConnectWalletDialog = /* @__PURE__ */ __name(({ activeProvider, onIgnoreConnectDialog, ...props }) => {
245
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
246
+ var ConnectWalletDialog = ({
247
+ activeProvider,
248
+ onIgnoreConnectDialog,
249
+ ...props
250
+ }) => {
257
251
  const { icon, providerName } = activeProvider ?? {};
258
- const onConnect = /* @__PURE__ */ __name(async () => {
252
+ const onConnect = async () => {
259
253
  try {
260
254
  await activeProvider?.connectWallet?.();
261
255
  props.onClose?.({}, "escapeKeyDown");
262
256
  } catch (e) {
263
257
  console.warn(`Error connecting to wallet: ${e.message}`);
264
258
  }
265
- }, "onConnect");
266
- return /* @__PURE__ */ React4.createElement(Dialog, {
267
- slotProps: {
268
- paper: {
269
- sx: {
270
- display: "flex",
271
- gap: 4
272
- }
273
- }
274
- },
275
- ...props
276
- }, /* @__PURE__ */ React4.createElement(DialogTitle, {
277
- sx: {
278
- textAlign: "center"
279
- }
280
- }, "XYO Wants To Access The Blockchain on Your Behalf"), /* @__PURE__ */ React4.createElement(DialogContent, {
281
- sx: {
282
- display: "flex",
283
- flexDirection: "column",
284
- gap: 4
259
+ };
260
+ return /* @__PURE__ */ jsxs4(
261
+ Dialog,
262
+ {
263
+ slotProps: { paper: { sx: { display: "flex", gap: 4 } } },
264
+ ...props,
265
+ children: [
266
+ /* @__PURE__ */ jsx4(DialogTitle, { sx: { textAlign: "center" }, children: "XYO Wants To Access The Blockchain on Your Behalf" }),
267
+ /* @__PURE__ */ jsxs4(
268
+ DialogContent,
269
+ {
270
+ sx: {
271
+ display: "flex",
272
+ flexDirection: "column",
273
+ gap: 4
274
+ },
275
+ children: [
276
+ /* @__PURE__ */ jsx4(LinkedProvidersFlexbox, { icon, providerName }),
277
+ /* @__PURE__ */ jsx4(WalletPermissionsFlexbox, {}),
278
+ /* @__PURE__ */ jsx4(CheckboxFormControl, { onCheckChanged: onIgnoreConnectDialog })
279
+ ]
280
+ }
281
+ ),
282
+ /* @__PURE__ */ jsxs4(DialogActions, { children: [
283
+ /* @__PURE__ */ jsx4(Button, { variant: "outlined", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }),
284
+ /* @__PURE__ */ jsx4(Button, { variant: "contained", onClick: onConnect, children: "Connect" })
285
+ ] })
286
+ ]
285
287
  }
286
- }, /* @__PURE__ */ React4.createElement(LinkedProvidersFlexbox, {
287
- icon,
288
- providerName
289
- }), /* @__PURE__ */ React4.createElement(WalletPermissionsFlexbox, null), /* @__PURE__ */ React4.createElement(CheckboxFormControl, {
290
- onCheckChanged: onIgnoreConnectDialog
291
- })), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(Button, {
292
- variant: "outlined",
293
- onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
294
- }, "Close"), /* @__PURE__ */ React4.createElement(Button, {
295
- variant: "contained",
296
- onClick: onConnect
297
- }, "Connect")));
298
- }, "ConnectWalletDialog");
288
+ );
289
+ };
299
290
 
300
291
  // src/components/wallet/dialogs/revoke/Dialog.tsx
301
- import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
292
+ import {
293
+ Button as Button2,
294
+ Dialog as Dialog2,
295
+ DialogActions as DialogActions2,
296
+ DialogContent as DialogContent2,
297
+ DialogTitle as DialogTitle2,
298
+ Typography as Typography3
299
+ } from "@mui/material";
302
300
  import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
303
301
  import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
304
- import React5 from "react";
305
- var RevokeWalletConnectionDialog = /* @__PURE__ */ __name(({ activeProvider, ...props }) => {
306
- return /* @__PURE__ */ React5.createElement(Dialog2, props, /* @__PURE__ */ React5.createElement(FlexRow2, {
307
- gap: 2,
308
- justifyContent: "start",
309
- pl: 2
310
- }, /* @__PURE__ */ React5.createElement(ConstrainedImage2, {
311
- src: activeProvider?.icon,
312
- constrainedValue: "24px"
313
- }), /* @__PURE__ */ React5.createElement(DialogTitle2, {
314
- sx: {
315
- pl: 0
316
- }
317
- }, "Revoke", activeProvider?.providerName, " ", "Access")), /* @__PURE__ */ React5.createElement(DialogContent2, null, /* @__PURE__ */ React5.createElement(Typography3, null, "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult", " ", activeProvider?.providerName, "'s documentation on how to revoke access to this website:"), /* @__PURE__ */ React5.createElement(Typography3, null, globalThis.location.origin)), /* @__PURE__ */ React5.createElement(DialogActions2, null, /* @__PURE__ */ React5.createElement(Button2, {
318
- variant: "contained",
319
- onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
320
- }, "Close")));
321
- }, "RevokeWalletConnectionDialog");
302
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
303
+ var RevokeWalletConnectionDialog = ({ activeProvider, ...props }) => {
304
+ return /* @__PURE__ */ jsxs5(Dialog2, { ...props, children: [
305
+ /* @__PURE__ */ jsxs5(FlexRow2, { gap: 2, justifyContent: "start", pl: 2, children: [
306
+ /* @__PURE__ */ jsx5(ConstrainedImage2, { src: activeProvider?.icon, constrainedValue: "24px" }),
307
+ /* @__PURE__ */ jsxs5(DialogTitle2, { sx: { pl: 0 }, children: [
308
+ "Revoke",
309
+ activeProvider?.providerName,
310
+ " ",
311
+ "Access"
312
+ ] })
313
+ ] }),
314
+ /* @__PURE__ */ jsxs5(DialogContent2, { children: [
315
+ /* @__PURE__ */ jsxs5(Typography3, { children: [
316
+ "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult",
317
+ " ",
318
+ activeProvider?.providerName,
319
+ "'s documentation on how to revoke access to this website:"
320
+ ] }),
321
+ /* @__PURE__ */ jsx5(Typography3, { children: globalThis.location.origin })
322
+ ] }),
323
+ /* @__PURE__ */ jsx5(DialogActions2, { children: /* @__PURE__ */ jsx5(Button2, { variant: "contained", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }) })
324
+ ] });
325
+ };
322
326
 
323
327
  // src/components/wallet/lib/TableHeadData.ts
324
328
  var WalletsTableHeadCells = [
@@ -360,89 +364,101 @@ var WalletsTableHeadCells = [
360
364
  ];
361
365
 
362
366
  // src/components/wallet/table/cells/Accounts.tsx
363
- import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
364
- import React6 from "react";
365
- var ConnectedWalletsAccountsTableCell = /* @__PURE__ */ __name(({ additionalAccounts, currentAccount, totalAccounts, tableCellProps }) => {
366
- return /* @__PURE__ */ React6.createElement(TableCell, tableCellProps, /* @__PURE__ */ React6.createElement(Tooltip, {
367
- sx: {
368
- cursor: totalAccounts > 0 ? "pointer" : "auto"
369
- },
370
- title: [
371
- ...currentAccount ?? [],
372
- ...additionalAccounts ?? []
373
- ].map((address, index) => /* @__PURE__ */ React6.createElement("p", {
374
- key: index
375
- }, address))
376
- }, /* @__PURE__ */ React6.createElement(Typography4, null, totalAccounts)));
377
- }, "ConnectedWalletsAccountsTableCell");
367
+ import {
368
+ TableCell,
369
+ Tooltip,
370
+ Typography as Typography4
371
+ } from "@mui/material";
372
+ import { jsx as jsx6 } from "react/jsx-runtime";
373
+ var ConnectedWalletsAccountsTableCell = ({
374
+ additionalAccounts,
375
+ currentAccount,
376
+ totalAccounts,
377
+ tableCellProps
378
+ }) => {
379
+ return /* @__PURE__ */ jsx6(TableCell, { ...tableCellProps, children: /* @__PURE__ */ jsx6(
380
+ Tooltip,
381
+ {
382
+ sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
383
+ title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address) => /* @__PURE__ */ jsx6("p", { children: address }, address)),
384
+ children: /* @__PURE__ */ jsx6(Typography4, { children: totalAccounts })
385
+ }
386
+ ) });
387
+ };
378
388
 
379
389
  // src/components/wallet/table/cells/Actions.tsx
380
390
  import { Check, InfoOutlined } from "@mui/icons-material";
381
- import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
391
+ import {
392
+ Button as Button3,
393
+ IconButton,
394
+ TableCell as TableCell2,
395
+ Typography as Typography5
396
+ } from "@mui/material";
382
397
  import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
383
- import React7 from "react";
384
- var ConnectedWalletsActionsTableCell = /* @__PURE__ */ __name(({ connected, onConnect, onRevoke, tableCellProps }) => {
385
- return /* @__PURE__ */ React7.createElement(TableCell2, tableCellProps, /* @__PURE__ */ React7.createElement(FlexRow3, {
386
- gap: 2,
387
- justifyContent: "start"
388
- }, connected ? /* @__PURE__ */ React7.createElement(Typography5, {
389
- sx: {
390
- display: "inline-flex",
391
- gap: 0.5
392
- }
393
- }, /* @__PURE__ */ React7.createElement(Check, null), "Connected") : /* @__PURE__ */ React7.createElement(Button3, {
394
- variant: "contained",
395
- onClick: onConnect
396
- }, "Connect"), connected ? /* @__PURE__ */ React7.createElement(IconButton, {
397
- onClick: onRevoke
398
- }, /* @__PURE__ */ React7.createElement(InfoOutlined, null)) : null));
399
- }, "ConnectedWalletsActionsTableCell");
398
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
399
+ var ConnectedWalletsActionsTableCell = ({
400
+ connected,
401
+ onConnect,
402
+ onRevoke,
403
+ tableCellProps
404
+ }) => {
405
+ return /* @__PURE__ */ jsx7(TableCell2, { ...tableCellProps, children: /* @__PURE__ */ jsxs6(FlexRow3, { gap: 2, justifyContent: "start", children: [
406
+ connected ? /* @__PURE__ */ jsxs6(Typography5, { sx: { display: "inline-flex", gap: 0.5 }, children: [
407
+ /* @__PURE__ */ jsx7(Check, {}),
408
+ "Connected"
409
+ ] }) : /* @__PURE__ */ jsx7(Button3, { variant: "contained", onClick: onConnect, children: "Connect" }),
410
+ connected ? /* @__PURE__ */ jsx7(IconButton, { onClick: onRevoke, children: /* @__PURE__ */ jsx7(InfoOutlined, {}) }) : null
411
+ ] }) });
412
+ };
400
413
 
401
414
  // src/components/wallet/table/cells/ChainName.tsx
402
415
  import { TableCell as TableCell3 } from "@mui/material";
403
- import React8 from "react";
404
- var ConnectedWalletsChainNameTableCell = /* @__PURE__ */ __name(({ chainName, tableCellProps }) => {
405
- return /* @__PURE__ */ React8.createElement(TableCell3, tableCellProps, chainName);
406
- }, "ConnectedWalletsChainNameTableCell");
416
+ import { jsx as jsx8 } from "react/jsx-runtime";
417
+ var ConnectedWalletsChainNameTableCell = ({ chainName, tableCellProps }) => {
418
+ return /* @__PURE__ */ jsx8(TableCell3, { ...tableCellProps, children: chainName });
419
+ };
407
420
 
408
421
  // src/components/wallet/table/cells/State.tsx
409
422
  import { Switch, TableCell as TableCell4 } from "@mui/material";
410
423
  import { isDefined } from "@xylabs/sdk-js";
411
- import React9, { useMemo as useMemo3 } from "react";
412
- var ConnectedWalletState = /* @__PURE__ */ __name(({ connected, walletRdns, tableCellProps }) => {
413
- const { disableWallet, enableWallet, wallets } = useEnabledWallets();
414
- const enabled = useMemo3(() => isDefined(walletRdns) ? wallets[walletRdns]?.enabled : false, [
415
- wallets,
416
- walletRdns
417
- ]);
418
- const handleClick = /* @__PURE__ */ __name((event) => {
424
+ import { useMemo as useMemo3 } from "react";
425
+ import { jsx as jsx9 } from "react/jsx-runtime";
426
+ var ConnectedWalletState = ({
427
+ connected,
428
+ walletRdns,
429
+ tableCellProps
430
+ }) => {
431
+ const {
432
+ disableWallet,
433
+ enableWallet,
434
+ wallets
435
+ } = useEnabledWallets();
436
+ const enabled = useMemo3(() => isDefined(walletRdns) ? wallets[walletRdns]?.enabled : false, [wallets, walletRdns]);
437
+ const handleClick = (event) => {
419
438
  const checked = event.target?.checked;
420
439
  if (isDefined(walletRdns)) {
421
440
  checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns);
422
441
  }
423
- }, "handleClick");
424
- return /* @__PURE__ */ React9.createElement(TableCell4, tableCellProps, /* @__PURE__ */ React9.createElement(Switch, {
425
- disabled: !connected,
426
- checked: connected && enabled,
427
- onChange: handleClick
428
- }));
429
- }, "ConnectedWalletState");
442
+ };
443
+ return /* @__PURE__ */ jsx9(TableCell4, { ...tableCellProps, children: /* @__PURE__ */ jsx9(Switch, { disabled: !connected, checked: connected && enabled, onChange: handleClick }) });
444
+ };
430
445
 
431
446
  // src/components/wallet/table/cells/Wallet.tsx
432
447
  import { TableCell as TableCell5, useTheme } from "@mui/material";
433
448
  import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
434
449
  import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
435
- import React10 from "react";
436
- var ConnectedWalletsWalletTableCell = /* @__PURE__ */ __name(({ icon, walletName, tableCellProps }) => {
450
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
451
+ var ConnectedWalletsWalletTableCell = ({
452
+ icon,
453
+ walletName,
454
+ tableCellProps
455
+ }) => {
437
456
  const theme = useTheme();
438
- return /* @__PURE__ */ React10.createElement(TableCell5, tableCellProps, /* @__PURE__ */ React10.createElement(FlexRow4, {
439
- gap: 2,
440
- justifyContent: "start"
441
- }, /* @__PURE__ */ React10.createElement(ConstrainedImage3, {
442
- constrainedValue: theme.spacing(4),
443
- src: icon
444
- }), walletName));
445
- }, "ConnectedWalletsWalletTableCell");
457
+ return /* @__PURE__ */ jsx10(TableCell5, { ...tableCellProps, children: /* @__PURE__ */ jsxs7(FlexRow4, { gap: 2, justifyContent: "start", children: [
458
+ /* @__PURE__ */ jsx10(ConstrainedImage3, { constrainedValue: theme.spacing(4), src: icon }),
459
+ walletName
460
+ ] }) });
461
+ };
446
462
 
447
463
  // src/components/wallet/table/cells/Cells.tsx
448
464
  var ConnectedWalletTableCells = [
@@ -454,145 +470,163 @@ var ConnectedWalletTableCells = [
454
470
  ];
455
471
 
456
472
  // src/components/wallet/table/ConnectedWalletsTable.tsx
457
- import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
458
- import React12, { useState as useState2 } from "react";
473
+ import {
474
+ Table,
475
+ TableBody,
476
+ TableCell as TableCell6,
477
+ TableHead,
478
+ TableRow as TableRow2
479
+ } from "@mui/material";
480
+ import { useState as useState2 } from "react";
459
481
 
460
482
  // src/components/wallet/table/ConnectedWalletsTableRow.tsx
461
483
  import { TableRow } from "@mui/material";
462
484
  import { useEthWallet } from "@xylabs/react-crypto";
463
- import React11, { useCallback, useMemo as useMemo4 } from "react";
464
- var WalletConnectionsTableRow = /* @__PURE__ */ __name(({ ignoreConnectDialog, onConnectClick, onRevoke, wallet, ...props }) => {
465
- const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
466
- const currentAccount = currentAccountFromWallet?.toString() ? [
467
- currentAccountFromWallet.toString()
468
- ] : [];
485
+ import { useCallback, useMemo as useMemo4 } from "react";
486
+ import { jsx as jsx11 } from "react/jsx-runtime";
487
+ var WalletConnectionsTableRow = ({
488
+ ignoreConnectDialog,
489
+ onConnectClick,
490
+ onRevoke,
491
+ wallet,
492
+ ...props
493
+ }) => {
494
+ const {
495
+ currentAccount: currentAccountFromWallet,
496
+ additionalAccounts,
497
+ chainName,
498
+ connectWallet,
499
+ providerInfo
500
+ } = useEthWallet(wallet);
501
+ const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : [];
469
502
  const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0);
470
503
  const connected = !!currentAccount?.length;
471
- const { icon, name, rdns } = useMemo4(() => providerInfo ?? {
504
+ const {
505
+ icon,
506
+ name,
507
+ rdns
508
+ } = useMemo4(() => providerInfo ?? {
472
509
  icon: void 0,
473
510
  name: void 0,
474
511
  rdns: void 0
475
- }, [
476
- providerInfo
477
- ]);
478
- const activeProvider = useMemo4(() => ({
479
- connectWallet,
480
- icon,
481
- providerName: name
482
- }), [
483
- connectWallet,
484
- icon,
485
- name
486
- ]);
512
+ }, [providerInfo]);
513
+ const activeProvider = useMemo4(
514
+ () => ({
515
+ connectWallet,
516
+ icon,
517
+ providerName: name
518
+ }),
519
+ [connectWallet, icon, name]
520
+ );
487
521
  const onRevokeLocal = useCallback(() => {
488
522
  onRevoke?.(activeProvider);
489
- }, [
490
- activeProvider,
491
- onRevoke
492
- ]);
523
+ }, [activeProvider, onRevoke]);
493
524
  const onConnectLocal = useCallback(async () => {
494
525
  if (ignoreConnectDialog) {
495
526
  await connectWallet?.();
496
527
  } else {
497
528
  onConnectClick?.(activeProvider);
498
529
  }
499
- }, [
500
- activeProvider,
501
- connectWallet,
502
- ignoreConnectDialog,
503
- onConnectClick
504
- ]);
505
- return /* @__PURE__ */ React11.createElement(TableRow, props, Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ React11.createElement(Cell, {
506
- key: index,
507
- additionalAccounts,
508
- chainName,
509
- connected,
510
- currentAccount,
511
- icon,
512
- onConnect: onConnectLocal,
513
- onRevoke: onRevokeLocal,
514
- totalAccounts,
515
- walletName: name,
516
- walletRdns: rdns
517
- })));
518
- }, "WalletConnectionsTableRow");
530
+ }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick]);
531
+ return /* @__PURE__ */ jsx11(TableRow, { ...props, children: Object.entries(ConnectedWalletTableCells).map(([cellName, Cell]) => /* @__PURE__ */ jsx11(
532
+ Cell,
533
+ {
534
+ additionalAccounts,
535
+ chainName,
536
+ connected,
537
+ currentAccount,
538
+ icon,
539
+ onConnect: onConnectLocal,
540
+ onRevoke: onRevokeLocal,
541
+ totalAccounts,
542
+ walletName: name,
543
+ walletRdns: rdns
544
+ },
545
+ cellName
546
+ )) });
547
+ };
519
548
 
520
549
  // src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
521
550
  import { useState } from "react";
522
- var useActiveProviderDialogState = /* @__PURE__ */ __name((setActiveProvider) => {
551
+ var useActiveProviderDialogState = (setActiveProvider) => {
523
552
  const [show, setShow] = useState(false);
524
- const onSetActiveProvider = /* @__PURE__ */ __name((activeProvider) => {
553
+ const onSetActiveProvider = (activeProvider) => {
525
554
  setShow(true);
526
555
  setActiveProvider(activeProvider);
527
- }, "onSetActiveProvider");
528
- const onClose = /* @__PURE__ */ __name(() => {
556
+ };
557
+ const onClose = () => {
529
558
  setShow(false);
530
559
  setActiveProvider({});
531
- }, "onClose");
532
- return [
533
- show,
534
- onSetActiveProvider,
535
- onClose
536
- ];
537
- }, "useActiveProviderDialogState");
560
+ };
561
+ return [show, onSetActiveProvider, onClose];
562
+ };
538
563
 
539
564
  // src/components/wallet/table/ConnectedWalletsTable.tsx
540
- var ConnectedWalletsTable = /* @__PURE__ */ __name(({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
565
+ import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
566
+ var ConnectedWalletsTable = ({
567
+ ignoreConnectDialog,
568
+ onIgnoreConnectDialog,
569
+ wallets,
570
+ ...props
571
+ }) => {
541
572
  const [activeProvider, setActiveProvider] = useState2();
542
573
  const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
543
574
  const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
544
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Table, props, /* @__PURE__ */ React12.createElement(TableHead, null, /* @__PURE__ */ React12.createElement(TableRow2, null, WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ React12.createElement(TableCell6, {
545
- align,
546
- key: id,
547
- padding: disablePadding ? "none" : "normal",
548
- width: width ?? "auto"
549
- }, label)))), /* @__PURE__ */ React12.createElement(TableBody, null, (wallets ?? []).map((wallet) => /* @__PURE__ */ React12.createElement(WalletConnectionsTableRow, {
550
- ignoreConnectDialog,
551
- key: wallet.providerInfo?.rdns,
552
- onConnectClick: onSetActiveProviderConnect,
553
- onRevoke: onSetActiveProviderRevoke,
554
- wallet
555
- })))), /* @__PURE__ */ React12.createElement(RevokeWalletConnectionDialog, {
556
- open: showRevoke,
557
- onClose: onRevokeClose,
558
- activeProvider
559
- }), /* @__PURE__ */ React12.createElement(ConnectWalletDialog, {
560
- activeProvider,
561
- onClose: onConnectClose,
562
- open: showConnect,
563
- onIgnoreConnectDialog
564
- }));
565
- }, "ConnectedWalletsTable");
575
+ return /* @__PURE__ */ jsxs8(Fragment, { children: [
576
+ /* @__PURE__ */ jsxs8(Table, { ...props, children: [
577
+ /* @__PURE__ */ jsx12(TableHead, { children: /* @__PURE__ */ jsx12(TableRow2, { children: WalletsTableHeadCells.map(({
578
+ disablePadding,
579
+ id,
580
+ label,
581
+ align,
582
+ width
583
+ }) => /* @__PURE__ */ jsx12(TableCell6, { align, padding: disablePadding ? "none" : "normal", width: width ?? "auto", children: label }, id)) }) }),
584
+ /* @__PURE__ */ jsx12(TableBody, { children: (wallets ?? []).map((wallet) => /* @__PURE__ */ jsx12(
585
+ WalletConnectionsTableRow,
586
+ {
587
+ ignoreConnectDialog,
588
+ onConnectClick: onSetActiveProviderConnect,
589
+ onRevoke: onSetActiveProviderRevoke,
590
+ wallet
591
+ },
592
+ wallet.providerInfo?.rdns
593
+ )) })
594
+ ] }),
595
+ /* @__PURE__ */ jsx12(RevokeWalletConnectionDialog, { open: showRevoke, onClose: onRevokeClose, activeProvider }),
596
+ /* @__PURE__ */ jsx12(
597
+ ConnectWalletDialog,
598
+ {
599
+ activeProvider,
600
+ onClose: onConnectClose,
601
+ open: showConnect,
602
+ onIgnoreConnectDialog
603
+ }
604
+ )
605
+ ] });
606
+ };
566
607
 
567
608
  // src/components/ConnectedAccountsFlexbox.tsx
568
- var ConnectedAccountsFlexbox = /* @__PURE__ */ __name(({ ref, ignoreConnectDialog, onIgnoreConnectDialog, ...props }) => {
609
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
610
+ var ConnectedAccountsFlexbox = ({
611
+ ref,
612
+ ignoreConnectDialog,
613
+ onIgnoreConnectDialog,
614
+ ...props
615
+ }) => {
569
616
  const theme = useTheme2();
570
617
  const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
571
- return /* @__PURE__ */ React13.createElement(FlexCol3, {
572
- alignItems: "stretch",
573
- justifyContent: "start",
574
- gap: 2,
575
- ref,
576
- ...props
577
- }, /* @__PURE__ */ React13.createElement(FlexCol3, {
578
- alignItems: "start"
579
- }, /* @__PURE__ */ React13.createElement(Typography6, {
580
- variant: "h2",
581
- sx: {
582
- mb: 0.5
583
- }
584
- }, "Detected Web3 Wallets"), totalConnectedAccounts ? /* @__PURE__ */ React13.createElement(Typography6, {
585
- variant: "subtitle1",
586
- color: theme.vars.palette.secondary.main,
587
- sx: {
588
- opacity: 0.5
589
- }
590
- }, "Total Connected Accounts:", " ", totalConnectedAccounts) : null), /* @__PURE__ */ React13.createElement(ConnectedWalletsTable, {
591
- wallets: sortedWallets,
592
- ignoreConnectDialog,
593
- onIgnoreConnectDialog
594
- }));
595
- }, "ConnectedAccountsFlexbox");
618
+ return /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "stretch", justifyContent: "start", gap: 2, ref, ...props, children: [
619
+ /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "start", children: [
620
+ /* @__PURE__ */ jsx13(Typography6, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
621
+ totalConnectedAccounts ? /* @__PURE__ */ jsxs9(Typography6, { variant: "subtitle1", color: theme.vars.palette.secondary.main, sx: { opacity: 0.5 }, children: [
622
+ "Total Connected Accounts:",
623
+ " ",
624
+ totalConnectedAccounts
625
+ ] }) : null
626
+ ] }),
627
+ /* @__PURE__ */ jsx13(ConnectedWalletsTable, { wallets: sortedWallets, ignoreConnectDialog, onIgnoreConnectDialog })
628
+ ] });
629
+ };
596
630
  ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
597
631
  export {
598
632
  CheckboxFormControl,