@provablehq/aleo-wallet-adaptor-react-ui 0.3.0-alpha.1 → 0.3.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ var WalletIcon = ({ wallet, ...props }) => {
87
87
  return wallet && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
88
88
  "img",
89
89
  {
90
- style: { borderRadius: "50%" },
90
+ style: { borderRadius: "22%" },
91
91
  src: wallet.adapter.icon,
92
92
  alt: `${wallet.adapter.name} icon`,
93
93
  ...props
@@ -110,7 +110,7 @@ var WalletConnectButton = ({
110
110
  const handleClick = (0, import_react2.useCallback)(
111
111
  (event) => {
112
112
  if (onClick) onClick(event);
113
- if (!event.defaultPrevented) connect(network || import_aleo_types.Network.TESTNET3).catch(() => {
113
+ if (!event.defaultPrevented) connect(network || import_aleo_types.Network.TESTNET).catch(() => {
114
114
  });
115
115
  },
116
116
  [onClick, connect]
@@ -216,62 +216,15 @@ var WalletListItem = ({ handleClick, tabIndex, wallet }) => {
216
216
  ] }) });
217
217
  };
218
218
 
219
- // src/AleoIcon.tsx
220
- var import_jsx_runtime6 = require("react/jsx-runtime");
221
- var AleoIcon = () => {
222
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
223
- "svg",
224
- {
225
- xmlns: "http://www.w3.org/2000/svg",
226
- width: "216",
227
- height: "80",
228
- viewBox: "0 0 216 80",
229
- fill: "none",
230
- children: [
231
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M73.426 0V8.93824H81.6842V78.8961H90.6045V0H73.426Z", fill: "#F5F5F5" }),
232
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
233
- "path",
234
- {
235
- d: "M154.145 51.4216C154.145 32.5518 143.683 21.297 127.604 21.297C111.526 21.297 100.954 32.0007 100.954 50.8687C100.954 69.7367 111.415 80 127.604 80C140.378 80 149.96 72.6061 152.603 62.3447H142.692C140.488 67.0902 135.975 71.2829 127.604 71.2829C116.812 71.2829 111.307 64.4419 110.205 54.6209H154.145V51.4216ZM110.316 46.125C111.636 36.6357 117.364 29.9035 127.604 29.9035C137.845 29.9035 143.242 36.5251 144.564 46.125H110.316Z",
236
- fill: "#F5F5F5"
237
- }
238
- ),
239
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
240
- "path",
241
- {
242
- d: "M189.272 21.297C173.083 21.297 162.622 32.0007 162.622 50.8687C162.622 69.7367 173.083 80 189.272 80C205.461 80 215.812 70.0684 215.812 50.8687C215.812 31.669 205.351 21.297 189.272 21.297ZM189.272 71.5041C177.709 71.5041 171.432 62.4553 171.432 50.76C171.432 39.0647 177.709 29.6842 189.272 29.6842C200.836 29.6842 207.003 38.8436 207.003 50.76C207.003 62.6764 200.946 71.5041 189.272 71.5041Z",
243
- fill: "#F5F5F5"
244
- }
245
- ),
246
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
247
- "path",
248
- {
249
- d: "M46.5565 0H28.3849L12.6134 46.125H22.2179L34.9933 8.49593H39.6189L52.3925 46.125H22.2179L19.2457 54.6209H55.2561L63.5143 78.8961H73.426L46.5565 0Z",
250
- fill: "#F5F5F5"
251
- }
252
- ),
253
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
254
- "path",
255
- {
256
- d: "M1.40508 78.8961H10.9857L19.2457 54.6209L9.7074 54.6209L1.40508 78.8961Z",
257
- fill: "#F5F5F5"
258
- }
259
- ),
260
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3.0935 46.125L0.1875 54.6209H9.7074L12.6134 46.125H3.0935Z", fill: "#F5F5F5" })
261
- ]
262
- }
263
- );
264
- };
265
-
266
219
  // src/WalletModal.tsx
267
220
  var import_aleo_wallet_adaptor_react2 = require("@provablehq/aleo-wallet-adaptor-react");
268
221
  var import_aleo_wallet_standard2 = require("@provablehq/aleo-wallet-standard");
269
222
  var import_aleo_types2 = require("@provablehq/aleo-types");
270
223
 
271
224
  // src/ProvableLogo.tsx
272
- var import_jsx_runtime7 = require("react/jsx-runtime");
225
+ var import_jsx_runtime6 = require("react/jsx-runtime");
273
226
  var ProvableLogo = () => {
274
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
227
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
275
228
  "svg",
276
229
  {
277
230
  width: "115",
@@ -279,69 +232,69 @@ var ProvableLogo = () => {
279
232
  viewBox: "0 0 115 18",
280
233
  fill: "none",
281
234
  xmlns: "http://www.w3.org/2000/svg",
282
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("g", { opacity: "0.88", children: [
283
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
235
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", { opacity: "0.88", children: [
236
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
284
237
  "path",
285
238
  {
286
239
  d: "M0 3.89265C0 2.29508 1.29508 1 2.89265 1H13.1073C14.7048 1 15.9999 2.29508 15.9999 3.89265V14.1074C15.9999 15.7049 14.7049 17 13.1073 17H10.4926C10.0937 17 9.7702 16.6766 9.7702 16.2776V8.67463C9.7702 7.87665 9.12331 7.22976 8.32533 7.22976H0.722439C0.323447 7.22976 0 6.90631 0 6.50732L0 3.89265Z",
287
- fill: "#0B0605"
240
+ fill: "currentColor"
288
241
  }
289
242
  ),
290
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
243
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
291
244
  "path",
292
245
  {
293
246
  d: "M6.22973 12.2151C6.22973 11.4171 5.58284 10.7702 4.78485 10.7702H0.722439C0.323447 10.7702 0 11.0937 0 11.4927L0 14.1074C0 15.7049 1.29508 17 2.89265 17H5.50729C5.90628 17 6.22973 16.6766 6.22973 16.2776V12.2151Z",
294
- fill: "#0B0605"
247
+ fill: "currentColor"
295
248
  }
296
249
  ),
297
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
250
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
298
251
  "path",
299
252
  {
300
253
  d: "M108.725 17.272C105.098 17.272 102.695 14.7107 102.695 10.88C102.695 7.04935 105.098 4.48802 108.725 4.48802C112.85 4.48802 115.275 7.52535 114.686 11.968H106.118C106.39 13.6453 107.319 14.5973 108.793 14.5973C110.039 14.5973 110.901 14.0533 111.263 13.056H114.663C114.006 15.7533 111.898 17.272 108.725 17.272ZM106.118 9.70135H111.467C111.195 8.04668 110.266 7.16268 108.793 7.16268C107.342 7.16268 106.413 8.06935 106.118 9.70135Z",
301
- fill: "#0B0605"
254
+ fill: "currentColor"
302
255
  }
303
256
  ),
304
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M98.3672 17V0.317363L101.699 0.0453644V17H98.3672Z", fill: "#0B0605" }),
305
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
257
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M98.3672 17V0.317363L101.699 0.0453644V17H98.3672Z", fill: "currentColor" }),
258
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
306
259
  "path",
307
260
  {
308
261
  d: "M84.9072 17V0.317363L88.2392 0.0453644V6.50535H88.3752C89.1232 5.21336 90.3246 4.55602 92.0245 4.55602C95.2432 4.55602 97.3512 7.07202 97.3512 10.88C97.3512 14.688 95.2432 17.2267 92.0245 17.2267C90.3246 17.2267 89.1232 16.5693 88.3752 15.2547H88.2392V17H84.9072ZM91.0952 7.32135C89.3726 7.32135 88.2392 8.72668 88.2392 10.88C88.2392 13.056 89.3726 14.4613 91.0952 14.4613C92.8405 14.4613 93.9512 13.056 93.9512 10.88C93.9512 8.72668 92.8405 7.32135 91.0952 7.32135Z",
309
- fill: "#0B0605"
262
+ fill: "currentColor"
310
263
  }
311
264
  ),
312
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
265
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
313
266
  "path",
314
267
  {
315
268
  d: "M76.3143 17.1813C73.9117 17.1813 72.3477 15.6853 72.3477 13.3733C72.3477 11.4013 73.685 10.1093 76.0423 9.83735L79.2836 9.47468C79.8956 9.38401 80.1903 9.11201 80.1903 8.61335C80.1903 7.68402 79.4876 7.11735 78.3543 7.11735C77.221 7.11735 76.4503 7.68402 76.3143 8.61335H72.8917C73.141 6.05202 75.249 4.48802 78.3996 4.48802C81.641 4.48802 83.5223 6.09735 83.5223 8.88535V17H80.1903V15.4133H80.0543C79.4423 16.456 77.9236 17.1813 76.3143 17.1813ZM77.4023 14.5973C78.8303 14.5973 80.1903 13.3507 80.1903 11.9V11.4693C80.0316 11.5827 79.8503 11.628 79.6236 11.6507L77.1983 11.9227C76.3143 12.0133 75.8157 12.4893 75.8157 13.2373C75.8157 14.076 76.4276 14.5973 77.4023 14.5973Z",
316
- fill: "#0B0605"
269
+ fill: "currentColor"
317
270
  }
318
271
  ),
319
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
272
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
320
273
  "path",
321
274
  {
322
275
  d: "M64.509 17L60.1797 4.76003H63.5117L66.549 13.94H66.685L69.6997 4.76003H72.873L68.5437 17H64.509Z",
323
- fill: "#0B0605"
276
+ fill: "currentColor"
324
277
  }
325
278
  ),
326
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
279
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
327
280
  "path",
328
281
  {
329
282
  d: "M54.3613 17.272C50.6666 17.272 48.1279 14.6653 48.1279 10.88C48.1279 7.09468 50.6666 4.48802 54.3613 4.48802C58.0559 4.48802 60.5946 7.09468 60.5946 10.88C60.5946 14.6653 58.0559 17.272 54.3613 17.272ZM54.3613 14.5067C56.1519 14.5067 57.2399 13.1467 57.2399 10.88C57.2399 8.61335 56.1519 7.25335 54.3613 7.25335C52.5706 7.25335 51.4826 8.61335 51.4826 10.88C51.4826 13.1467 52.5706 14.5067 54.3613 14.5067Z",
330
- fill: "#0B0605"
283
+ fill: "currentColor"
331
284
  }
332
285
  ),
333
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
286
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
334
287
  "path",
335
288
  {
336
289
  d: "M40.0801 17V4.76002H43.4121V6.23335H43.5481C43.9561 5.10002 44.8401 4.48802 46.1094 4.48802H47.8094L48.0814 7.93335H45.6561C44.2054 7.93335 43.4121 8.56802 43.4121 9.74668V17H40.0801Z",
337
- fill: "#0B0605"
290
+ fill: "currentColor"
338
291
  }
339
292
  ),
340
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
293
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
341
294
  "path",
342
295
  {
343
296
  d: "M26.3848 17V0.99736H33.0261C36.6981 0.99736 39.0554 3.08269 39.0554 6.34668C39.0554 9.63334 36.6981 11.764 33.0261 11.764H29.8754V17H26.3848ZM33.0261 8.72668C34.5674 8.72668 35.5647 7.82002 35.5647 6.41468C35.5647 5.00935 34.5674 4.10269 33.0261 4.10269H29.8754V8.72668H33.0261Z",
344
- fill: "#0B0605"
297
+ fill: "currentColor"
345
298
  }
346
299
  )
347
300
  ] })
@@ -350,7 +303,7 @@ var ProvableLogo = () => {
350
303
  };
351
304
 
352
305
  // src/WalletModal.tsx
353
- var import_jsx_runtime8 = require("react/jsx-runtime");
306
+ var import_jsx_runtime7 = require("react/jsx-runtime");
354
307
  var WalletModal = ({
355
308
  className = "",
356
309
  container = "body",
@@ -382,8 +335,7 @@ var WalletModal = ({
382
335
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
383
336
  installedWallets[0]
384
337
  ) : wallets.find(
385
- (wallet2) => wallet2.adapter.name === "Puzzle Wallet"
386
- // TODO: Add Provable Wallet
338
+ (wallet2) => wallet2.adapter.name.toLowerCase().includes("shield")
387
339
  ) || wallets.find(
388
340
  (wallet2) => wallet2.readyState === import_aleo_wallet_standard2.WalletReadyState.LOADABLE
389
341
  ) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -449,13 +401,13 @@ var WalletModal = ({
449
401
  (0, import_react4.useLayoutEffect)(() => setPortal(document.querySelector(container)), [container]);
450
402
  (0, import_react4.useLayoutEffect)(() => {
451
403
  if (wallet) {
452
- connect(network || import_aleo_types2.Network.TESTNET3).catch((e) => {
404
+ connect(network || import_aleo_types2.Network.TESTNET).catch((e) => {
453
405
  console.error({ e });
454
406
  });
455
407
  }
456
408
  }, [wallet]);
457
409
  return portal && (0, import_react_dom.createPortal)(
458
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
410
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
459
411
  "div",
460
412
  {
461
413
  "aria-labelledby": "wallet-adapter-modal-title",
@@ -464,12 +416,12 @@ var WalletModal = ({
464
416
  ref,
465
417
  role: "dialog",
466
418
  children: [
467
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "wallet-adapter-modal-container", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "wallet-adapter-modal-wrapper", children: [
468
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { onClick: handleClose, className: "wallet-adapter-modal-button-close", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "14", height: "14", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z" }) }) }),
469
- installedWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
470
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "wallet-adapter-modal-title", children: "Connect an Aleo wallet" }),
471
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("ul", { className: "wallet-adapter-modal-list", children: [
472
- installedWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
419
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "wallet-adapter-modal-container", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "wallet-adapter-modal-wrapper", children: [
420
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: handleClose, className: "wallet-adapter-modal-button-close", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { width: "14", height: "14", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z" }) }) }),
421
+ installedWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
422
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "wallet-adapter-modal-title", children: "Connect an Aleo wallet" }),
423
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("ul", { className: "wallet-adapter-modal-list", children: [
424
+ installedWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
473
425
  WalletListItem,
474
426
  {
475
427
  handleClick: (event) => handleWalletClick(event, wallet2.adapter.name),
@@ -477,7 +429,7 @@ var WalletModal = ({
477
429
  },
478
430
  wallet2.adapter.name
479
431
  )),
480
- otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Collapse, { expanded, id: "wallet-adapter-modal-collapse", children: otherWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
432
+ otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Collapse, { expanded, id: "wallet-adapter-modal-collapse", children: otherWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
481
433
  WalletListItem,
482
434
  {
483
435
  handleClick: (event) => handleWalletClick(event, wallet2.adapter.name),
@@ -487,18 +439,18 @@ var WalletModal = ({
487
439
  wallet2.adapter.name
488
440
  )) }) : null
489
441
  ] }),
490
- otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
442
+ otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
491
443
  "button",
492
444
  {
493
445
  className: "wallet-adapter-modal-list-more",
494
446
  onClick: handleCollapseClick,
495
447
  tabIndex: 0,
496
448
  children: [
497
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
449
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
498
450
  expanded ? "Less " : "More ",
499
451
  "options"
500
452
  ] }),
501
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
453
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
502
454
  "svg",
503
455
  {
504
456
  width: "13",
@@ -506,39 +458,36 @@ var WalletModal = ({
506
458
  viewBox: "0 0 13 7",
507
459
  xmlns: "http://www.w3.org/2000/svg",
508
460
  className: `${expanded ? "wallet-adapter-modal-list-more-icon-rotate" : ""}`,
509
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z" })
461
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z" })
510
462
  }
511
463
  )
512
464
  ]
513
465
  }
514
466
  ) : null
515
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
516
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "wallet-adapter-modal-title", children: "Get an Aleo wallet to continue" }),
517
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "wallet-adapter-modal-middle", children: [
518
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AleoIcon, {}),
519
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
520
- "button",
521
- {
522
- type: "button",
523
- className: "wallet-adapter-modal-middle-button",
524
- onClick: (event) => handleWalletClick(event, getStartedWallet.adapter.name),
525
- children: "Get started"
526
- }
527
- )
528
- ] }),
529
- otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
530
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
467
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
468
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "wallet-adapter-modal-title", children: "Get an Aleo wallet to continue" }),
469
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "wallet-adapter-modal-middle", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
470
+ "button",
471
+ {
472
+ type: "button",
473
+ className: "wallet-adapter-modal-middle-button",
474
+ onClick: (event) => handleWalletClick(event, getStartedWallet.adapter.name),
475
+ children: "Get started"
476
+ }
477
+ ) }),
478
+ otherWallets.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
479
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
531
480
  "button",
532
481
  {
533
482
  className: "wallet-adapter-modal-list-more",
534
483
  onClick: handleCollapseClick,
535
484
  tabIndex: 0,
536
485
  children: [
537
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
486
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
538
487
  expanded ? "Hide " : "View other ",
539
488
  "options"
540
489
  ] }),
541
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
490
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
542
491
  "svg",
543
492
  {
544
493
  width: "13",
@@ -546,13 +495,13 @@ var WalletModal = ({
546
495
  viewBox: "0 0 13 7",
547
496
  xmlns: "http://www.w3.org/2000/svg",
548
497
  className: `${expanded ? "wallet-adapter-modal-list-more-icon-rotate" : ""}`,
549
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z" })
498
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z" })
550
499
  }
551
500
  )
552
501
  ]
553
502
  }
554
503
  ),
555
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Collapse, { expanded, id: "wallet-adapter-modal-collapse", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "wallet-adapter-modal-list", children: otherWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
504
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Collapse, { expanded, id: "wallet-adapter-modal-collapse", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "wallet-adapter-modal-list", children: otherWallets.map((wallet2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
556
505
  WalletListItem,
557
506
  {
558
507
  handleClick: (event) => handleWalletClick(event, wallet2.adapter.name),
@@ -563,18 +512,18 @@ var WalletModal = ({
563
512
  )) }) })
564
513
  ] }) : null
565
514
  ] }),
566
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
515
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
567
516
  "a",
568
517
  {
569
518
  className: "wallet-adapter-modal-footer",
570
519
  href: "https://provable.com/",
571
520
  target: "_blank",
572
521
  rel: "noopener noreferrer",
573
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProvableLogo, {})
522
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ProvableLogo, {})
574
523
  }
575
524
  )
576
525
  ] }) }),
577
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "wallet-adapter-modal-overlay", onMouseDown: handleClose })
526
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "wallet-adapter-modal-overlay", onMouseDown: handleClose })
578
527
  ]
579
528
  }
580
529
  ),
@@ -584,7 +533,7 @@ var WalletModal = ({
584
533
 
585
534
  // src/WalletModalButton.tsx
586
535
  var import_react5 = require("react");
587
- var import_jsx_runtime9 = require("react/jsx-runtime");
536
+ var import_jsx_runtime8 = require("react/jsx-runtime");
588
537
  var WalletModalButton = ({
589
538
  children = "Connect Wallet",
590
539
  onClick,
@@ -598,15 +547,15 @@ var WalletModalButton = ({
598
547
  },
599
548
  [onClick, setVisible, visible]
600
549
  );
601
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { className: "wallet-adapter-button-trigger", onClick: handleClick, ...props, children });
550
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { className: "wallet-adapter-button-trigger", onClick: handleClick, ...props, children });
602
551
  };
603
552
 
604
553
  // src/WalletModalProvider.tsx
605
554
  var import_react6 = require("react");
606
- var import_jsx_runtime10 = require("react/jsx-runtime");
555
+ var import_jsx_runtime9 = require("react/jsx-runtime");
607
556
  var WalletModalProvider = ({ children, ...props }) => {
608
557
  const [visible, setVisible] = (0, import_react6.useState)(false);
609
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
558
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
610
559
  WalletModalContext.Provider,
611
560
  {
612
561
  value: {
@@ -615,7 +564,7 @@ var WalletModalProvider = ({ children, ...props }) => {
615
564
  },
616
565
  children: [
617
566
  children,
618
- visible && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(WalletModal, { ...props })
567
+ visible && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(WalletModal, { ...props })
619
568
  ]
620
569
  }
621
570
  );
@@ -624,7 +573,7 @@ var WalletModalProvider = ({ children, ...props }) => {
624
573
  // src/WalletDisconnectButton.tsx
625
574
  var import_react7 = require("react");
626
575
  var import_aleo_wallet_adaptor_react3 = require("@provablehq/aleo-wallet-adaptor-react");
627
- var import_jsx_runtime11 = require("react/jsx-runtime");
576
+ var import_jsx_runtime10 = require("react/jsx-runtime");
628
577
  var WalletDisconnectButton = ({
629
578
  children,
630
579
  disabled,
@@ -646,12 +595,12 @@ var WalletDisconnectButton = ({
646
595
  if (wallet) return "Disconnect";
647
596
  return "Disconnect Wallet";
648
597
  }, [children, disconnecting, wallet]);
649
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
598
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
650
599
  Button,
651
600
  {
652
601
  className: "wallet-adapter-button-trigger",
653
602
  disabled: disabled || !wallet,
654
- startIcon: wallet ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(WalletIcon, { wallet }) : void 0,
603
+ startIcon: wallet ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(WalletIcon, { wallet }) : void 0,
655
604
  onClick: handleClick,
656
605
  ...props,
657
606
  children: content
@@ -664,8 +613,8 @@ var import_react8 = require("react");
664
613
  var import_aleo_wallet_adaptor_react4 = require("@provablehq/aleo-wallet-adaptor-react");
665
614
 
666
615
  // src/icons.tsx
667
- var import_jsx_runtime12 = require("react/jsx-runtime");
668
- var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
616
+ var import_jsx_runtime11 = require("react/jsx-runtime");
617
+ var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
669
618
  "svg",
670
619
  {
671
620
  xmlns: "http://www.w3.org/2000/svg",
@@ -678,12 +627,12 @@ var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
678
627
  strokeLinecap: "round",
679
628
  strokeLinejoin: "round",
680
629
  children: [
681
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
682
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
630
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
631
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
683
632
  ]
684
633
  }
685
634
  );
686
- var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
635
+ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
687
636
  "svg",
688
637
  {
689
638
  xmlns: "http://www.w3.org/2000/svg",
@@ -695,10 +644,10 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
695
644
  strokeWidth: "2",
696
645
  strokeLinecap: "round",
697
646
  strokeLinejoin: "round",
698
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M20 6 9 17l-5-5" })
647
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M20 6 9 17l-5-5" })
699
648
  }
700
649
  );
701
- var GenericWalletIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
650
+ var GenericWalletIcon = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
702
651
  "svg",
703
652
  {
704
653
  xmlns: "http://www.w3.org/2000/svg",
@@ -711,14 +660,14 @@ var GenericWalletIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
711
660
  strokeLinecap: "round",
712
661
  strokeLinejoin: "round",
713
662
  children: [
714
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }),
715
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" })
663
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }),
664
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" })
716
665
  ]
717
666
  }
718
667
  );
719
668
 
720
669
  // src/WalletMultiButton.tsx
721
- var import_jsx_runtime13 = require("react/jsx-runtime");
670
+ var import_jsx_runtime12 = require("react/jsx-runtime");
722
671
  var WalletMultiButton = ({ children, ...props }) => {
723
672
  const { address, wallet, disconnect } = (0, import_aleo_wallet_adaptor_react4.useWallet)();
724
673
  const { setVisible } = useWalletModal();
@@ -765,22 +714,22 @@ var WalletMultiButton = ({ children, ...props }) => {
765
714
  document.removeEventListener("touchstart", listener);
766
715
  };
767
716
  }, [ref, closeDropdown]);
768
- if (!wallet) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WalletModalButton, { ...props, children });
769
- if (!base58) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WalletConnectButton, { ...props, children });
770
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "wallet-adapter-dropdown", children: [
771
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
717
+ if (!wallet) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WalletModalButton, { ...props, children });
718
+ if (!base58) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WalletConnectButton, { ...props, children });
719
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "wallet-adapter-dropdown", children: [
720
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
772
721
  Button,
773
722
  {
774
723
  "aria-expanded": active,
775
724
  className: "wallet-adapter-button-trigger",
776
725
  style: { pointerEvents: active ? "none" : "auto", ...props.style },
777
726
  onClick: openDropdown,
778
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WalletIcon, { wallet }),
727
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WalletIcon, { wallet }),
779
728
  ...props,
780
729
  children: content
781
730
  }
782
731
  ),
783
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
732
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
784
733
  "ul",
785
734
  {
786
735
  "aria-label": "dropdown-list",
@@ -788,18 +737,18 @@ var WalletMultiButton = ({ children, ...props }) => {
788
737
  ref,
789
738
  role: "menu",
790
739
  children: [
791
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { onClick: copyAddress, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
740
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { onClick: copyAddress, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
792
741
  "Copied",
793
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckIcon, {})
794
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
742
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckIcon, {})
743
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
795
744
  "Copy address ",
796
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CopyIcon, {})
745
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CopyIcon, {})
797
746
  ] }) }),
798
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { onClick: openModal, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: [
747
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { onClick: openModal, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: [
799
748
  "Change wallet ",
800
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GenericWalletIcon, {})
749
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GenericWalletIcon, {})
801
750
  ] }),
802
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { onClick: onDisconnect, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: "Disconnect" })
751
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { onClick: onDisconnect, className: "wallet-adapter-dropdown-list-item", role: "menuitem", children: "Disconnect" })
803
752
  ]
804
753
  }
805
754
  )