@meshsdk/react 1.7.10 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +20 -4
- package/dist/index.css +111 -111
- package/dist/index.js +20 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -529,6 +529,25 @@ var Delegate = ({
|
|
|
529
529
|
}
|
|
530
530
|
setProcessing(false);
|
|
531
531
|
};
|
|
532
|
+
const delegateStake = async () => {
|
|
533
|
+
setProcessing(true);
|
|
534
|
+
setDone(false);
|
|
535
|
+
try {
|
|
536
|
+
if (rewardAddress) {
|
|
537
|
+
const tx = new import_transaction.Transaction({ initiator: wallet }).delegateStake(rewardAddress, poolId);
|
|
538
|
+
const unsignedTx = await tx.build();
|
|
539
|
+
const signedTx = await wallet.signTx(unsignedTx);
|
|
540
|
+
await wallet.submitTx(signedTx);
|
|
541
|
+
if (onDelegated) {
|
|
542
|
+
onDelegated();
|
|
543
|
+
}
|
|
544
|
+
setDone(true);
|
|
545
|
+
}
|
|
546
|
+
} catch (error) {
|
|
547
|
+
setError(error);
|
|
548
|
+
}
|
|
549
|
+
setProcessing(false);
|
|
550
|
+
};
|
|
532
551
|
(0, import_react11.useEffect)(() => {
|
|
533
552
|
checkAccountStatus();
|
|
534
553
|
}, [rewardAddress]);
|
|
@@ -542,10 +561,7 @@ var Delegate = ({
|
|
|
542
561
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Stake Delegated" });
|
|
543
562
|
}
|
|
544
563
|
if (accountInfo?.active) {
|
|
545
|
-
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Stake Delegated" }) : (
|
|
546
|
-
// <span onClick={delegateStake}>Delegate Stake</span>
|
|
547
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { onClick: registerAddress, children: "Begin Staking" })
|
|
548
|
-
);
|
|
564
|
+
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Stake Delegated" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { onClick: delegateStake, children: "Begin Staking" });
|
|
549
565
|
}
|
|
550
566
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { onClick: registerAddress, children: "Begin Staking" });
|
|
551
567
|
};
|
package/dist/index.css
CHANGED
|
@@ -1,5 +1,113 @@
|
|
|
1
|
+
*, ::before, ::after {
|
|
2
|
+
--tw-border-spacing-x: 0;
|
|
3
|
+
--tw-border-spacing-y: 0;
|
|
4
|
+
--tw-translate-x: 0;
|
|
5
|
+
--tw-translate-y: 0;
|
|
6
|
+
--tw-rotate: 0;
|
|
7
|
+
--tw-skew-x: 0;
|
|
8
|
+
--tw-skew-y: 0;
|
|
9
|
+
--tw-scale-x: 1;
|
|
10
|
+
--tw-scale-y: 1;
|
|
11
|
+
--tw-pan-x: ;
|
|
12
|
+
--tw-pan-y: ;
|
|
13
|
+
--tw-pinch-zoom: ;
|
|
14
|
+
--tw-scroll-snap-strictness: proximity;
|
|
15
|
+
--tw-gradient-from-position: ;
|
|
16
|
+
--tw-gradient-via-position: ;
|
|
17
|
+
--tw-gradient-to-position: ;
|
|
18
|
+
--tw-ordinal: ;
|
|
19
|
+
--tw-slashed-zero: ;
|
|
20
|
+
--tw-numeric-figure: ;
|
|
21
|
+
--tw-numeric-spacing: ;
|
|
22
|
+
--tw-numeric-fraction: ;
|
|
23
|
+
--tw-ring-inset: ;
|
|
24
|
+
--tw-ring-offset-width: 0px;
|
|
25
|
+
--tw-ring-offset-color: #fff;
|
|
26
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
27
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
28
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
29
|
+
--tw-shadow: 0 0 #0000;
|
|
30
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
31
|
+
--tw-blur: ;
|
|
32
|
+
--tw-brightness: ;
|
|
33
|
+
--tw-contrast: ;
|
|
34
|
+
--tw-grayscale: ;
|
|
35
|
+
--tw-hue-rotate: ;
|
|
36
|
+
--tw-invert: ;
|
|
37
|
+
--tw-saturate: ;
|
|
38
|
+
--tw-sepia: ;
|
|
39
|
+
--tw-drop-shadow: ;
|
|
40
|
+
--tw-backdrop-blur: ;
|
|
41
|
+
--tw-backdrop-brightness: ;
|
|
42
|
+
--tw-backdrop-contrast: ;
|
|
43
|
+
--tw-backdrop-grayscale: ;
|
|
44
|
+
--tw-backdrop-hue-rotate: ;
|
|
45
|
+
--tw-backdrop-invert: ;
|
|
46
|
+
--tw-backdrop-opacity: ;
|
|
47
|
+
--tw-backdrop-saturate: ;
|
|
48
|
+
--tw-backdrop-sepia: ;
|
|
49
|
+
--tw-contain-size: ;
|
|
50
|
+
--tw-contain-layout: ;
|
|
51
|
+
--tw-contain-paint: ;
|
|
52
|
+
--tw-contain-style: ;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
::backdrop {
|
|
56
|
+
--tw-border-spacing-x: 0;
|
|
57
|
+
--tw-border-spacing-y: 0;
|
|
58
|
+
--tw-translate-x: 0;
|
|
59
|
+
--tw-translate-y: 0;
|
|
60
|
+
--tw-rotate: 0;
|
|
61
|
+
--tw-skew-x: 0;
|
|
62
|
+
--tw-skew-y: 0;
|
|
63
|
+
--tw-scale-x: 1;
|
|
64
|
+
--tw-scale-y: 1;
|
|
65
|
+
--tw-pan-x: ;
|
|
66
|
+
--tw-pan-y: ;
|
|
67
|
+
--tw-pinch-zoom: ;
|
|
68
|
+
--tw-scroll-snap-strictness: proximity;
|
|
69
|
+
--tw-gradient-from-position: ;
|
|
70
|
+
--tw-gradient-via-position: ;
|
|
71
|
+
--tw-gradient-to-position: ;
|
|
72
|
+
--tw-ordinal: ;
|
|
73
|
+
--tw-slashed-zero: ;
|
|
74
|
+
--tw-numeric-figure: ;
|
|
75
|
+
--tw-numeric-spacing: ;
|
|
76
|
+
--tw-numeric-fraction: ;
|
|
77
|
+
--tw-ring-inset: ;
|
|
78
|
+
--tw-ring-offset-width: 0px;
|
|
79
|
+
--tw-ring-offset-color: #fff;
|
|
80
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
81
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
82
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
83
|
+
--tw-shadow: 0 0 #0000;
|
|
84
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
85
|
+
--tw-blur: ;
|
|
86
|
+
--tw-brightness: ;
|
|
87
|
+
--tw-contrast: ;
|
|
88
|
+
--tw-grayscale: ;
|
|
89
|
+
--tw-hue-rotate: ;
|
|
90
|
+
--tw-invert: ;
|
|
91
|
+
--tw-saturate: ;
|
|
92
|
+
--tw-sepia: ;
|
|
93
|
+
--tw-drop-shadow: ;
|
|
94
|
+
--tw-backdrop-blur: ;
|
|
95
|
+
--tw-backdrop-brightness: ;
|
|
96
|
+
--tw-backdrop-contrast: ;
|
|
97
|
+
--tw-backdrop-grayscale: ;
|
|
98
|
+
--tw-backdrop-hue-rotate: ;
|
|
99
|
+
--tw-backdrop-invert: ;
|
|
100
|
+
--tw-backdrop-opacity: ;
|
|
101
|
+
--tw-backdrop-saturate: ;
|
|
102
|
+
--tw-backdrop-sepia: ;
|
|
103
|
+
--tw-contain-size: ;
|
|
104
|
+
--tw-contain-layout: ;
|
|
105
|
+
--tw-contain-paint: ;
|
|
106
|
+
--tw-contain-style: ;
|
|
107
|
+
}
|
|
108
|
+
|
|
1
109
|
/*
|
|
2
|
-
! tailwindcss v3.4.
|
|
110
|
+
! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com
|
|
3
111
|
*/
|
|
4
112
|
|
|
5
113
|
/*
|
|
@@ -442,118 +550,10 @@ video {
|
|
|
442
550
|
|
|
443
551
|
/* Make elements with the HTML hidden attribute stay hidden by default */
|
|
444
552
|
|
|
445
|
-
[hidden] {
|
|
553
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
446
554
|
display: none;
|
|
447
555
|
}
|
|
448
556
|
|
|
449
|
-
*, ::before, ::after {
|
|
450
|
-
--tw-border-spacing-x: 0;
|
|
451
|
-
--tw-border-spacing-y: 0;
|
|
452
|
-
--tw-translate-x: 0;
|
|
453
|
-
--tw-translate-y: 0;
|
|
454
|
-
--tw-rotate: 0;
|
|
455
|
-
--tw-skew-x: 0;
|
|
456
|
-
--tw-skew-y: 0;
|
|
457
|
-
--tw-scale-x: 1;
|
|
458
|
-
--tw-scale-y: 1;
|
|
459
|
-
--tw-pan-x: ;
|
|
460
|
-
--tw-pan-y: ;
|
|
461
|
-
--tw-pinch-zoom: ;
|
|
462
|
-
--tw-scroll-snap-strictness: proximity;
|
|
463
|
-
--tw-gradient-from-position: ;
|
|
464
|
-
--tw-gradient-via-position: ;
|
|
465
|
-
--tw-gradient-to-position: ;
|
|
466
|
-
--tw-ordinal: ;
|
|
467
|
-
--tw-slashed-zero: ;
|
|
468
|
-
--tw-numeric-figure: ;
|
|
469
|
-
--tw-numeric-spacing: ;
|
|
470
|
-
--tw-numeric-fraction: ;
|
|
471
|
-
--tw-ring-inset: ;
|
|
472
|
-
--tw-ring-offset-width: 0px;
|
|
473
|
-
--tw-ring-offset-color: #fff;
|
|
474
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
475
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
476
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
477
|
-
--tw-shadow: 0 0 #0000;
|
|
478
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
479
|
-
--tw-blur: ;
|
|
480
|
-
--tw-brightness: ;
|
|
481
|
-
--tw-contrast: ;
|
|
482
|
-
--tw-grayscale: ;
|
|
483
|
-
--tw-hue-rotate: ;
|
|
484
|
-
--tw-invert: ;
|
|
485
|
-
--tw-saturate: ;
|
|
486
|
-
--tw-sepia: ;
|
|
487
|
-
--tw-drop-shadow: ;
|
|
488
|
-
--tw-backdrop-blur: ;
|
|
489
|
-
--tw-backdrop-brightness: ;
|
|
490
|
-
--tw-backdrop-contrast: ;
|
|
491
|
-
--tw-backdrop-grayscale: ;
|
|
492
|
-
--tw-backdrop-hue-rotate: ;
|
|
493
|
-
--tw-backdrop-invert: ;
|
|
494
|
-
--tw-backdrop-opacity: ;
|
|
495
|
-
--tw-backdrop-saturate: ;
|
|
496
|
-
--tw-backdrop-sepia: ;
|
|
497
|
-
--tw-contain-size: ;
|
|
498
|
-
--tw-contain-layout: ;
|
|
499
|
-
--tw-contain-paint: ;
|
|
500
|
-
--tw-contain-style: ;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
::backdrop {
|
|
504
|
-
--tw-border-spacing-x: 0;
|
|
505
|
-
--tw-border-spacing-y: 0;
|
|
506
|
-
--tw-translate-x: 0;
|
|
507
|
-
--tw-translate-y: 0;
|
|
508
|
-
--tw-rotate: 0;
|
|
509
|
-
--tw-skew-x: 0;
|
|
510
|
-
--tw-skew-y: 0;
|
|
511
|
-
--tw-scale-x: 1;
|
|
512
|
-
--tw-scale-y: 1;
|
|
513
|
-
--tw-pan-x: ;
|
|
514
|
-
--tw-pan-y: ;
|
|
515
|
-
--tw-pinch-zoom: ;
|
|
516
|
-
--tw-scroll-snap-strictness: proximity;
|
|
517
|
-
--tw-gradient-from-position: ;
|
|
518
|
-
--tw-gradient-via-position: ;
|
|
519
|
-
--tw-gradient-to-position: ;
|
|
520
|
-
--tw-ordinal: ;
|
|
521
|
-
--tw-slashed-zero: ;
|
|
522
|
-
--tw-numeric-figure: ;
|
|
523
|
-
--tw-numeric-spacing: ;
|
|
524
|
-
--tw-numeric-fraction: ;
|
|
525
|
-
--tw-ring-inset: ;
|
|
526
|
-
--tw-ring-offset-width: 0px;
|
|
527
|
-
--tw-ring-offset-color: #fff;
|
|
528
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
529
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
530
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
531
|
-
--tw-shadow: 0 0 #0000;
|
|
532
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
533
|
-
--tw-blur: ;
|
|
534
|
-
--tw-brightness: ;
|
|
535
|
-
--tw-contrast: ;
|
|
536
|
-
--tw-grayscale: ;
|
|
537
|
-
--tw-hue-rotate: ;
|
|
538
|
-
--tw-invert: ;
|
|
539
|
-
--tw-saturate: ;
|
|
540
|
-
--tw-sepia: ;
|
|
541
|
-
--tw-drop-shadow: ;
|
|
542
|
-
--tw-backdrop-blur: ;
|
|
543
|
-
--tw-backdrop-brightness: ;
|
|
544
|
-
--tw-backdrop-contrast: ;
|
|
545
|
-
--tw-backdrop-grayscale: ;
|
|
546
|
-
--tw-backdrop-hue-rotate: ;
|
|
547
|
-
--tw-backdrop-invert: ;
|
|
548
|
-
--tw-backdrop-opacity: ;
|
|
549
|
-
--tw-backdrop-saturate: ;
|
|
550
|
-
--tw-backdrop-sepia: ;
|
|
551
|
-
--tw-contain-size: ;
|
|
552
|
-
--tw-contain-layout: ;
|
|
553
|
-
--tw-contain-paint: ;
|
|
554
|
-
--tw-contain-style: ;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
557
|
.mesh-absolute {
|
|
558
558
|
position: absolute;
|
|
559
559
|
}
|
|
@@ -728,7 +728,7 @@ video {
|
|
|
728
728
|
.mesh-backdrop-blur {
|
|
729
729
|
--tw-backdrop-blur: blur(8px);
|
|
730
730
|
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
731
|
-
|
|
731
|
+
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
.hover\:mesh-text-black:hover {
|
package/dist/index.js
CHANGED
|
@@ -491,6 +491,25 @@ var Delegate = ({
|
|
|
491
491
|
}
|
|
492
492
|
setProcessing(false);
|
|
493
493
|
};
|
|
494
|
+
const delegateStake = async () => {
|
|
495
|
+
setProcessing(true);
|
|
496
|
+
setDone(false);
|
|
497
|
+
try {
|
|
498
|
+
if (rewardAddress) {
|
|
499
|
+
const tx = new Transaction({ initiator: wallet }).delegateStake(rewardAddress, poolId);
|
|
500
|
+
const unsignedTx = await tx.build();
|
|
501
|
+
const signedTx = await wallet.signTx(unsignedTx);
|
|
502
|
+
await wallet.submitTx(signedTx);
|
|
503
|
+
if (onDelegated) {
|
|
504
|
+
onDelegated();
|
|
505
|
+
}
|
|
506
|
+
setDone(true);
|
|
507
|
+
}
|
|
508
|
+
} catch (error) {
|
|
509
|
+
setError(error);
|
|
510
|
+
}
|
|
511
|
+
setProcessing(false);
|
|
512
|
+
};
|
|
494
513
|
useEffect8(() => {
|
|
495
514
|
checkAccountStatus();
|
|
496
515
|
}, [rewardAddress]);
|
|
@@ -504,10 +523,7 @@ var Delegate = ({
|
|
|
504
523
|
return /* @__PURE__ */ jsx9("span", { children: "Stake Delegated" });
|
|
505
524
|
}
|
|
506
525
|
if (accountInfo?.active) {
|
|
507
|
-
return accountInfo.poolId === poolId ? /* @__PURE__ */ jsx9("span", { children: "Stake Delegated" }) : (
|
|
508
|
-
// <span onClick={delegateStake}>Delegate Stake</span>
|
|
509
|
-
/* @__PURE__ */ jsx9("span", { onClick: registerAddress, children: "Begin Staking" })
|
|
510
|
-
);
|
|
526
|
+
return accountInfo.poolId === poolId ? /* @__PURE__ */ jsx9("span", { children: "Stake Delegated" }) : /* @__PURE__ */ jsx9("span", { onClick: delegateStake, children: "Begin Staking" });
|
|
511
527
|
}
|
|
512
528
|
return /* @__PURE__ */ jsx9("span", { onClick: registerAddress, children: "Begin Staking" });
|
|
513
529
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"browser": "./dist/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"react": "^18.2.0",
|
|
33
|
-
"@meshsdk/common": "1.7.
|
|
34
|
-
"@meshsdk/transaction": "1.7.
|
|
35
|
-
"@meshsdk/wallet": "1.7.
|
|
33
|
+
"@meshsdk/common": "1.7.12",
|
|
34
|
+
"@meshsdk/transaction": "1.7.12",
|
|
35
|
+
"@meshsdk/wallet": "1.7.12"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@meshsdk/configs": "*",
|