@meshsdk/react 1.9.0-beta.30 → 1.9.0-beta.31
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.cjs +187 -99
- package/dist/index.js +187 -99
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -24408,19 +24408,87 @@ function IconDiscord() {
|
|
|
24408
24408
|
viewBox: "0 0 20 20",
|
|
24409
24409
|
"aria-hidden": "true",
|
|
24410
24410
|
style: {
|
|
24411
|
-
color: "#ffadff",
|
|
24412
24411
|
width: "24px",
|
|
24413
|
-
height: "24px"
|
|
24414
|
-
strokeWidth: "1px",
|
|
24415
|
-
fill: "#5865F2"
|
|
24412
|
+
height: "24px"
|
|
24416
24413
|
},
|
|
24417
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
24414
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
24415
|
+
"path",
|
|
24416
|
+
{
|
|
24417
|
+
d: "M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z",
|
|
24418
|
+
fill: "#5865F2"
|
|
24419
|
+
}
|
|
24420
|
+
)
|
|
24418
24421
|
}
|
|
24419
24422
|
);
|
|
24420
24423
|
}
|
|
24421
24424
|
|
|
24422
|
-
// src/
|
|
24425
|
+
// src/common/icons/icon-google.tsx
|
|
24423
24426
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
24427
|
+
function IconGoogle() {
|
|
24428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
24429
|
+
"svg",
|
|
24430
|
+
{
|
|
24431
|
+
viewBox: "0 0 262 262",
|
|
24432
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24433
|
+
preserveAspectRatio: "xMidYMid",
|
|
24434
|
+
style: {
|
|
24435
|
+
width: "24px",
|
|
24436
|
+
height: "24px"
|
|
24437
|
+
},
|
|
24438
|
+
children: [
|
|
24439
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24440
|
+
"path",
|
|
24441
|
+
{
|
|
24442
|
+
d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",
|
|
24443
|
+
fill: "#4285F4"
|
|
24444
|
+
}
|
|
24445
|
+
),
|
|
24446
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24447
|
+
"path",
|
|
24448
|
+
{
|
|
24449
|
+
d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",
|
|
24450
|
+
fill: "#34A853"
|
|
24451
|
+
}
|
|
24452
|
+
),
|
|
24453
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24454
|
+
"path",
|
|
24455
|
+
{
|
|
24456
|
+
d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",
|
|
24457
|
+
fill: "#FBBC05"
|
|
24458
|
+
}
|
|
24459
|
+
),
|
|
24460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24461
|
+
"path",
|
|
24462
|
+
{
|
|
24463
|
+
d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",
|
|
24464
|
+
fill: "#EB4335"
|
|
24465
|
+
}
|
|
24466
|
+
)
|
|
24467
|
+
]
|
|
24468
|
+
}
|
|
24469
|
+
);
|
|
24470
|
+
}
|
|
24471
|
+
|
|
24472
|
+
// src/common/icons/icon-twitter.tsx
|
|
24473
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
24474
|
+
function IconTwitter() {
|
|
24475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
24476
|
+
"svg",
|
|
24477
|
+
{
|
|
24478
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24479
|
+
version: "1.1",
|
|
24480
|
+
viewBox: "0 0 24 24",
|
|
24481
|
+
style: {
|
|
24482
|
+
width: "24px",
|
|
24483
|
+
height: "24px"
|
|
24484
|
+
},
|
|
24485
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z" })
|
|
24486
|
+
}
|
|
24487
|
+
);
|
|
24488
|
+
}
|
|
24489
|
+
|
|
24490
|
+
// src/cardano-wallet/web3-services.tsx
|
|
24491
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
24424
24492
|
function Web3Services({
|
|
24425
24493
|
options,
|
|
24426
24494
|
setOpen,
|
|
@@ -24448,19 +24516,39 @@ function Web3Services({
|
|
|
24448
24516
|
setLoading(false);
|
|
24449
24517
|
setOpen(false);
|
|
24450
24518
|
}
|
|
24451
|
-
return /* @__PURE__ */ (0,
|
|
24452
|
-
|
|
24453
|
-
|
|
24454
|
-
|
|
24455
|
-
|
|
24456
|
-
|
|
24457
|
-
|
|
24458
|
-
|
|
24459
|
-
|
|
24519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
24520
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24521
|
+
WalletIcon,
|
|
24522
|
+
{
|
|
24523
|
+
iconReactNode: IconGoogle(),
|
|
24524
|
+
name: `Google`,
|
|
24525
|
+
action: () => loadWallet(),
|
|
24526
|
+
loading
|
|
24527
|
+
}
|
|
24528
|
+
),
|
|
24529
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24530
|
+
WalletIcon,
|
|
24531
|
+
{
|
|
24532
|
+
iconReactNode: IconDiscord(),
|
|
24533
|
+
name: `Discord`,
|
|
24534
|
+
action: () => loadWallet(),
|
|
24535
|
+
loading
|
|
24536
|
+
}
|
|
24537
|
+
),
|
|
24538
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24539
|
+
WalletIcon,
|
|
24540
|
+
{
|
|
24541
|
+
iconReactNode: IconTwitter(),
|
|
24542
|
+
name: `Twitter`,
|
|
24543
|
+
action: () => loadWallet(),
|
|
24544
|
+
loading
|
|
24545
|
+
}
|
|
24546
|
+
)
|
|
24547
|
+
] });
|
|
24460
24548
|
}
|
|
24461
24549
|
|
|
24462
24550
|
// src/cardano-wallet/screen-main.tsx
|
|
24463
|
-
var
|
|
24551
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
24464
24552
|
function ScreenMain({
|
|
24465
24553
|
injectFn,
|
|
24466
24554
|
setOpen,
|
|
@@ -24474,8 +24562,8 @@ function ScreenMain({
|
|
|
24474
24562
|
}) {
|
|
24475
24563
|
const wallets = useWalletList({ injectFn });
|
|
24476
24564
|
const { connect: connect2 } = useWallet();
|
|
24477
|
-
return /* @__PURE__ */ (0,
|
|
24478
|
-
wallets.map((wallet, index) => /* @__PURE__ */ (0,
|
|
24565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
|
|
24566
|
+
wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24479
24567
|
WalletIcon,
|
|
24480
24568
|
{
|
|
24481
24569
|
icon: wallet.icon,
|
|
@@ -24487,7 +24575,7 @@ function ScreenMain({
|
|
|
24487
24575
|
},
|
|
24488
24576
|
index
|
|
24489
24577
|
)),
|
|
24490
|
-
web3Services && /* @__PURE__ */ (0,
|
|
24578
|
+
web3Services && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24491
24579
|
Web3Services,
|
|
24492
24580
|
{
|
|
24493
24581
|
options: web3Services,
|
|
@@ -24495,7 +24583,7 @@ function ScreenMain({
|
|
|
24495
24583
|
persist
|
|
24496
24584
|
}
|
|
24497
24585
|
),
|
|
24498
|
-
webauthn && /* @__PURE__ */ (0,
|
|
24586
|
+
webauthn && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24499
24587
|
WalletIcon,
|
|
24500
24588
|
{
|
|
24501
24589
|
iconReactNode: IconFingerprint(),
|
|
@@ -24505,7 +24593,7 @@ function ScreenMain({
|
|
|
24505
24593
|
}
|
|
24506
24594
|
}
|
|
24507
24595
|
),
|
|
24508
|
-
cardanoPeerConnect && /* @__PURE__ */ (0,
|
|
24596
|
+
cardanoPeerConnect && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24509
24597
|
WalletIcon,
|
|
24510
24598
|
{
|
|
24511
24599
|
iconReactNode: IconMonitorSmartphone(),
|
|
@@ -24515,7 +24603,7 @@ function ScreenMain({
|
|
|
24515
24603
|
}
|
|
24516
24604
|
}
|
|
24517
24605
|
),
|
|
24518
|
-
burnerWallet && /* @__PURE__ */ (0,
|
|
24606
|
+
burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24519
24607
|
WalletIcon,
|
|
24520
24608
|
{
|
|
24521
24609
|
iconReactNode: IconBookDashed(),
|
|
@@ -24525,7 +24613,7 @@ function ScreenMain({
|
|
|
24525
24613
|
}
|
|
24526
24614
|
}
|
|
24527
24615
|
),
|
|
24528
|
-
showDownload && /* @__PURE__ */ (0,
|
|
24616
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24529
24617
|
WalletIcon,
|
|
24530
24618
|
{
|
|
24531
24619
|
iconReactNode: IconDownload(),
|
|
@@ -24544,7 +24632,7 @@ function ScreenMain({
|
|
|
24544
24632
|
// src/cardano-wallet/screen-p2p.tsx
|
|
24545
24633
|
var import_react12 = require("react");
|
|
24546
24634
|
var import_cardano_peer_connect = __toESM(require_dist(), 1);
|
|
24547
|
-
var
|
|
24635
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
24548
24636
|
function ScreenP2P({
|
|
24549
24637
|
cardanoPeerConnect,
|
|
24550
24638
|
setOpen
|
|
@@ -24588,9 +24676,9 @@ function ScreenP2P({
|
|
|
24588
24676
|
}
|
|
24589
24677
|
}
|
|
24590
24678
|
}, []);
|
|
24591
|
-
return /* @__PURE__ */ (0,
|
|
24592
|
-
/* @__PURE__ */ (0,
|
|
24593
|
-
/* @__PURE__ */ (0,
|
|
24679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
|
|
24680
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
|
|
24681
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
24594
24682
|
Button,
|
|
24595
24683
|
{
|
|
24596
24684
|
variant: "outline",
|
|
@@ -24610,10 +24698,10 @@ var import_wallet4 = require("@meshsdk/wallet");
|
|
|
24610
24698
|
|
|
24611
24699
|
// src/common/input.tsx
|
|
24612
24700
|
var React5 = __toESM(require("react"), 1);
|
|
24613
|
-
var
|
|
24701
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
24614
24702
|
var Input = React5.forwardRef(
|
|
24615
24703
|
({ className, type, ...props }, ref) => {
|
|
24616
|
-
return /* @__PURE__ */ (0,
|
|
24704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
24617
24705
|
"input",
|
|
24618
24706
|
{
|
|
24619
24707
|
type,
|
|
@@ -24633,11 +24721,11 @@ Input.displayName = "Input";
|
|
|
24633
24721
|
var React6 = __toESM(require("react"), 1);
|
|
24634
24722
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
24635
24723
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
24636
|
-
var
|
|
24724
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
24637
24725
|
var labelVariants = (0, import_class_variance_authority2.cva)(
|
|
24638
24726
|
"mesh-text-sm mesh-font-medium mesh-leading-none peer-disabled:mesh-cursor-not-allowed peer-disabled:mesh-opacity-70"
|
|
24639
24727
|
);
|
|
24640
|
-
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
24728
|
+
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
24641
24729
|
LabelPrimitive.Root,
|
|
24642
24730
|
{
|
|
24643
24731
|
ref,
|
|
@@ -24648,7 +24736,7 @@ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
24648
24736
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
24649
24737
|
|
|
24650
24738
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
24651
|
-
var
|
|
24739
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
24652
24740
|
function ScreenWebauthn({
|
|
24653
24741
|
url,
|
|
24654
24742
|
networkId,
|
|
@@ -24682,10 +24770,10 @@ function ScreenWebauthn({
|
|
|
24682
24770
|
createWallet(res.wallet.bech32PrivateKey);
|
|
24683
24771
|
}
|
|
24684
24772
|
}
|
|
24685
|
-
return /* @__PURE__ */ (0,
|
|
24686
|
-
/* @__PURE__ */ (0,
|
|
24687
|
-
/* @__PURE__ */ (0,
|
|
24688
|
-
/* @__PURE__ */ (0,
|
|
24773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mesh-flex mesh-flex-row mesh-flex-gap-4 mesh-items-center mesh-justify-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: "Connecting wallet..." }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-gap-6 mesh-w-full mesh-mx-8", children: [
|
|
24774
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
24775
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Label2, { htmlFor: "username", children: "Username" }),
|
|
24776
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24689
24777
|
Input,
|
|
24690
24778
|
{
|
|
24691
24779
|
id: "username",
|
|
@@ -24695,11 +24783,11 @@ function ScreenWebauthn({
|
|
|
24695
24783
|
onChange: (e2) => setUserName(e2.target.value)
|
|
24696
24784
|
}
|
|
24697
24785
|
),
|
|
24698
|
-
/* @__PURE__ */ (0,
|
|
24786
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
|
|
24699
24787
|
] }),
|
|
24700
|
-
/* @__PURE__ */ (0,
|
|
24701
|
-
/* @__PURE__ */ (0,
|
|
24702
|
-
/* @__PURE__ */ (0,
|
|
24788
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
24789
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mesh-flex mesh-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Label2, { htmlFor: "password", children: "Unique Code" }) }),
|
|
24790
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24703
24791
|
Input,
|
|
24704
24792
|
{
|
|
24705
24793
|
id: "password",
|
|
@@ -24709,9 +24797,9 @@ function ScreenWebauthn({
|
|
|
24709
24797
|
onChange: (e2) => setPassword(e2.target.value)
|
|
24710
24798
|
}
|
|
24711
24799
|
),
|
|
24712
|
-
/* @__PURE__ */ (0,
|
|
24800
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
|
|
24713
24801
|
] }),
|
|
24714
|
-
/* @__PURE__ */ (0,
|
|
24802
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24715
24803
|
Button,
|
|
24716
24804
|
{
|
|
24717
24805
|
className: "mesh-w-full",
|
|
@@ -24724,7 +24812,7 @@ function ScreenWebauthn({
|
|
|
24724
24812
|
}
|
|
24725
24813
|
|
|
24726
24814
|
// src/cardano-wallet/index.tsx
|
|
24727
|
-
var
|
|
24815
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
24728
24816
|
var CardanoWallet = ({
|
|
24729
24817
|
label = "Connect Wallet",
|
|
24730
24818
|
onConnected = void 0,
|
|
@@ -24749,16 +24837,16 @@ var CardanoWallet = ({
|
|
|
24749
24837
|
if (onConnected) onConnected();
|
|
24750
24838
|
}
|
|
24751
24839
|
}, [connected, wallet]);
|
|
24752
|
-
return /* @__PURE__ */ (0,
|
|
24753
|
-
/* @__PURE__ */ (0,
|
|
24754
|
-
/* @__PURE__ */ (0,
|
|
24840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
|
|
24841
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "outline", className: isDark ? "mesh-dark" : "", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ConnectedButton, {}) }),
|
|
24842
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
24755
24843
|
DialogContent,
|
|
24756
24844
|
{
|
|
24757
24845
|
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
24758
24846
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
24759
24847
|
children: [
|
|
24760
|
-
/* @__PURE__ */ (0,
|
|
24761
|
-
screen == "main" && /* @__PURE__ */ (0,
|
|
24848
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Header, { screen, setScreen }),
|
|
24849
|
+
screen == "main" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24762
24850
|
ScreenMain,
|
|
24763
24851
|
{
|
|
24764
24852
|
injectFn,
|
|
@@ -24772,14 +24860,14 @@ var CardanoWallet = ({
|
|
|
24772
24860
|
web3Services
|
|
24773
24861
|
}
|
|
24774
24862
|
),
|
|
24775
|
-
screen == "p2p" && /* @__PURE__ */ (0,
|
|
24863
|
+
screen == "p2p" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24776
24864
|
ScreenP2P,
|
|
24777
24865
|
{
|
|
24778
24866
|
cardanoPeerConnect,
|
|
24779
24867
|
setOpen
|
|
24780
24868
|
}
|
|
24781
24869
|
),
|
|
24782
|
-
screen == "burner" && burnerWallet && /* @__PURE__ */ (0,
|
|
24870
|
+
screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24783
24871
|
ScreenBurner,
|
|
24784
24872
|
{
|
|
24785
24873
|
networkId: burnerWallet.networkId,
|
|
@@ -24787,7 +24875,7 @@ var CardanoWallet = ({
|
|
|
24787
24875
|
setOpen
|
|
24788
24876
|
}
|
|
24789
24877
|
),
|
|
24790
|
-
screen == "webauthn" && webauthn && /* @__PURE__ */ (0,
|
|
24878
|
+
screen == "webauthn" && webauthn && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24791
24879
|
ScreenWebauthn,
|
|
24792
24880
|
{
|
|
24793
24881
|
url: webauthn.url,
|
|
@@ -24796,7 +24884,7 @@ var CardanoWallet = ({
|
|
|
24796
24884
|
setOpen
|
|
24797
24885
|
}
|
|
24798
24886
|
),
|
|
24799
|
-
/* @__PURE__ */ (0,
|
|
24887
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Footer, {})
|
|
24800
24888
|
]
|
|
24801
24889
|
}
|
|
24802
24890
|
)
|
|
@@ -24806,25 +24894,25 @@ function Header({
|
|
|
24806
24894
|
screen,
|
|
24807
24895
|
setScreen
|
|
24808
24896
|
}) {
|
|
24809
|
-
return /* @__PURE__ */ (0,
|
|
24810
|
-
/* @__PURE__ */ (0,
|
|
24811
|
-
screen != "main" ? /* @__PURE__ */ (0,
|
|
24812
|
-
/* @__PURE__ */ (0,
|
|
24813
|
-
/* @__PURE__ */ (0,
|
|
24897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogHeader, { children: [
|
|
24898
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
|
|
24899
|
+
screen != "main" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { onClick: () => setScreen("main"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconChevronRight, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { width: "24px" } }),
|
|
24900
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: screens[screen].title }),
|
|
24901
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { width: "24px" } })
|
|
24814
24902
|
] }),
|
|
24815
|
-
/* @__PURE__ */ (0,
|
|
24903
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogDescription, { children: screens[screen].subtitle && screens[screen].subtitle })
|
|
24816
24904
|
] });
|
|
24817
24905
|
}
|
|
24818
24906
|
function Footer() {
|
|
24819
|
-
return /* @__PURE__ */ (0,
|
|
24907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
24820
24908
|
"a",
|
|
24821
24909
|
{
|
|
24822
24910
|
href: "https://meshjs.dev/",
|
|
24823
24911
|
target: "_blank",
|
|
24824
24912
|
className: "mesh-grow mesh-flex mesh-gap-1 mesh-items-center mesh-justify-center mesh-text-zinc-500 hover:mesh-text-white mesh-fill-zinc-500 hover:mesh-fill-white",
|
|
24825
24913
|
children: [
|
|
24826
|
-
/* @__PURE__ */ (0,
|
|
24827
|
-
/* @__PURE__ */ (0,
|
|
24914
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "", children: "Powered by" }),
|
|
24915
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24828
24916
|
"svg",
|
|
24829
24917
|
{
|
|
24830
24918
|
width: 24,
|
|
@@ -24832,31 +24920,31 @@ function Footer() {
|
|
|
24832
24920
|
enableBackground: "new 0 0 300 200",
|
|
24833
24921
|
viewBox: "0 0 300 200",
|
|
24834
24922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24835
|
-
children: /* @__PURE__ */ (0,
|
|
24923
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
24836
24924
|
}
|
|
24837
24925
|
),
|
|
24838
|
-
/* @__PURE__ */ (0,
|
|
24926
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "", children: "Mesh SDK" })
|
|
24839
24927
|
]
|
|
24840
24928
|
}
|
|
24841
24929
|
) });
|
|
24842
24930
|
}
|
|
24843
24931
|
|
|
24844
24932
|
// src/mesh-badge/mesh-logo.tsx
|
|
24845
|
-
var
|
|
24846
|
-
var MeshLogo = () => /* @__PURE__ */ (0,
|
|
24933
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
24934
|
+
var MeshLogo = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
24847
24935
|
"svg",
|
|
24848
24936
|
{
|
|
24849
24937
|
className: "mesh-h-16 mesh-p-2",
|
|
24850
24938
|
fill: "currentColor",
|
|
24851
24939
|
viewBox: "0 0 300 200",
|
|
24852
24940
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24853
|
-
children: /* @__PURE__ */ (0,
|
|
24941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
24854
24942
|
}
|
|
24855
24943
|
);
|
|
24856
24944
|
|
|
24857
24945
|
// src/mesh-badge/index.tsx
|
|
24858
|
-
var
|
|
24859
|
-
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0,
|
|
24946
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
24947
|
+
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
24860
24948
|
"a",
|
|
24861
24949
|
{
|
|
24862
24950
|
className: `mesh-flex mesh-max-w-fit mesh-flex-col mesh-items-center mesh-rounded-md mesh-border mesh-border-solid mesh-border-current mesh-p-1 mesh-text-xl mesh-font-semibold mesh-no-underline ${isDark ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
@@ -24868,7 +24956,7 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime23
|
|
|
24868
24956
|
rel: "noopener noreferrer",
|
|
24869
24957
|
target: "_blank",
|
|
24870
24958
|
children: [
|
|
24871
|
-
/* @__PURE__ */ (0,
|
|
24959
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MeshLogo, {}),
|
|
24872
24960
|
"Mesh"
|
|
24873
24961
|
]
|
|
24874
24962
|
}
|
|
@@ -24882,7 +24970,7 @@ var import_transaction = require("@meshsdk/transaction");
|
|
|
24882
24970
|
var import_react15 = require("react");
|
|
24883
24971
|
|
|
24884
24972
|
// src/common/button-dropdown.tsx
|
|
24885
|
-
var
|
|
24973
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
24886
24974
|
function ButtonDropdown({
|
|
24887
24975
|
children,
|
|
24888
24976
|
isDarkMode = false,
|
|
@@ -24891,7 +24979,7 @@ function ButtonDropdown({
|
|
|
24891
24979
|
onMouseEnter,
|
|
24892
24980
|
onMouseLeave
|
|
24893
24981
|
}) {
|
|
24894
|
-
return /* @__PURE__ */ (0,
|
|
24982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
24895
24983
|
"button",
|
|
24896
24984
|
{
|
|
24897
24985
|
className: `mesh-mr-menu-list mesh-flex mesh-w-60 mesh-items-center mesh-justify-center mesh-rounded-t-md mesh-border mesh-px-4 mesh-py-2 mesh-text-lg mesh-font-normal mesh-shadow-sm ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
@@ -24904,21 +24992,21 @@ function ButtonDropdown({
|
|
|
24904
24992
|
}
|
|
24905
24993
|
|
|
24906
24994
|
// src/cardano-wallet-dropdown/menu-item.tsx
|
|
24907
|
-
var
|
|
24995
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
24908
24996
|
function MenuItem({
|
|
24909
24997
|
icon,
|
|
24910
24998
|
label,
|
|
24911
24999
|
action,
|
|
24912
25000
|
active
|
|
24913
25001
|
}) {
|
|
24914
|
-
return /* @__PURE__ */ (0,
|
|
25002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
24915
25003
|
"div",
|
|
24916
25004
|
{
|
|
24917
25005
|
className: "mesh-flex mesh-cursor-pointer mesh-items-center mesh-px-4 mesh-py-2 mesh-opacity-80 hover:mesh-opacity-100 mesh-h-16",
|
|
24918
25006
|
onClick: action,
|
|
24919
25007
|
children: [
|
|
24920
|
-
icon && /* @__PURE__ */ (0,
|
|
24921
|
-
/* @__PURE__ */ (0,
|
|
25008
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
|
|
25009
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-neutral-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
|
|
24922
25010
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
24923
25011
|
}).join(" ") })
|
|
24924
25012
|
]
|
|
@@ -24927,8 +25015,8 @@ function MenuItem({
|
|
|
24927
25015
|
}
|
|
24928
25016
|
|
|
24929
25017
|
// src/cardano-wallet-dropdown/chevron-down.tsx
|
|
24930
|
-
var
|
|
24931
|
-
var ChevronDown = () => /* @__PURE__ */ (0,
|
|
25018
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
25019
|
+
var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24932
25020
|
"svg",
|
|
24933
25021
|
{
|
|
24934
25022
|
className: "mesh-m-2 mesh-h-6",
|
|
@@ -24937,7 +25025,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
|
24937
25025
|
viewBox: "0 0 24 24",
|
|
24938
25026
|
stroke: "currentColor",
|
|
24939
25027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24940
|
-
children: /* @__PURE__ */ (0,
|
|
25028
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24941
25029
|
"path",
|
|
24942
25030
|
{
|
|
24943
25031
|
strokeLinecap: "round",
|
|
@@ -24950,7 +25038,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
|
24950
25038
|
);
|
|
24951
25039
|
|
|
24952
25040
|
// src/cardano-wallet-dropdown/wallet-balance.tsx
|
|
24953
|
-
var
|
|
25041
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
24954
25042
|
var WalletBalance = ({
|
|
24955
25043
|
connected,
|
|
24956
25044
|
connecting,
|
|
@@ -24958,22 +25046,22 @@ var WalletBalance = ({
|
|
|
24958
25046
|
wallet
|
|
24959
25047
|
}) => {
|
|
24960
25048
|
const lovelace = useLovelace();
|
|
24961
|
-
return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0,
|
|
24962
|
-
/* @__PURE__ */ (0,
|
|
25049
|
+
return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
25050
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
|
|
24963
25051
|
"\u20B3",
|
|
24964
25052
|
" ",
|
|
24965
25053
|
parseInt((parseInt(lovelace, 10) / 1e6).toString(), 10),
|
|
24966
25054
|
".",
|
|
24967
|
-
/* @__PURE__ */ (0,
|
|
24968
|
-
] }) : connected && wallet?.icon ? /* @__PURE__ */ (0,
|
|
25055
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
|
|
25056
|
+
] }) : connected && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: "Connecting..." }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
24969
25057
|
label,
|
|
24970
25058
|
" ",
|
|
24971
|
-
/* @__PURE__ */ (0,
|
|
25059
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDown, {})
|
|
24972
25060
|
] });
|
|
24973
25061
|
};
|
|
24974
25062
|
|
|
24975
25063
|
// src/cardano-wallet-dropdown/index.tsx
|
|
24976
|
-
var
|
|
25064
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
24977
25065
|
var CardanoWallet2 = ({
|
|
24978
25066
|
label = "Connect Wallet",
|
|
24979
25067
|
onConnected = void 0,
|
|
@@ -24993,20 +25081,20 @@ var CardanoWallet2 = ({
|
|
|
24993
25081
|
(0, import_react15.useEffect)(() => {
|
|
24994
25082
|
setIsDarkMode(isDark);
|
|
24995
25083
|
}, [isDark]);
|
|
24996
|
-
return /* @__PURE__ */ (0,
|
|
25084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
24997
25085
|
"div",
|
|
24998
25086
|
{
|
|
24999
25087
|
onMouseEnter: () => setHideMenuList(false),
|
|
25000
25088
|
onMouseLeave: () => setHideMenuList(true),
|
|
25001
25089
|
style: { width: "min-content", zIndex: 50 },
|
|
25002
25090
|
children: [
|
|
25003
|
-
/* @__PURE__ */ (0,
|
|
25091
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
25004
25092
|
ButtonDropdown,
|
|
25005
25093
|
{
|
|
25006
25094
|
isDarkMode,
|
|
25007
25095
|
hideMenuList,
|
|
25008
25096
|
setHideMenuList,
|
|
25009
|
-
children: /* @__PURE__ */ (0,
|
|
25097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
25010
25098
|
WalletBalance,
|
|
25011
25099
|
{
|
|
25012
25100
|
connected,
|
|
@@ -25017,12 +25105,12 @@ var CardanoWallet2 = ({
|
|
|
25017
25105
|
)
|
|
25018
25106
|
}
|
|
25019
25107
|
),
|
|
25020
|
-
/* @__PURE__ */ (0,
|
|
25108
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
25021
25109
|
"div",
|
|
25022
25110
|
{
|
|
25023
25111
|
className: `mesh-mr-menu-list mesh-absolute mesh-w-60 mesh-rounded-b-md mesh-border mesh-text-center mesh-shadow-sm mesh-backdrop-blur ${hideMenuList && "mesh-hidden"} ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
25024
25112
|
style: { zIndex: 50 },
|
|
25025
|
-
children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0,
|
|
25113
|
+
children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
25026
25114
|
MenuItem,
|
|
25027
25115
|
{
|
|
25028
25116
|
icon: wallet.icon,
|
|
@@ -25034,7 +25122,7 @@ var CardanoWallet2 = ({
|
|
|
25034
25122
|
active: name === wallet.id
|
|
25035
25123
|
},
|
|
25036
25124
|
index
|
|
25037
|
-
)) }) : wallets.length === 0 ? /* @__PURE__ */ (0,
|
|
25125
|
+
)) }) : wallets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "No Wallet Found" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
25038
25126
|
MenuItem,
|
|
25039
25127
|
{
|
|
25040
25128
|
active: false,
|
|
@@ -25051,7 +25139,7 @@ var CardanoWallet2 = ({
|
|
|
25051
25139
|
};
|
|
25052
25140
|
|
|
25053
25141
|
// src/stake-button/index.tsx
|
|
25054
|
-
var
|
|
25142
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
25055
25143
|
var StakeButton = ({
|
|
25056
25144
|
label = "Stake your ADA",
|
|
25057
25145
|
isDark = false,
|
|
@@ -25064,14 +25152,14 @@ var StakeButton = ({
|
|
|
25064
25152
|
(0, import_react16.useEffect)(() => {
|
|
25065
25153
|
setIsDarkMode(isDark);
|
|
25066
25154
|
}, [isDark]);
|
|
25067
|
-
return /* @__PURE__ */ (0,
|
|
25155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: connected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
25068
25156
|
Delegate,
|
|
25069
25157
|
{
|
|
25070
25158
|
poolId,
|
|
25071
25159
|
onCheck,
|
|
25072
25160
|
onDelegated
|
|
25073
25161
|
}
|
|
25074
|
-
) }) : /* @__PURE__ */ (0,
|
|
25162
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CardanoWallet2, { label, isDark }) });
|
|
25075
25163
|
};
|
|
25076
25164
|
var Delegate = ({
|
|
25077
25165
|
poolId,
|
|
@@ -25139,18 +25227,18 @@ var Delegate = ({
|
|
|
25139
25227
|
checkAccountStatus();
|
|
25140
25228
|
}, [rewardAddress]);
|
|
25141
25229
|
if (checking) {
|
|
25142
|
-
return /* @__PURE__ */ (0,
|
|
25230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Checking..." });
|
|
25143
25231
|
}
|
|
25144
25232
|
if (processing) {
|
|
25145
|
-
return /* @__PURE__ */ (0,
|
|
25233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Loading..." });
|
|
25146
25234
|
}
|
|
25147
25235
|
if (done) {
|
|
25148
|
-
return /* @__PURE__ */ (0,
|
|
25236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Stake Delegated" });
|
|
25149
25237
|
}
|
|
25150
25238
|
if (accountInfo?.active) {
|
|
25151
|
-
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0,
|
|
25239
|
+
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Stake Delegated" }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { onClick: delegateStake, children: "Begin Staking" });
|
|
25152
25240
|
}
|
|
25153
|
-
return /* @__PURE__ */ (0,
|
|
25241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { onClick: registerAddress, children: "Begin Staking" });
|
|
25154
25242
|
};
|
|
25155
25243
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25156
25244
|
0 && (module.exports = {
|