@xyo-network/react-wallet 7.0.0 → 7.0.1

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 (21) hide show
  1. package/dist/browser/components/SeedPhrase/DefaultSeedPhrase.stories.d.ts +3 -3
  2. package/dist/browser/components/SeedPhrase/DefaultSeedPhrase.stories.d.ts.map +1 -1
  3. package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.stories.d.ts +1 -1
  4. package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.stories.d.ts.map +1 -1
  5. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.d.ts +3 -3
  6. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.d.ts.map +1 -1
  7. package/dist/browser/components/SeedPhrase/settings/SeedPhraseTableRow.stories.d.ts +2 -2
  8. package/dist/browser/components/SeedPhrase/settings/SeedPhraseTableRow.stories.d.ts.map +1 -1
  9. package/dist/browser/components/WalletAccountDetails/WalletAccountDetails.stories.d.ts +1 -1
  10. package/dist/browser/components/WalletAccountDetails/WalletAccountDetails.stories.d.ts.map +1 -1
  11. package/dist/browser/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.d.ts +1 -1
  12. package/dist/browser/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.d.ts.map +1 -1
  13. package/dist/browser/components/WalletAccountSelect/WalletAccountSelect.stories.d.ts +2 -2
  14. package/dist/browser/components/WalletAccountSelect/WalletAccountSelect.stories.d.ts.map +1 -1
  15. package/dist/browser/components/WalletAccountSelect/WalletAccountSelectBar.stories.d.ts +5 -5
  16. package/dist/browser/components/WalletAccountSelect/WalletAccountSelectBar.stories.d.ts.map +1 -1
  17. package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts +6 -6
  18. package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts.map +1 -1
  19. package/dist/browser/index.mjs +673 -572
  20. package/dist/browser/index.mjs.map +1 -1
  21. package/package.json +39 -36
@@ -1,34 +1,55 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/MaxAccounts/MaxAccountsTableRow.tsx
5
- import { ButtonGroup, TableCell, TableRow, Typography } from "@mui/material";
2
+ import {
3
+ ButtonGroup,
4
+ TableCell,
5
+ TableRow,
6
+ Typography
7
+ } from "@mui/material";
6
8
  import { ButtonEx } from "@xylabs/react-button";
7
- import React2, { useState } from "react";
9
+ import { useState } from "react";
8
10
 
9
11
  // src/components/MaxAccounts/OutOfBoundsSnackBar.tsx
10
- import { Alert, AlertTitle, Snackbar } from "@mui/material";
11
- import React from "react";
12
- var OutOfBoundsSnackBar = /* @__PURE__ */ __name(({ activeAccountIndex, desiredMaximumAccounts, setShowSnackBar, showSnackBar }) => {
13
- return /* @__PURE__ */ React.createElement(Snackbar, {
14
- anchorOrigin: {
15
- horizontal: "center",
16
- vertical: "top"
17
- },
18
- autoHideDuration: 5e3,
19
- onClose: /* @__PURE__ */ __name(() => setShowSnackBar?.(false), "onClose"),
20
- open: showSnackBar
21
- }, /* @__PURE__ */ React.createElement(Alert, {
22
- severity: "error",
23
- onClose: /* @__PURE__ */ __name(() => setShowSnackBar?.(false), "onClose")
24
- }, /* @__PURE__ */ React.createElement(AlertTitle, null, "Maximum Accounts Error"), "Your currently selected account number (", activeAccountIndex === void 0 ? "" : activeAccountIndex + 1, ") cannot be greater than the desired Maximum Accounts (", desiredMaximumAccounts, ")."));
25
- }, "OutOfBoundsSnackBar");
12
+ import {
13
+ Alert,
14
+ AlertTitle,
15
+ Snackbar
16
+ } from "@mui/material";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ var OutOfBoundsSnackBar = ({
19
+ activeAccountIndex,
20
+ desiredMaximumAccounts,
21
+ setShowSnackBar,
22
+ showSnackBar
23
+ }) => {
24
+ return /* @__PURE__ */ jsx(
25
+ Snackbar,
26
+ {
27
+ anchorOrigin: { horizontal: "center", vertical: "top" },
28
+ autoHideDuration: 5e3,
29
+ onClose: () => setShowSnackBar?.(false),
30
+ open: showSnackBar,
31
+ children: /* @__PURE__ */ jsxs(Alert, { severity: "error", onClose: () => setShowSnackBar?.(false), children: [
32
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Maximum Accounts Error" }),
33
+ "Your currently selected account number (",
34
+ activeAccountIndex === void 0 ? "" : activeAccountIndex + 1,
35
+ ") cannot be greater than the desired Maximum Accounts (",
36
+ desiredMaximumAccounts,
37
+ ")."
38
+ ] })
39
+ }
40
+ );
41
+ };
26
42
 
27
43
  // src/components/MaxAccounts/MaxAccountsTableRow.tsx
28
- var MaxAccountsTableRow = /* @__PURE__ */ __name(({ activeAccountIndex, changeMaxAccounts, maxAccounts }) => {
44
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
45
+ var MaxAccountsTableRow = ({
46
+ activeAccountIndex,
47
+ changeMaxAccounts,
48
+ maxAccounts
49
+ }) => {
29
50
  const [desiredMaximumAccounts, setDesiredMaximumAccounts] = useState();
30
51
  const [showSnackBar, setShowSnackBar] = useState(false);
31
- const handleChangeMaxAccounts = /* @__PURE__ */ __name((change) => {
52
+ const handleChangeMaxAccounts = (change) => {
32
53
  if (maxAccounts !== void 0 && activeAccountIndex !== void 0) {
33
54
  switch (change) {
34
55
  case "decrease": {
@@ -53,58 +74,87 @@ var MaxAccountsTableRow = /* @__PURE__ */ __name(({ activeAccountIndex, changeMa
53
74
  } else {
54
75
  throw new Error("Max Accounts is unset and needs a default");
55
76
  }
56
- }, "handleChangeMaxAccounts");
57
- return /* @__PURE__ */ React2.createElement(TableRow, null, /* @__PURE__ */ React2.createElement(TableCell, null, "Maximum Accounts"), /* @__PURE__ */ React2.createElement(TableCell, {
58
- align: "center"
59
- }, /* @__PURE__ */ React2.createElement(Typography, {
60
- variant: "caption"
61
- }, maxAccounts)), /* @__PURE__ */ React2.createElement(TableCell, {
62
- align: "center"
63
- }, /* @__PURE__ */ React2.createElement(ButtonGroup, null, /* @__PURE__ */ React2.createElement(ButtonEx, {
64
- onClick: /* @__PURE__ */ __name(() => handleChangeMaxAccounts("decrease"), "onClick"),
65
- variant: "contained",
66
- size: "small"
67
- }, "-"), /* @__PURE__ */ React2.createElement(ButtonEx, {
68
- onClick: /* @__PURE__ */ __name(() => handleChangeMaxAccounts("increase"), "onClick"),
69
- variant: "contained",
70
- size: "small"
71
- }, "+")), /* @__PURE__ */ React2.createElement(OutOfBoundsSnackBar, {
72
- desiredMaximumAccounts,
73
- activeAccountIndex,
74
- setShowSnackBar,
75
- showSnackBar
76
- })));
77
- }, "MaxAccountsTableRow");
77
+ };
78
+ return /* @__PURE__ */ jsxs2(TableRow, { children: [
79
+ /* @__PURE__ */ jsx2(TableCell, { children: "Maximum Accounts" }),
80
+ /* @__PURE__ */ jsx2(TableCell, { align: "center", children: /* @__PURE__ */ jsx2(Typography, { variant: "caption", children: maxAccounts }) }),
81
+ /* @__PURE__ */ jsxs2(TableCell, { align: "center", children: [
82
+ /* @__PURE__ */ jsxs2(ButtonGroup, { children: [
83
+ /* @__PURE__ */ jsx2(ButtonEx, { onClick: () => handleChangeMaxAccounts("decrease"), variant: "contained", size: "small", children: "-" }),
84
+ /* @__PURE__ */ jsx2(ButtonEx, { onClick: () => handleChangeMaxAccounts("increase"), variant: "contained", size: "small", children: "+" })
85
+ ] }),
86
+ /* @__PURE__ */ jsx2(
87
+ OutOfBoundsSnackBar,
88
+ {
89
+ desiredMaximumAccounts,
90
+ activeAccountIndex,
91
+ setShowSnackBar,
92
+ showSnackBar
93
+ }
94
+ )
95
+ ] })
96
+ ] });
97
+ };
78
98
 
79
99
  // src/components/SeedPhrase/_shared/SeedPhraseIconButton.tsx
80
100
  import { HelpOutline as HelpOutlineIcon } from "@mui/icons-material";
81
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, Link, List, ListItem, Typography as Typography2 } from "@mui/material";
82
- import React3, { useState as useState2 } from "react";
83
- var SeedPhraseIconButton = /* @__PURE__ */ __name((props) => {
101
+ import {
102
+ Button,
103
+ Dialog,
104
+ DialogActions,
105
+ DialogContent,
106
+ DialogTitle,
107
+ IconButton,
108
+ Link,
109
+ List,
110
+ ListItem,
111
+ Typography as Typography2
112
+ } from "@mui/material";
113
+ import { useState as useState2 } from "react";
114
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
115
+ var SeedPhraseIconButton = (props) => {
84
116
  const [open, setOpen] = useState2(false);
85
- const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
86
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(IconButton, {
87
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick"),
88
- ...props
89
- }, /* @__PURE__ */ React3.createElement(HelpOutlineIcon, {
90
- fontSize: "small"
91
- })), /* @__PURE__ */ React3.createElement(Dialog, {
92
- open
93
- }, /* @__PURE__ */ React3.createElement(DialogTitle, null, "Understanding your Seed Phrase"), /* @__PURE__ */ React3.createElement(DialogContent, null, /* @__PURE__ */ React3.createElement(Typography2, null, "Your Seed Phrase should adhere to the", " ", /* @__PURE__ */ React3.createElement(Link, {
94
- target: "_blank",
95
- href: "https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki"
96
- }, "bip39 specification"), " ", "and is used to generate accounts which identify your data on the XYO Network."), /* @__PURE__ */ React3.createElement(List, null, /* @__PURE__ */ React3.createElement(ListItem, null, "Do not share this phrase with anyone."), /* @__PURE__ */ React3.createElement(ListItem, null, "Do not save it to a public computer."), /* @__PURE__ */ React3.createElement(ListItem, null, "Do not use a existing phrase from another wallet (i.e. Metamask)."), /* @__PURE__ */ React3.createElement(ListItem, null, "Do not use before copying it down somewhere safe."))), /* @__PURE__ */ React3.createElement(DialogActions, null, /* @__PURE__ */ React3.createElement(Button, {
97
- onClick: onClose,
98
- variant: "outlined"
99
- }, "OK"))));
100
- }, "SeedPhraseIconButton");
117
+ const onClose = () => setOpen(false);
118
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
119
+ /* @__PURE__ */ jsx3(IconButton, { onClick: () => setOpen(true), ...props, children: /* @__PURE__ */ jsx3(HelpOutlineIcon, { fontSize: "small" }) }),
120
+ /* @__PURE__ */ jsxs3(Dialog, { open, children: [
121
+ /* @__PURE__ */ jsx3(DialogTitle, { children: "Understanding your Seed Phrase" }),
122
+ /* @__PURE__ */ jsxs3(DialogContent, { children: [
123
+ /* @__PURE__ */ jsxs3(Typography2, { children: [
124
+ "Your Seed Phrase should adhere to the",
125
+ " ",
126
+ /* @__PURE__ */ jsx3(Link, { target: "_blank", href: "https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki", children: "bip39 specification" }),
127
+ " ",
128
+ "and is used to generate accounts which identify your data on the XYO Network."
129
+ ] }),
130
+ /* @__PURE__ */ jsxs3(List, { children: [
131
+ /* @__PURE__ */ jsx3(ListItem, { children: "Do not share this phrase with anyone." }),
132
+ /* @__PURE__ */ jsx3(ListItem, { children: "Do not save it to a public computer." }),
133
+ /* @__PURE__ */ jsx3(ListItem, { children: "Do not use a existing phrase from another wallet (i.e. Metamask)." }),
134
+ /* @__PURE__ */ jsx3(ListItem, { children: "Do not use before copying it down somewhere safe." })
135
+ ] })
136
+ ] }),
137
+ /* @__PURE__ */ jsx3(DialogActions, { children: /* @__PURE__ */ jsx3(Button, { onClick: onClose, variant: "outlined", children: "OK" }) })
138
+ ] })
139
+ ] });
140
+ };
101
141
 
102
142
  // src/components/SeedPhrase/DefaultSeedPhrase.tsx
103
- import { Alert as Alert2, AlertTitle as AlertTitle2, Snackbar as Snackbar2 } from "@mui/material";
143
+ import {
144
+ Alert as Alert2,
145
+ AlertTitle as AlertTitle2,
146
+ Snackbar as Snackbar2
147
+ } from "@mui/material";
104
148
  import { generateMnemonic } from "@scure/bip39";
105
149
  import { wordlist } from "@scure/bip39/wordlists/english";
106
- import React4, { useMemo, useState as useState3 } from "react";
107
- var DefaultSeedPhrase = /* @__PURE__ */ __name(({ changeSeedPhrase, children, hideDefaultSeedPhraseMessage, seedPhrase }) => {
150
+ import { useMemo, useState as useState3 } from "react";
151
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
152
+ var DefaultSeedPhrase = ({
153
+ changeSeedPhrase,
154
+ children,
155
+ hideDefaultSeedPhraseMessage,
156
+ seedPhrase
157
+ }) => {
108
158
  const [showSnackBar, setShowSnackBar] = useState3(false);
109
159
  useMemo(() => {
110
160
  if (!seedPhrase) {
@@ -112,26 +162,27 @@ var DefaultSeedPhrase = /* @__PURE__ */ __name(({ changeSeedPhrase, children, hi
112
162
  changeSeedPhrase?.(mnemonic);
113
163
  setShowSnackBar(true);
114
164
  }
115
- }, [
116
- changeSeedPhrase,
117
- seedPhrase
118
- ]);
119
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, hideDefaultSeedPhraseMessage ? null : /* @__PURE__ */ React4.createElement(Snackbar2, {
120
- open: showSnackBar,
121
- autoHideDuration: 5e3,
122
- onClose: /* @__PURE__ */ __name(() => setShowSnackBar(false), "onClose"),
123
- anchorOrigin: {
124
- horizontal: "center",
125
- vertical: "top"
126
- }
127
- }, /* @__PURE__ */ React4.createElement(Alert2, {
128
- severity: "success"
129
- }, /* @__PURE__ */ React4.createElement(AlertTitle2, null, "Default Seed Phrase Generated"), "Go to application settings to save it.")), children);
130
- }, "DefaultSeedPhrase");
165
+ }, [changeSeedPhrase, seedPhrase]);
166
+ return /* @__PURE__ */ jsxs4(Fragment2, { children: [
167
+ hideDefaultSeedPhraseMessage ? null : /* @__PURE__ */ jsx4(
168
+ Snackbar2,
169
+ {
170
+ open: showSnackBar,
171
+ autoHideDuration: 5e3,
172
+ onClose: () => setShowSnackBar(false),
173
+ anchorOrigin: { horizontal: "center", vertical: "top" },
174
+ children: /* @__PURE__ */ jsxs4(Alert2, { severity: "success", children: [
175
+ /* @__PURE__ */ jsx4(AlertTitle2, { children: "Default Seed Phrase Generated" }),
176
+ "Go to application settings to save it."
177
+ ] })
178
+ }
179
+ ),
180
+ children
181
+ ] });
182
+ };
131
183
 
132
184
  // src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx
133
185
  import { Button as Button2, DialogActions as DialogActions2 } from "@mui/material";
134
- import React7 from "react";
135
186
 
136
187
  // src/contexts/SeedPhrase/Context.ts
137
188
  import { createContextEx } from "@xylabs/react-shared";
@@ -141,25 +192,34 @@ var SeedPhraseContext = createContextEx();
141
192
  import { generateMnemonic as generateMnemonic2, validateMnemonic } from "@scure/bip39";
142
193
  import { wordlist as wordlist2 } from "@scure/bip39/wordlists/english";
143
194
  import { useResetState } from "@xylabs/react-hooks";
144
- import React5, { useCallback, useEffect, useMemo as useMemo2, useState as useState4 } from "react";
145
- var validate = /* @__PURE__ */ __name((passedPhrase) => {
195
+ import {
196
+ useCallback,
197
+ useEffect,
198
+ useMemo as useMemo2,
199
+ useState as useState4
200
+ } from "react";
201
+ import { jsx as jsx5 } from "react/jsx-runtime";
202
+ var validate = (passedPhrase) => {
146
203
  if (!passedPhrase) {
147
204
  return null;
148
205
  }
149
206
  return validateMnemonic(passedPhrase, wordlist2);
150
- }, "validate");
151
- var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, handleChangeSeedPhrase, saveCallback, seedPhrase, open }) => {
207
+ };
208
+ var SeedPhraseProvider = ({
209
+ children,
210
+ defaultPhrase,
211
+ handleChangeSeedPhrase,
212
+ saveCallback,
213
+ seedPhrase,
214
+ open
215
+ }) => {
152
216
  const [phrase, setPhrase] = useResetState(defaultPhrase);
153
217
  const [overwriteWarning, setOverwriteWarning] = useState4(false);
154
218
  useEffect(() => {
155
219
  if (seedPhrase || open) {
156
220
  setPhrase?.(seedPhrase ?? "");
157
221
  }
158
- }, [
159
- seedPhrase,
160
- open,
161
- setPhrase
162
- ]);
222
+ }, [seedPhrase, open, setPhrase]);
163
223
  const handleGenerate = useCallback(() => {
164
224
  const mnemonic = generateMnemonic2(wordlist2, 256);
165
225
  setPhrase?.(mnemonic);
@@ -167,16 +227,11 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
167
227
  }, []);
168
228
  const handleCancelOverwrite = useCallback(() => {
169
229
  setOverwriteWarning(false);
170
- }, [
171
- setOverwriteWarning
172
- ]);
230
+ }, [setOverwriteWarning]);
173
231
  const handleClear = useCallback(() => {
174
232
  setPhrase("");
175
233
  setOverwriteWarning(false);
176
- }, [
177
- setPhrase,
178
- setOverwriteWarning
179
- ]);
234
+ }, [setPhrase, setOverwriteWarning]);
180
235
  const handleSave = useCallback(() => {
181
236
  if (!overwriteWarning && seedPhrase && seedPhrase !== phrase) {
182
237
  setOverwriteWarning?.(true);
@@ -184,27 +239,14 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
184
239
  handleChangeSeedPhrase?.(phrase ?? "");
185
240
  saveCallback?.();
186
241
  }
187
- }, [
188
- handleChangeSeedPhrase,
189
- overwriteWarning,
190
- phrase,
191
- saveCallback,
192
- seedPhrase
193
- ]);
242
+ }, [handleChangeSeedPhrase, overwriteWarning, phrase, saveCallback, seedPhrase]);
194
243
  useEffect(() => {
195
244
  if (!open) {
196
245
  handleCancelOverwrite();
197
246
  }
198
- }, [
199
- handleCancelOverwrite,
200
- open
201
- ]);
202
- const validSeedPhrase = useMemo2(() => validate?.(seedPhrase), [
203
- seedPhrase
204
- ]);
205
- const validPhrase = useMemo2(() => validate?.(phrase), [
206
- phrase
207
- ]);
247
+ }, [handleCancelOverwrite, open]);
248
+ const validSeedPhrase = useMemo2(() => validate?.(seedPhrase), [seedPhrase]);
249
+ const validPhrase = useMemo2(() => validate?.(phrase), [phrase]);
208
250
  const value = useMemo2(() => ({
209
251
  handleCancelOverwrite,
210
252
  handleChangeSeedPhrase,
@@ -235,14 +277,18 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
235
277
  validSeedPhrase,
236
278
  validate
237
279
  ]);
238
- return /* @__PURE__ */ React5.createElement(SeedPhraseContext, {
239
- value
240
- }, children);
241
- }, "SeedPhraseProvider");
280
+ return /* @__PURE__ */ jsx5(
281
+ SeedPhraseContext,
282
+ {
283
+ value,
284
+ children
285
+ }
286
+ );
287
+ };
242
288
 
243
289
  // src/contexts/SeedPhrase/use.ts
244
290
  import { useContextEx } from "@xylabs/react-shared";
245
- var useSeedPhrase = /* @__PURE__ */ __name(() => useContextEx(SeedPhraseContext, "SeedPhrase", true), "useSeedPhrase");
291
+ var useSeedPhrase = () => useContextEx(SeedPhraseContext, "SeedPhrase", true);
246
292
 
247
293
  // src/contexts/Wallet/Context.ts
248
294
  import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
@@ -251,13 +297,16 @@ var WalletContext = createContextEx2();
251
297
  // src/contexts/Wallet/Provider.tsx
252
298
  import { useResetState as useResetState2 } from "@xylabs/react-hooks";
253
299
  import { usePromise } from "@xylabs/react-promise";
254
- import React6, { useMemo as useMemo3 } from "react";
255
- var WalletProvider = /* @__PURE__ */ __name(({ children, defaultActiveAccountIndex = 0, rootWallet = null, ...props }) => {
300
+ import { useMemo as useMemo3 } from "react";
301
+ import { jsx as jsx6 } from "react/jsx-runtime";
302
+ var WalletProvider = ({
303
+ children,
304
+ defaultActiveAccountIndex = 0,
305
+ rootWallet = null,
306
+ ...props
307
+ }) => {
256
308
  const [activeAccountIndex, setActiveAccountIndex] = useResetState2(defaultActiveAccountIndex);
257
- const [activeAccount = null] = usePromise(async () => await rootWallet?.derivePath(activeAccountIndex.toString()), [
258
- activeAccountIndex,
259
- rootWallet
260
- ]);
309
+ const [activeAccount = null] = usePromise(async () => await rootWallet?.derivePath(activeAccountIndex.toString()), [activeAccountIndex, rootWallet]);
261
310
  const value = useMemo3(() => ({
262
311
  activeAccount,
263
312
  activeAccountIndex,
@@ -270,74 +319,59 @@ var WalletProvider = /* @__PURE__ */ __name(({ children, defaultActiveAccountInd
270
319
  rootWallet,
271
320
  setActiveAccountIndex
272
321
  ]);
273
- return /* @__PURE__ */ React6.createElement(WalletContext, {
274
- value,
275
- ...props
276
- }, children);
277
- }, "WalletProvider");
322
+ return /* @__PURE__ */ jsx6(
323
+ WalletContext,
324
+ {
325
+ value,
326
+ ...props,
327
+ children
328
+ }
329
+ );
330
+ };
278
331
 
279
332
  // src/contexts/Wallet/use.ts
280
333
  import { usePromise as usePromise2 } from "@xylabs/react-promise";
281
334
  import { useContextEx as useContextEx2, useProvided } from "@xylabs/react-shared";
282
- var useWalletContext = /* @__PURE__ */ __name((required = true) => {
335
+ var useWalletContext = (required = true) => {
283
336
  return useContextEx2(WalletContext, "Wallet", required);
284
- }, "useWalletContext");
285
- var useWalletProvided = /* @__PURE__ */ __name(() => {
337
+ };
338
+ var useWalletProvided = () => {
286
339
  return useProvided(WalletContext);
287
- }, "useWalletProvided");
288
- var useRootWallet = /* @__PURE__ */ __name((required = true) => {
340
+ };
341
+ var useRootWallet = (required = true) => {
289
342
  const { rootWallet } = useWalletContext(required);
290
- return [
291
- rootWallet,
292
- void 0
293
- ];
294
- }, "useRootWallet");
295
- var useIndexedWalletFromContext = /* @__PURE__ */ __name((index, required = true) => {
343
+ return [rootWallet, void 0];
344
+ };
345
+ var useIndexedWalletFromContext = (index, required = true) => {
296
346
  const { rootWallet } = useWalletContext(required);
297
- const [wallet] = usePromise2(async () => await rootWallet?.derivePath(index.toString()) ?? rootWallet, [
298
- rootWallet,
299
- index
300
- ]);
301
- return [
302
- wallet,
303
- void 0
304
- ];
305
- }, "useIndexedWalletFromContext");
306
- var useSelectedWalletAccount = /* @__PURE__ */ __name((required = true) => {
347
+ const [wallet] = usePromise2(async () => await rootWallet?.derivePath(index.toString()) ?? rootWallet, [rootWallet, index]);
348
+ return [wallet, void 0];
349
+ };
350
+ var useSelectedWalletAccount = (required = true) => {
307
351
  const { activeAccountIndex } = useWalletContext(required);
308
352
  const [account] = useIndexedWalletFromContext(activeAccountIndex ?? 0, required);
309
- return activeAccountIndex === void 0 && account === null ? [
310
- null,
311
- void 0
312
- ] : [
313
- account,
314
- void 0
315
- ];
316
- }, "useSelectedWalletAccount");
353
+ return activeAccountIndex === void 0 && account === null ? [null, void 0] : [account, void 0];
354
+ };
317
355
 
318
356
  // src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx
319
- var DialogActionButtons = /* @__PURE__ */ __name(({ onClose, ...props }) => {
357
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
358
+ var DialogActionButtons = ({ onClose, ...props }) => {
320
359
  const { handleSave, setPhrase } = useSeedPhrase();
321
- const wrappedOnClose = /* @__PURE__ */ __name((e) => {
360
+ const wrappedOnClose = (e) => {
322
361
  setPhrase?.("");
323
362
  onClose?.(e, "escapeKeyDown");
324
- }, "wrappedOnClose");
325
- return /* @__PURE__ */ React7.createElement(DialogActions2, props, /* @__PURE__ */ React7.createElement(Button2, {
326
- variant: "outlined",
327
- onClick: wrappedOnClose
328
- }, "Cancel"), /* @__PURE__ */ React7.createElement(Button2, {
329
- type: "submit",
330
- variant: "contained",
331
- onClick: handleSave
332
- }, "Save"));
333
- }, "DialogActionButtons");
363
+ };
364
+ return /* @__PURE__ */ jsxs5(DialogActions2, { ...props, children: [
365
+ /* @__PURE__ */ jsx7(Button2, { variant: "outlined", onClick: wrappedOnClose, children: "Cancel" }),
366
+ /* @__PURE__ */ jsx7(Button2, { type: "submit", variant: "contained", onClick: handleSave, children: "Save" })
367
+ ] });
368
+ };
334
369
 
335
370
  // src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx
336
371
  import { FormControl, TextField } from "@mui/material";
337
- import React10 from "react";
338
372
 
339
373
  // src/components/SeedPhrase/dialog/components/fields/validation-messages/colorParser.ts
340
- var colorParser = /* @__PURE__ */ __name((conditional) => {
374
+ var colorParser = (conditional) => {
341
375
  switch (conditional) {
342
376
  case true: {
343
377
  return "success";
@@ -349,25 +383,27 @@ var colorParser = /* @__PURE__ */ __name((conditional) => {
349
383
  return;
350
384
  }
351
385
  }
352
- }, "colorParser");
386
+ };
353
387
 
354
388
  // src/components/SeedPhrase/dialog/components/fields/validation-messages/InvalidPhrase.tsx
355
389
  import { Link as Link2, Typography as Typography3 } from "@mui/material";
356
- import React8 from "react";
357
- var InvalidPhraseTypography = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React8.createElement(Typography3, {
358
- variant: "caption",
359
- color: "error",
360
- ...props
361
- }, "Invalid seed phrase. See -", " ", /* @__PURE__ */ React8.createElement(Link2, {
362
- target: "_blank",
363
- href: "https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki"
364
- }, "bip39 Proposal")), "InvalidPhraseTypography");
390
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
391
+ var InvalidPhraseTypography = (props) => /* @__PURE__ */ jsxs6(Typography3, { variant: "caption", color: "error", ...props, children: [
392
+ "Invalid seed phrase. See -",
393
+ " ",
394
+ /* @__PURE__ */ jsx8(Link2, { target: "_blank", href: "https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki", children: "bip39 Proposal" })
395
+ ] });
365
396
 
366
397
  // src/components/SeedPhrase/dialog/components/fields/validation-messages/PhraseHeaderBox.tsx
367
398
  import { CheckCircleOutline as CheckCircleOutlineIcon, HighlightOff as HighlightOffIcon } from "@mui/icons-material";
368
399
  import { FlexRow } from "@xylabs/react-flexbox";
369
- import React9, { useMemo as useMemo4 } from "react";
370
- var PhraseHeaderBox = /* @__PURE__ */ __name(({ children, conditional, ...props }) => {
400
+ import { useMemo as useMemo4 } from "react";
401
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
402
+ var PhraseHeaderBox = ({
403
+ children,
404
+ conditional,
405
+ ...props
406
+ }) => {
371
407
  const state = useMemo4(() => {
372
408
  switch (conditional) {
373
409
  case true: {
@@ -380,98 +416,118 @@ var PhraseHeaderBox = /* @__PURE__ */ __name(({ children, conditional, ...props
380
416
  return null;
381
417
  }
382
418
  }
383
- }, [
384
- conditional
385
- ]);
419
+ }, [conditional]);
386
420
  const Icon = useMemo4(() => {
387
421
  switch (state) {
388
422
  case "success": {
389
- return /* @__PURE__ */ React9.createElement(CheckCircleOutlineIcon, {
390
- fontSize: "small",
391
- color: "success"
392
- });
423
+ return /* @__PURE__ */ jsx9(CheckCircleOutlineIcon, { fontSize: "small", color: "success" });
393
424
  }
394
425
  case "error": {
395
- return /* @__PURE__ */ React9.createElement(HighlightOffIcon, {
396
- fontSize: "small",
397
- color: "error"
398
- });
426
+ return /* @__PURE__ */ jsx9(HighlightOffIcon, { fontSize: "small", color: "error" });
399
427
  }
400
428
  default: {
401
429
  return null;
402
430
  }
403
431
  }
404
- }, [
405
- state
406
- ]);
407
- return /* @__PURE__ */ React9.createElement(FlexRow, {
408
- justifyContent: "start",
409
- columnGap: 1,
410
- ...props
411
- }, Icon, children);
412
- }, "PhraseHeaderBox");
432
+ }, [state]);
433
+ return /* @__PURE__ */ jsxs7(FlexRow, { justifyContent: "start", columnGap: 1, ...props, children: [
434
+ Icon,
435
+ children
436
+ ] });
437
+ };
413
438
 
414
439
  // src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx
415
- var NewPhraseTextField = /* @__PURE__ */ __name(({ children, disableColor, ...props }) => {
416
- const { phrase, setPhrase, validPhrase } = useSeedPhrase();
417
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(FormControl, {
418
- fullWidth: true,
419
- size: "small",
420
- sx: {
421
- display: "flex",
422
- flexDirection: "column",
423
- rowGap: 1
440
+ import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
441
+ var NewPhraseTextField = ({
442
+ children,
443
+ disableColor,
444
+ ...props
445
+ }) => {
446
+ const {
447
+ phrase,
448
+ setPhrase,
449
+ validPhrase
450
+ } = useSeedPhrase();
451
+ return /* @__PURE__ */ jsx10(Fragment3, { children: /* @__PURE__ */ jsxs8(
452
+ FormControl,
453
+ {
454
+ fullWidth: true,
455
+ size: "small",
456
+ sx: {
457
+ display: "flex",
458
+ flexDirection: "column",
459
+ rowGap: 1
460
+ },
461
+ children: [
462
+ children,
463
+ /* @__PURE__ */ jsx10(
464
+ TextField,
465
+ {
466
+ focused: true,
467
+ color: disableColor ? void 0 : colorParser(validPhrase),
468
+ error: validPhrase === false,
469
+ helperText: validPhrase === false ? /* @__PURE__ */ jsx10(InvalidPhraseTypography, {}) : null,
470
+ fullWidth: true,
471
+ maxRows: Number.POSITIVE_INFINITY,
472
+ multiline: true,
473
+ onChange: (e) => setPhrase?.(e.target.value),
474
+ value: phrase,
475
+ ...props
476
+ }
477
+ )
478
+ ]
424
479
  }
425
- }, children, /* @__PURE__ */ React10.createElement(TextField, {
426
- focused: true,
427
- color: disableColor ? void 0 : colorParser(validPhrase),
428
- error: validPhrase === false,
429
- helperText: validPhrase === false ? /* @__PURE__ */ React10.createElement(InvalidPhraseTypography, null) : null,
430
- fullWidth: true,
431
- maxRows: Number.POSITIVE_INFINITY,
432
- multiline: true,
433
- onChange: /* @__PURE__ */ __name((e) => setPhrase?.(e.target.value), "onChange"),
434
- value: phrase,
435
- ...props
436
- })));
437
- }, "NewPhraseTextField");
480
+ ) });
481
+ };
438
482
 
439
483
  // src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.tsx
440
484
  import { Button as Button3, DialogActions as DialogActions3 } from "@mui/material";
441
- import React11 from "react";
442
- var PhraseDialogActions = /* @__PURE__ */ __name(({ hideClear, hideGenerate, ...props }) => {
443
- const { handleClear, handleGenerate, overwriteWarning } = useSeedPhrase();
444
- return /* @__PURE__ */ React11.createElement(DialogActions3, {
445
- sx: {
446
- justifyContent: "center"
447
- },
448
- ...props
449
- }, hideGenerate ? null : /* @__PURE__ */ React11.createElement(Button3, {
450
- disabled: overwriteWarning,
451
- variant: "contained",
452
- onClick: handleGenerate
453
- }, "Generate"), hideClear ? null : /* @__PURE__ */ React11.createElement(Button3, {
454
- variant: "outlined",
455
- onClick: handleClear
456
- }, "Clear"));
457
- }, "PhraseDialogActions");
485
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
486
+ var PhraseDialogActions = ({
487
+ hideClear,
488
+ hideGenerate,
489
+ ...props
490
+ }) => {
491
+ const {
492
+ handleClear,
493
+ handleGenerate,
494
+ overwriteWarning
495
+ } = useSeedPhrase();
496
+ return /* @__PURE__ */ jsxs9(DialogActions3, { sx: { justifyContent: "center" }, ...props, children: [
497
+ hideGenerate ? null : /* @__PURE__ */ jsx11(Button3, { disabled: overwriteWarning, variant: "contained", onClick: handleGenerate, children: "Generate" }),
498
+ hideClear ? null : /* @__PURE__ */ jsx11(Button3, { variant: "outlined", onClick: handleClear, children: "Clear" })
499
+ ] });
500
+ };
458
501
 
459
502
  // src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx
460
503
  import { ContentCopy } from "@mui/icons-material";
461
- import { Chip, FormControl as FormControl2, FormLabel, IconButton as IconButton2, TextField as TextField2, Tooltip, useTheme } from "@mui/material";
504
+ import {
505
+ Chip,
506
+ FormControl as FormControl2,
507
+ FormLabel,
508
+ IconButton as IconButton2,
509
+ TextField as TextField2,
510
+ Tooltip,
511
+ useTheme
512
+ } from "@mui/material";
462
513
  import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
463
- import React12, { useMemo as useMemo5, useState as useState5 } from "react";
464
- var SavedPhraseTextField = /* @__PURE__ */ __name(({ fullWidth, showCopyButton, showPhraseHeader, visible: visibleProp, ...props }) => {
514
+ import { useMemo as useMemo5, useState as useState5 } from "react";
515
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
516
+ var SavedPhraseTextField = ({
517
+ fullWidth,
518
+ showCopyButton,
519
+ showPhraseHeader,
520
+ visible: visibleProp,
521
+ ...props
522
+ }) => {
465
523
  const { validSeedPhrase, seedPhrase } = useSeedPhrase();
466
524
  const theme = useTheme();
467
525
  const [visible, setVisible] = useState5(visibleProp);
468
526
  useMemo5(() => {
469
527
  setVisible(visibleProp);
470
- }, [
471
- visibleProp
472
- ]);
528
+ }, [visibleProp]);
473
529
  const [copied, setCopied] = useState5(false);
474
- const onCopyPhrase = /* @__PURE__ */ __name(async () => {
530
+ const onCopyPhrase = async () => {
475
531
  if (seedPhrase) {
476
532
  try {
477
533
  await navigator.clipboard.writeText(seedPhrase);
@@ -481,164 +537,198 @@ var SavedPhraseTextField = /* @__PURE__ */ __name(({ fullWidth, showCopyButton,
481
537
  console.error("Error copying resolvedSelectedAddress to clipboard", e);
482
538
  }
483
539
  }
484
- }, "onCopyPhrase");
485
- return /* @__PURE__ */ React12.createElement(FormControl2, {
486
- fullWidth,
487
- size: "small",
488
- sx: {
489
- display: "flex",
490
- flexDirection: "column",
491
- rowGap: 1
492
- }
493
- }, /* @__PURE__ */ React12.createElement(FlexRow2, {
494
- gap: 0.5
495
- }, /* @__PURE__ */ React12.createElement(Chip, {
496
- label: "Show Seed Phrase",
497
- onClick: /* @__PURE__ */ __name(() => setVisible(!visible), "onClick"),
498
- // Margin is set to 2px to match the Copy Button size and remove jumping during animation
499
- sx: {
500
- alignSelf: "center",
501
- my: "2px"
502
- }
503
- }), /* @__PURE__ */ React12.createElement(Tooltip, {
504
- title: copied ? "Copied!" : "Copy"
505
- }, /* @__PURE__ */ React12.createElement(IconButton2, {
506
- onClick: /* @__PURE__ */ __name(() => void onCopyPhrase(), "onClick"),
507
- sx: {
508
- height: visible ? "auto" : 0,
509
- opacity: visible ? 1 : 0,
510
- overflow: "hidden",
511
- padding: visible ? theme.spacing(1) : 0,
512
- transition: "all .25s ease-in-out",
513
- width: visible ? "max-content" : 0
540
+ };
541
+ return /* @__PURE__ */ jsxs10(
542
+ FormControl2,
543
+ {
544
+ fullWidth,
545
+ size: "small",
546
+ sx: {
547
+ display: "flex",
548
+ flexDirection: "column",
549
+ rowGap: 1
550
+ },
551
+ children: [
552
+ /* @__PURE__ */ jsxs10(FlexRow2, { gap: 0.5, children: [
553
+ /* @__PURE__ */ jsx12(
554
+ Chip,
555
+ {
556
+ label: "Show Seed Phrase",
557
+ onClick: () => setVisible(!visible),
558
+ sx: { alignSelf: "center", my: "2px" }
559
+ }
560
+ ),
561
+ /* @__PURE__ */ jsx12(Tooltip, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ jsx12(
562
+ IconButton2,
563
+ {
564
+ onClick: () => void onCopyPhrase(),
565
+ sx: {
566
+ height: visible ? "auto" : 0,
567
+ opacity: visible ? 1 : 0,
568
+ overflow: "hidden",
569
+ padding: visible ? theme.spacing(1) : 0,
570
+ transition: "all .25s ease-in-out",
571
+ width: visible ? "max-content" : 0
572
+ },
573
+ children: /* @__PURE__ */ jsx12(ContentCopy, { fontSize: "small" })
574
+ }
575
+ ) })
576
+ ] }),
577
+ visible && showPhraseHeader ? /* @__PURE__ */ jsx12(FormLabel, { children: /* @__PURE__ */ jsx12(PhraseHeaderBox, { conditional: validSeedPhrase, children: "Saved Seed Phrase" }) }) : null,
578
+ /* @__PURE__ */ jsx12(
579
+ TextField2,
580
+ {
581
+ defaultValue: seedPhrase,
582
+ disabled: true,
583
+ error: validSeedPhrase === false,
584
+ helperText: validSeedPhrase === false ? /* @__PURE__ */ jsx12(InvalidPhraseTypography, {}) : null,
585
+ fullWidth: true,
586
+ maxRows: Number.POSITIVE_INFINITY,
587
+ multiline: true,
588
+ slotProps: {
589
+ input: {
590
+ style: {
591
+ height: visible ? "auto" : "0",
592
+ overflow: "hidden",
593
+ opacity: visible ? 1 : 0,
594
+ padding: visible ? theme.spacing(1) : 0,
595
+ transition: "all .25s ease-in-out"
596
+ }
597
+ }
598
+ },
599
+ ...props
600
+ }
601
+ )
602
+ ]
514
603
  }
515
- }, /* @__PURE__ */ React12.createElement(ContentCopy, {
516
- fontSize: "small"
517
- })))), visible && showPhraseHeader ? /* @__PURE__ */ React12.createElement(FormLabel, null, /* @__PURE__ */ React12.createElement(PhraseHeaderBox, {
518
- conditional: validSeedPhrase
519
- }, "Saved Seed Phrase")) : null, /* @__PURE__ */ React12.createElement(TextField2, {
520
- defaultValue: seedPhrase,
521
- disabled: true,
522
- error: validSeedPhrase === false,
523
- helperText: validSeedPhrase === false ? /* @__PURE__ */ React12.createElement(InvalidPhraseTypography, null) : null,
524
- fullWidth: true,
525
- maxRows: Number.POSITIVE_INFINITY,
526
- multiline: true,
527
- slotProps: {
528
- input: {
529
- style: {
530
- height: visible ? "auto" : "0",
531
- overflow: "hidden",
532
- opacity: visible ? 1 : 0,
533
- padding: visible ? theme.spacing(1) : 0,
534
- transition: "all .25s ease-in-out"
535
- }
536
- }
537
- },
538
- ...props
539
- }));
540
- }, "SavedPhraseTextField");
604
+ );
605
+ };
541
606
 
542
607
  // src/components/SeedPhrase/dialog/components/OverwriteWarning.tsx
543
608
  import { Alert as Alert3, Button as Button4 } from "@mui/material";
544
609
  import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
545
- import React13 from "react";
546
- var OverwriteWarning = /* @__PURE__ */ __name(() => {
610
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
611
+ var OverwriteWarning = () => {
547
612
  const { handleCancelOverwrite, handleSave } = useSeedPhrase();
548
- return /* @__PURE__ */ React13.createElement(Alert3, {
549
- variant: "outlined",
550
- severity: "warning",
551
- action: /* @__PURE__ */ React13.createElement(FlexRow3, {
552
- sx: {
553
- columnGap: 1
554
- }
555
- }, /* @__PURE__ */ React13.createElement(Button4, {
556
- variant: "outlined",
557
- color: "inherit",
558
- size: "small",
559
- onClick: handleSave
560
- }, "Overwrite"), /* @__PURE__ */ React13.createElement(Button4, {
613
+ return /* @__PURE__ */ jsx13(
614
+ Alert3,
615
+ {
561
616
  variant: "outlined",
562
- color: "inherit",
563
- size: "small",
564
- onClick: handleCancelOverwrite
565
- }, "Cancel"))
566
- }, "Are you sure you want to overwrite existing seed phrase? This action cannot be undone.");
567
- }, "OverwriteWarning");
617
+ severity: "warning",
618
+ action: /* @__PURE__ */ jsxs11(FlexRow3, { sx: { columnGap: 1 }, children: [
619
+ /* @__PURE__ */ jsx13(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleSave, children: "Overwrite" }),
620
+ /* @__PURE__ */ jsx13(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleCancelOverwrite, children: "Cancel" })
621
+ ] }),
622
+ children: "Are you sure you want to overwrite existing seed phrase? This action cannot be undone."
623
+ }
624
+ );
625
+ };
568
626
 
569
627
  // src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx
570
- import { Dialog as Dialog2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, FormLabel as FormLabel2 } from "@mui/material";
571
- import React14 from "react";
572
- var SeedPhraseDialog = /* @__PURE__ */ __name(({ changeSeedPhrase, dialogTitle = "Update Your Seed Phrase", seedPhrase, seedPhraseTextFieldTitle = "New Seed Phrase", ...props }) => {
573
- return /* @__PURE__ */ React14.createElement(SeedPhraseProvider, {
574
- seedPhrase,
575
- handleChangeSeedPhrase: changeSeedPhrase,
576
- open: props.open,
577
- saveCallback: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "saveCallback")
578
- }, /* @__PURE__ */ React14.createElement(SeedPhraseDialogInner, {
579
- dialogTitle,
580
- seedPhraseTextFieldTitle,
581
- ...props
582
- }));
583
- }, "SeedPhraseDialog");
584
- var SeedPhraseDialogInner = /* @__PURE__ */ __name(({ dialogTitle, seedPhraseTextFieldTitle, showCopyButton, ...props }) => {
585
- const { overwriteWarning, seedPhrase, validPhrase } = useSeedPhrase();
586
- return /* @__PURE__ */ React14.createElement(Dialog2, {
587
- "aria-labelledby": "alert-dialog-title",
588
- "aria-describedby": "alert-dialog-description",
589
- fullWidth: true,
590
- maxWidth: "sm",
591
- ...props
592
- }, /* @__PURE__ */ React14.createElement(DialogTitle2, {
593
- id: "alert-dialog-title",
594
- sx: {
595
- alignItems: "center",
596
- display: "inline-flex",
597
- flexDirection: "row"
598
- }
599
- }, dialogTitle, /* @__PURE__ */ React14.createElement(SeedPhraseIconButton, null)), /* @__PURE__ */ React14.createElement(DialogContent2, {
600
- sx: {
601
- display: "flex",
602
- flexDirection: "column",
603
- rowGap: 2
628
+ import {
629
+ Dialog as Dialog2,
630
+ DialogContent as DialogContent2,
631
+ DialogTitle as DialogTitle2,
632
+ FormLabel as FormLabel2
633
+ } from "@mui/material";
634
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
635
+ var SeedPhraseDialog = ({
636
+ changeSeedPhrase,
637
+ dialogTitle = "Update Your Seed Phrase",
638
+ seedPhrase,
639
+ seedPhraseTextFieldTitle = "New Seed Phrase",
640
+ ...props
641
+ }) => {
642
+ return /* @__PURE__ */ jsx14(
643
+ SeedPhraseProvider,
644
+ {
645
+ seedPhrase,
646
+ handleChangeSeedPhrase: changeSeedPhrase,
647
+ open: props.open,
648
+ saveCallback: () => props.onClose?.({}, "escapeKeyDown"),
649
+ children: /* @__PURE__ */ jsx14(SeedPhraseDialogInner, { dialogTitle, seedPhraseTextFieldTitle, ...props })
604
650
  }
605
- }, /* @__PURE__ */ React14.createElement(NewPhraseTextField, null, /* @__PURE__ */ React14.createElement(FormLabel2, null, /* @__PURE__ */ React14.createElement(PhraseHeaderBox, {
606
- conditional: validPhrase
607
- }, seedPhraseTextFieldTitle))), /* @__PURE__ */ React14.createElement(PhraseDialogActions, null), seedPhrase ? /* @__PURE__ */ React14.createElement(SavedPhraseTextField, {
608
- showCopyButton
609
- }) : null, overwriteWarning ? /* @__PURE__ */ React14.createElement(OverwriteWarning, null) : null), /* @__PURE__ */ React14.createElement(DialogActionButtons, {
610
- onClose: props.onClose
611
- }));
612
- }, "SeedPhraseDialogInner");
651
+ );
652
+ };
653
+ var SeedPhraseDialogInner = ({
654
+ dialogTitle,
655
+ seedPhraseTextFieldTitle,
656
+ showCopyButton,
657
+ ...props
658
+ }) => {
659
+ const {
660
+ overwriteWarning,
661
+ seedPhrase,
662
+ validPhrase
663
+ } = useSeedPhrase();
664
+ return /* @__PURE__ */ jsxs12(Dialog2, { "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", fullWidth: true, maxWidth: "sm", ...props, children: [
665
+ /* @__PURE__ */ jsxs12(
666
+ DialogTitle2,
667
+ {
668
+ id: "alert-dialog-title",
669
+ sx: {
670
+ alignItems: "center",
671
+ display: "inline-flex",
672
+ flexDirection: "row"
673
+ },
674
+ children: [
675
+ dialogTitle,
676
+ /* @__PURE__ */ jsx14(SeedPhraseIconButton, {})
677
+ ]
678
+ }
679
+ ),
680
+ /* @__PURE__ */ jsxs12(
681
+ DialogContent2,
682
+ {
683
+ sx: {
684
+ display: "flex",
685
+ flexDirection: "column",
686
+ rowGap: 2
687
+ },
688
+ children: [
689
+ /* @__PURE__ */ jsx14(NewPhraseTextField, { children: /* @__PURE__ */ jsx14(FormLabel2, { children: /* @__PURE__ */ jsx14(PhraseHeaderBox, { conditional: validPhrase, children: seedPhraseTextFieldTitle }) }) }),
690
+ /* @__PURE__ */ jsx14(PhraseDialogActions, {}),
691
+ seedPhrase ? /* @__PURE__ */ jsx14(SavedPhraseTextField, { showCopyButton }) : null,
692
+ overwriteWarning ? /* @__PURE__ */ jsx14(OverwriteWarning, {}) : null
693
+ ]
694
+ }
695
+ ),
696
+ /* @__PURE__ */ jsx14(DialogActionButtons, { onClose: props.onClose })
697
+ ] });
698
+ };
613
699
 
614
700
  // src/components/SeedPhrase/settings/SeedPhraseTableRow.tsx
615
701
  import { Cancel as CancelIcon, RadioButtonChecked as RadioButtonCheckedIcon } from "@mui/icons-material";
616
- import { Button as Button5, ButtonGroup as ButtonGroup2, TableCell as TableCell2, TableRow as TableRow2 } from "@mui/material";
617
- import React15, { useState as useState6 } from "react";
618
- var SeedPhraseTableRow = /* @__PURE__ */ __name(({ changeSeedPhrase, seedPhrase, ...props }) => {
702
+ import {
703
+ Button as Button5,
704
+ ButtonGroup as ButtonGroup2,
705
+ TableCell as TableCell2,
706
+ TableRow as TableRow2
707
+ } from "@mui/material";
708
+ import { useState as useState6 } from "react";
709
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
710
+ var SeedPhraseTableRow = ({
711
+ changeSeedPhrase,
712
+ seedPhrase,
713
+ ...props
714
+ }) => {
619
715
  const [open, setOpen] = useState6(false);
620
- const handleOpen = /* @__PURE__ */ __name(() => {
716
+ const handleOpen = () => {
621
717
  setOpen(true);
622
- }, "handleOpen");
623
- return /* @__PURE__ */ React15.createElement(TableRow2, props, /* @__PURE__ */ React15.createElement(TableCell2, null, "Seed Phrase", " ", /* @__PURE__ */ React15.createElement(SeedPhraseIconButton, null)), /* @__PURE__ */ React15.createElement(TableCell2, {
624
- align: "center"
625
- }, seedPhrase ? /* @__PURE__ */ React15.createElement(RadioButtonCheckedIcon, {
626
- color: "success"
627
- }) : /* @__PURE__ */ React15.createElement(CancelIcon, {
628
- color: "error"
629
- })), /* @__PURE__ */ React15.createElement(TableCell2, null, /* @__PURE__ */ React15.createElement(SeedPhraseDialog, {
630
- changeSeedPhrase,
631
- open,
632
- onClose: /* @__PURE__ */ __name(() => setOpen(false), "onClose"),
633
- seedPhrase
634
- }), /* @__PURE__ */ React15.createElement(ButtonGroup2, {
635
- fullWidth: true
636
- }, /* @__PURE__ */ React15.createElement(Button5, {
637
- variant: "contained",
638
- size: "small",
639
- onClick: handleOpen
640
- }, "Update"))));
641
- }, "SeedPhraseTableRow");
718
+ };
719
+ return /* @__PURE__ */ jsxs13(TableRow2, { ...props, children: [
720
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
721
+ "Seed Phrase",
722
+ " ",
723
+ /* @__PURE__ */ jsx15(SeedPhraseIconButton, {})
724
+ ] }),
725
+ /* @__PURE__ */ jsx15(TableCell2, { align: "center", children: seedPhrase ? /* @__PURE__ */ jsx15(RadioButtonCheckedIcon, { color: "success" }) : /* @__PURE__ */ jsx15(CancelIcon, { color: "error" }) }),
726
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
727
+ /* @__PURE__ */ jsx15(SeedPhraseDialog, { changeSeedPhrase, open, onClose: () => setOpen(false), seedPhrase }),
728
+ /* @__PURE__ */ jsx15(ButtonGroup2, { fullWidth: true, children: /* @__PURE__ */ jsx15(Button5, { variant: "contained", size: "small", onClick: handleOpen, children: "Update" }) })
729
+ ] })
730
+ ] });
731
+ };
642
732
 
643
733
  // src/components/WalletAccountDetails/WalletAccountDetails.tsx
644
734
  import { EthAddressWrapper } from "@xylabs/eth-address";
@@ -646,12 +736,16 @@ import { EthAccountButton } from "@xylabs/react-crypto";
646
736
  import { FlexCol, FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
647
737
  import { NumberStatus } from "@xylabs/react-number-status";
648
738
  import { useNetwork } from "@xyo-network/react-network";
649
- import React16 from "react";
650
739
 
651
740
  // src/hooks/useAccount.ts
652
741
  import { usePromise as usePromise3 } from "@xylabs/react-promise";
653
742
  import { useState as useState7 } from "react";
654
- var useAccount = /* @__PURE__ */ __name(({ wallet, account, index, required = false } = {}) => {
743
+ var useAccount = ({
744
+ wallet,
745
+ account,
746
+ index,
747
+ required = false
748
+ } = {}) => {
655
749
  const walletContextProvided = useWalletProvided();
656
750
  const [validationError, setValidationError] = useState7();
657
751
  if (wallet && account && !validationError) {
@@ -679,13 +773,7 @@ var useAccount = /* @__PURE__ */ __name(({ wallet, account, index, required = fa
679
773
  console.error(error2.message);
680
774
  setError(error2);
681
775
  }
682
- }, [
683
- index,
684
- wallet,
685
- rootWallet,
686
- activeAccountIndex,
687
- validationError
688
- ]);
776
+ }, [index, wallet, rootWallet, activeAccountIndex, validationError]);
689
777
  if (validationError && !error) {
690
778
  console.error(validationError.message);
691
779
  setError(validationError);
@@ -694,13 +782,19 @@ var useAccount = /* @__PURE__ */ __name(({ wallet, account, index, required = fa
694
782
  error ? void 0 : account ?? activeAccount ?? walletContextProvided ? null : void 0,
695
783
  error
696
784
  ];
697
- }, "useAccount");
785
+ };
698
786
 
699
787
  // src/hooks/useWallet.ts
700
788
  import { usePromise as usePromise4 } from "@xylabs/react-promise";
701
789
  import { HDWallet } from "@xyo-network/wallet";
702
790
  import { useState as useState8 } from "react";
703
- var useWallet = /* @__PURE__ */ __name(({ mnemonic, wallet, path, required = false, seed } = {}) => {
791
+ var useWallet = ({
792
+ mnemonic,
793
+ wallet,
794
+ path,
795
+ required = false,
796
+ seed
797
+ } = {}) => {
704
798
  const walletContextProvided = useWalletContext(false);
705
799
  const [error, setError] = useState8();
706
800
  const [contextAccount] = useSelectedWalletAccount(!wallet && required);
@@ -720,35 +814,21 @@ var useWallet = /* @__PURE__ */ __name(({ mnemonic, wallet, path, required = fal
720
814
  } catch (ex) {
721
815
  setError(ex);
722
816
  }
723
- }, [
724
- mnemonic,
725
- contextAccount,
726
- seed,
727
- path,
728
- wallet
729
- ]);
730
- return [
731
- activeAccount ?? (walletContextProvided ? null : activeAccount),
732
- error
733
- ];
734
- }, "useWallet");
817
+ }, [mnemonic, contextAccount, seed, path, wallet]);
818
+ return [activeAccount ?? (walletContextProvided ? null : activeAccount), error];
819
+ };
735
820
 
736
821
  // src/hooks/useWallets.ts
737
822
  import { usePromise as usePromise5 } from "@xylabs/react-promise";
738
- var useWallets = /* @__PURE__ */ __name(({ wallet, paths }) => {
823
+ var useWallets = ({ wallet, paths }) => {
739
824
  const walletContextProvided = useWalletContext(false);
740
- const [foundWallet] = useWallet({
741
- wallet
742
- });
743
- const [wallets, error] = usePromise5(async () => foundWallet ? await Promise.all(paths.map((path) => foundWallet.derivePath(path))) : void 0, [
744
- foundWallet,
745
- paths
746
- ]);
747
- return [
748
- wallets ?? (walletContextProvided ? null : wallets),
749
- error
750
- ];
751
- }, "useWallets");
825
+ const [foundWallet] = useWallet({ wallet });
826
+ const [wallets, error] = usePromise5(
827
+ async () => foundWallet ? await Promise.all(paths.map((path) => foundWallet.derivePath(path))) : void 0,
828
+ [foundWallet, paths]
829
+ );
830
+ return [wallets ?? (walletContextProvided ? null : wallets), error];
831
+ };
752
832
 
753
833
  // src/hooks/useWrapperAccount.ts
754
834
  import { usePromise as usePromise6 } from "@xylabs/react-promise";
@@ -756,7 +836,7 @@ import { HDWallet as HDWallet2 } from "@xyo-network/wallet";
756
836
  import { Mutex } from "async-mutex";
757
837
  var globalWrapperWallet;
758
838
  var globalWrapperWalletMutex = new Mutex();
759
- var useWrapperAccount = /* @__PURE__ */ __name((account) => {
839
+ var useWrapperAccount = (account) => {
760
840
  return usePromise6(async () => {
761
841
  return await globalWrapperWalletMutex.runExclusive(async () => {
762
842
  if (account !== void 0) {
@@ -774,166 +854,187 @@ var useWrapperAccount = /* @__PURE__ */ __name((account) => {
774
854
  }
775
855
  return globalWrapperWallet;
776
856
  });
777
- }, [
778
- account
779
- ]);
780
- }, "useWrapperAccount");
857
+ }, [account]);
858
+ };
781
859
 
782
860
  // src/components/WalletAccountDetails/WalletAccountDetails.tsx
783
- var WalletAccountDetails = /* @__PURE__ */ __name(({ exploreUrl = "https://explore.xyo.network", account, ...props }) => {
784
- const [accountToUse] = useAccount({
785
- account
786
- });
861
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
862
+ var WalletAccountDetails = ({
863
+ exploreUrl = "https://explore.xyo.network",
864
+ account,
865
+ ...props
866
+ }) => {
867
+ const [accountToUse] = useAccount({ account });
787
868
  const { network } = useNetwork();
788
869
  const exploreAddressUrl = `${exploreUrl}/recent?account=${accountToUse?.address}&network=${network?.name ?? "main"}`;
789
- return /* @__PURE__ */ React16.createElement(FlexCol, props, /* @__PURE__ */ React16.createElement(EthAccountButton, {
790
- address: EthAddressWrapper.fromString(accountToUse?.address)
791
- }), /* @__PURE__ */ React16.createElement(FlexRow4, {
792
- gap: 1
793
- }, /* @__PURE__ */ React16.createElement(NumberStatus, {
794
- rounded: true,
795
- title: "Tokens",
796
- value: 0,
797
- to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`,
798
- target: "_blank"
799
- }), /* @__PURE__ */ React16.createElement(NumberStatus, {
800
- rounded: true,
801
- title: "NFTs",
802
- value: 0,
803
- to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`,
804
- target: "_blank"
805
- }), /* @__PURE__ */ React16.createElement(NumberStatus, {
806
- rounded: true,
807
- title: "Signatures",
808
- value: 0,
809
- to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`,
810
- target: "_blank"
811
- }), /* @__PURE__ */ React16.createElement(NumberStatus, {
812
- rounded: true,
813
- title: "Signins",
814
- value: 0,
815
- to: `${exploreAddressUrl}&schema=network.xyo.account.signins`,
816
- target: "_blank"
817
- })));
818
- }, "WalletAccountDetails");
870
+ return /* @__PURE__ */ jsxs14(FlexCol, { ...props, children: [
871
+ /* @__PURE__ */ jsx16(EthAccountButton, { address: EthAddressWrapper.fromString(accountToUse?.address) }),
872
+ /* @__PURE__ */ jsxs14(FlexRow4, { gap: 1, children: [
873
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Tokens", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`, target: "_blank" }),
874
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "NFTs", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`, target: "_blank" }),
875
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signatures", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`, target: "_blank" }),
876
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signins", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signins`, target: "_blank" })
877
+ ] })
878
+ ] });
879
+ };
819
880
 
820
881
  // src/components/WalletAccountSelect/Select.tsx
821
882
  import { CircularProgress, MenuItem as MenuItem2 } from "@mui/material";
822
883
  import { SelectEx } from "@xylabs/react-select";
823
884
  import { AddressRenderRowBox as AddressRenderRowBox2 } from "@xyo-network/react-address-render";
824
- import React18 from "react";
825
885
 
826
886
  // src/components/WalletAccountSelect/RenderedMenuItem.tsx
827
887
  import { MenuItem } from "@mui/material";
828
888
  import { AddressRenderRowBox } from "@xyo-network/react-address-render";
829
- import React17 from "react";
830
- var RenderedAccountMenuItem = /* @__PURE__ */ __name(({ selectedAccountIndex, rootWallet, addressNames, iconOnly, iconSize, icons, showFavorite }) => {
831
- const [selectedAccount] = useWallet({
832
- path: selectedAccountIndex?.toString(),
833
- wallet: rootWallet
834
- });
889
+ import { jsx as jsx17 } from "react/jsx-runtime";
890
+ var RenderedAccountMenuItem = ({
891
+ selectedAccountIndex,
892
+ rootWallet,
893
+ addressNames,
894
+ iconOnly,
895
+ iconSize,
896
+ icons,
897
+ showFavorite
898
+ }) => {
899
+ const [selectedAccount] = useWallet({ path: selectedAccountIndex?.toString(), wallet: rootWallet });
835
900
  const customName = selectedAccount ? addressNames?.[selectedAccount.address] : void 0;
836
901
  const favorite = !!selectedAccount && selectedAccount.address in (addressNames ?? {});
837
- return /* @__PURE__ */ React17.createElement(MenuItem, {
838
- value: selectedAccountIndex,
839
- sx: {
840
- minHeight: 0,
841
- paddingBottom: 0,
842
- paddingTop: 0
843
- }
844
- }, /* @__PURE__ */ React17.createElement(AddressRenderRowBox, {
845
- disableSharedRef: true,
846
- flexGrow: 1,
847
- address: selectedAccount?.address,
848
- iconOnly,
849
- iconSize,
850
- icons,
851
- name: customName,
852
- favorite,
853
- showFavorite
854
- }));
855
- }, "RenderedAccountMenuItem");
856
-
857
- // src/components/WalletAccountSelect/Select.tsx
858
- var arrayRange = /* @__PURE__ */ __name((length, start = 0) => {
859
- return [
860
- ...Array.from({
861
- length
862
- }).keys()
863
- ].map((x) => x + start);
864
- }, "arrayRange");
865
- var WalletAccountSelect = /* @__PURE__ */ __name(({ addressNames, iconOnly, iconSize = 24, icons, maxAccounts = 1, showFavorite = false, size, variant = "outlined", ...props }) => {
866
- const { activeAccountIndex, setActiveAccountIndex, rootWallet } = useWalletContext();
867
- const disabled = !rootWallet || activeAccountIndex === void 0;
868
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, rootWallet ? /* @__PURE__ */ React18.createElement(SelectEx, {
869
- margin: "dense",
870
- disabled,
871
- renderValue: /* @__PURE__ */ __name((selectedAccountIndex) => {
872
- return /* @__PURE__ */ React18.createElement(RenderedAccountMenuItem, {
873
- addressNames,
874
- iconOnly,
875
- iconSize,
876
- icons,
877
- rootWallet,
878
- selectedAccountIndex,
879
- showFavorite
880
- });
881
- }, "renderValue"),
882
- value: activeAccountIndex === void 0 ? "" : activeAccountIndex,
883
- onChange: /* @__PURE__ */ __name((event) => setActiveAccountIndex?.(Number.parseInt(`${event.target.value}`)), "onChange"),
884
- size,
885
- variant,
886
- ...props
887
- }, rootWallet && arrayRange(maxAccounts).map((index) => {
888
- const [account] = useWallet({
889
- path: index.toString(),
890
- wallet: rootWallet
891
- });
892
- const customName = account ? addressNames?.[account.address] : void 0;
893
- const favorite = !!account && account.address in (addressNames ?? {});
894
- return /* @__PURE__ */ React18.createElement(MenuItem2, {
895
- key: account?.address,
896
- value: index,
902
+ return /* @__PURE__ */ jsx17(
903
+ MenuItem,
904
+ {
905
+ value: selectedAccountIndex,
897
906
  sx: {
898
907
  minHeight: 0,
899
908
  paddingBottom: 0,
900
909
  paddingTop: 0
901
- }
902
- }, /* @__PURE__ */ React18.createElement(AddressRenderRowBox2, {
903
- disableSharedRef: true,
904
- flexGrow: 1,
905
- address: account?.address,
906
- favorite,
907
- iconOnly,
908
- iconSize,
909
- icons,
910
- name: customName,
911
- showFavorite
912
- }));
913
- })) : /* @__PURE__ */ React18.createElement(CircularProgress, {
914
- size: 24
915
- }));
916
- }, "WalletAccountSelect");
910
+ },
911
+ children: /* @__PURE__ */ jsx17(
912
+ AddressRenderRowBox,
913
+ {
914
+ disableSharedRef: true,
915
+ flexGrow: 1,
916
+ address: selectedAccount?.address,
917
+ iconOnly,
918
+ iconSize,
919
+ icons,
920
+ name: customName,
921
+ favorite,
922
+ showFavorite
923
+ }
924
+ )
925
+ }
926
+ );
927
+ };
928
+
929
+ // src/components/WalletAccountSelect/Select.tsx
930
+ import { Fragment as Fragment4, jsx as jsx18 } from "react/jsx-runtime";
931
+ var arrayRange = (length, start = 0) => {
932
+ return [...Array.from({ length }).keys()].map((x) => x + start);
933
+ };
934
+ var WalletAccountSelect = ({
935
+ addressNames,
936
+ iconOnly,
937
+ iconSize = 24,
938
+ icons,
939
+ maxAccounts = 1,
940
+ showFavorite = false,
941
+ size,
942
+ variant = "outlined",
943
+ ...props
944
+ }) => {
945
+ const {
946
+ activeAccountIndex,
947
+ setActiveAccountIndex,
948
+ rootWallet
949
+ } = useWalletContext();
950
+ const disabled = !rootWallet || activeAccountIndex === void 0;
951
+ return /* @__PURE__ */ jsx18(Fragment4, { children: rootWallet ? /* @__PURE__ */ jsx18(
952
+ SelectEx,
953
+ {
954
+ margin: "dense",
955
+ disabled,
956
+ renderValue: (selectedAccountIndex) => {
957
+ return /* @__PURE__ */ jsx18(
958
+ RenderedAccountMenuItem,
959
+ {
960
+ addressNames,
961
+ iconOnly,
962
+ iconSize,
963
+ icons,
964
+ rootWallet,
965
+ selectedAccountIndex,
966
+ showFavorite
967
+ }
968
+ );
969
+ },
970
+ value: activeAccountIndex === void 0 ? "" : activeAccountIndex,
971
+ onChange: (event) => setActiveAccountIndex?.(Number.parseInt(`${event.target.value}`)),
972
+ size,
973
+ variant,
974
+ ...props,
975
+ children: rootWallet && arrayRange(maxAccounts).map((index) => {
976
+ const [account] = useWallet({ path: index.toString(), wallet: rootWallet });
977
+ const customName = account ? addressNames?.[account.address] : void 0;
978
+ const favorite = !!account && account.address in (addressNames ?? {});
979
+ return /* @__PURE__ */ jsx18(
980
+ MenuItem2,
981
+ {
982
+ value: index,
983
+ sx: {
984
+ minHeight: 0,
985
+ paddingBottom: 0,
986
+ paddingTop: 0
987
+ },
988
+ children: /* @__PURE__ */ jsx18(
989
+ AddressRenderRowBox2,
990
+ {
991
+ disableSharedRef: true,
992
+ flexGrow: 1,
993
+ address: account?.address,
994
+ favorite,
995
+ iconOnly,
996
+ iconSize,
997
+ icons,
998
+ name: customName,
999
+ showFavorite
1000
+ }
1001
+ )
1002
+ },
1003
+ account?.address
1004
+ );
1005
+ })
1006
+ }
1007
+ ) : /* @__PURE__ */ jsx18(CircularProgress, { size: 24 }) });
1008
+ };
917
1009
 
918
1010
  // src/components/WalletAccountSelect/SelectBar.tsx
919
1011
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
920
- import React19 from "react";
921
- var WalletAccountSelectBar = /* @__PURE__ */ __name(({ addressNames, iconOnly, iconSize, icons, maxAccounts = 1, showFavorite = false, size = "small", ...props }) => {
922
- return /* @__PURE__ */ React19.createElement(FlexCol2, {
923
- alignItems: "stretch",
924
- ...props
925
- }, /* @__PURE__ */ React19.createElement(WalletAccountSelect, {
926
- addressNames,
927
- fullWidth: true,
928
- showFavorite,
929
- iconSize,
930
- iconOnly,
931
- icons,
932
- maxAccounts,
933
- size: size ?? "small",
934
- variant: "outlined"
935
- }));
936
- }, "WalletAccountSelectBar");
1012
+ import { jsx as jsx19 } from "react/jsx-runtime";
1013
+ var WalletAccountSelectBar = ({
1014
+ addressNames,
1015
+ iconOnly,
1016
+ iconSize,
1017
+ icons,
1018
+ maxAccounts = 1,
1019
+ showFavorite = false,
1020
+ size = "small",
1021
+ ...props
1022
+ }) => {
1023
+ return /* @__PURE__ */ jsx19(FlexCol2, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx19(
1024
+ WalletAccountSelect,
1025
+ {
1026
+ addressNames,
1027
+ fullWidth: true,
1028
+ showFavorite,
1029
+ iconSize,
1030
+ iconOnly,
1031
+ icons,
1032
+ maxAccounts,
1033
+ size: size ?? "small",
1034
+ variant: "outlined"
1035
+ }
1036
+ ) });
1037
+ };
937
1038
  export {
938
1039
  DefaultSeedPhrase,
939
1040
  DialogActionButtons,