@meshsdk/react 1.8.12 → 1.8.14
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 +104 -61
- package/dist/index.css +80 -77
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +108 -65
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -23457,7 +23457,7 @@ __export(index_exports, {
|
|
|
23457
23457
|
module.exports = __toCommonJS(index_exports);
|
|
23458
23458
|
|
|
23459
23459
|
// src/cardano-wallet/index.tsx
|
|
23460
|
-
var
|
|
23460
|
+
var import_react13 = require("react");
|
|
23461
23461
|
|
|
23462
23462
|
// src/common/button.tsx
|
|
23463
23463
|
var React = __toESM(require("react"), 1);
|
|
@@ -23474,7 +23474,7 @@ function cn(...inputs) {
|
|
|
23474
23474
|
// src/common/button.tsx
|
|
23475
23475
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
23476
23476
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
23477
|
-
"mesh-inline-flex mesh-items-center mesh-justify-center mesh-whitespace-nowrap mesh-rounded-md mesh-text-sm mesh-font-medium mesh-transition-colors focus-visible:mesh-outline-none focus-visible:mesh-ring-1 focus-visible:mesh-ring-zinc-950 disabled:mesh-pointer-events-none disabled:mesh-opacity-50 dark:focus-visible:mesh-ring-zinc-300",
|
|
23477
|
+
"mesh-inline-flex mesh-items-center mesh-justify-center mesh-whitespace-nowrap mesh-rounded-md mesh-text-sm mesh-font-medium mesh-transition-colors focus-visible:mesh-outline-none focus-visible:mesh-ring-1 focus-visible:mesh-ring-zinc-950 disabled:mesh-pointer-events-none disabled:mesh-opacity-50 dark:focus-visible:mesh-ring-zinc-300 dark:mesh-text-white",
|
|
23478
23478
|
{
|
|
23479
23479
|
variants: {
|
|
23480
23480
|
variant: {
|
|
@@ -23642,14 +23642,19 @@ var INITIAL_STATE = {
|
|
|
23642
23642
|
walletName: void 0,
|
|
23643
23643
|
walletInstance: {}
|
|
23644
23644
|
};
|
|
23645
|
+
var localstoragePersist = "mesh-wallet-persist";
|
|
23645
23646
|
var useWalletStore = () => {
|
|
23646
23647
|
const [error, setError] = (0, import_react.useState)(void 0);
|
|
23648
|
+
const [state, setState] = (0, import_react.useState)("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23647
23649
|
const [connectingWallet, setConnectingWallet] = (0, import_react.useState)(false);
|
|
23650
|
+
const [persistSession, setPersistSession] = (0, import_react.useState)(false);
|
|
23651
|
+
const [address, setAddress] = (0, import_react.useState)("");
|
|
23648
23652
|
const [connectedWalletInstance, setConnectedWalletInstance] = (0, import_react.useState)(INITIAL_STATE.walletInstance);
|
|
23649
23653
|
const [connectedWalletName, setConnectedWalletName] = (0, import_react.useState)(INITIAL_STATE.walletName);
|
|
23650
23654
|
const connectWallet = (0, import_react.useCallback)(
|
|
23651
|
-
async (walletName, extensions) => {
|
|
23655
|
+
async (walletName, extensions, persist) => {
|
|
23652
23656
|
setConnectingWallet(true);
|
|
23657
|
+
setState("CONNECTING" /* CONNECTING */);
|
|
23653
23658
|
try {
|
|
23654
23659
|
const walletInstance = await import_wallet.BrowserWallet.enable(
|
|
23655
23660
|
walletName,
|
|
@@ -23658,8 +23663,18 @@ var useWalletStore = () => {
|
|
|
23658
23663
|
setConnectedWalletInstance(walletInstance);
|
|
23659
23664
|
setConnectedWalletName(walletName);
|
|
23660
23665
|
setError(void 0);
|
|
23666
|
+
if (persist) {
|
|
23667
|
+
localStorage.setItem(
|
|
23668
|
+
localstoragePersist,
|
|
23669
|
+
JSON.stringify({ walletName })
|
|
23670
|
+
);
|
|
23671
|
+
}
|
|
23672
|
+
setState("CONNECTED" /* CONNECTED */);
|
|
23661
23673
|
} catch (error2) {
|
|
23662
23674
|
setError(error2);
|
|
23675
|
+
setState("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23676
|
+
setConnectedWalletName(INITIAL_STATE.walletName);
|
|
23677
|
+
setConnectedWalletInstance(INITIAL_STATE.walletInstance);
|
|
23663
23678
|
}
|
|
23664
23679
|
setConnectingWallet(false);
|
|
23665
23680
|
},
|
|
@@ -23668,14 +23683,40 @@ var useWalletStore = () => {
|
|
|
23668
23683
|
const disconnect = (0, import_react.useCallback)(() => {
|
|
23669
23684
|
setConnectedWalletName(INITIAL_STATE.walletName);
|
|
23670
23685
|
setConnectedWalletInstance(INITIAL_STATE.walletInstance);
|
|
23686
|
+
setState("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23687
|
+
localStorage.removeItem(localstoragePersist);
|
|
23671
23688
|
}, []);
|
|
23672
23689
|
const setWallet = (0, import_react.useCallback)(
|
|
23673
23690
|
async (walletInstance, walletName) => {
|
|
23674
23691
|
setConnectedWalletInstance(walletInstance);
|
|
23675
23692
|
setConnectedWalletName(walletName);
|
|
23693
|
+
setState("CONNECTED" /* CONNECTED */);
|
|
23676
23694
|
},
|
|
23677
23695
|
[]
|
|
23678
23696
|
);
|
|
23697
|
+
const setPersist = (0, import_react.useCallback)((persist) => {
|
|
23698
|
+
setPersistSession(persist);
|
|
23699
|
+
}, []);
|
|
23700
|
+
(0, import_react.useEffect)(() => {
|
|
23701
|
+
async function load() {
|
|
23702
|
+
if (Object.keys(connectedWalletInstance).length > 0 && address.length === 0) {
|
|
23703
|
+
let address2 = (await connectedWalletInstance.getUnusedAddresses())[0];
|
|
23704
|
+
if (!address2)
|
|
23705
|
+
address2 = await connectedWalletInstance.getChangeAddress();
|
|
23706
|
+
setAddress(address2);
|
|
23707
|
+
}
|
|
23708
|
+
}
|
|
23709
|
+
load();
|
|
23710
|
+
}, [connectedWalletInstance]);
|
|
23711
|
+
(0, import_react.useEffect)(() => {
|
|
23712
|
+
const persist = localStorage.getItem(localstoragePersist);
|
|
23713
|
+
if (persistSession && persist) {
|
|
23714
|
+
const persist2 = JSON.parse(
|
|
23715
|
+
localStorage.getItem(localstoragePersist) || ""
|
|
23716
|
+
);
|
|
23717
|
+
connectWallet(persist2.walletName);
|
|
23718
|
+
}
|
|
23719
|
+
}, [persistSession]);
|
|
23679
23720
|
return {
|
|
23680
23721
|
hasConnectedWallet: INITIAL_STATE.walletName !== connectedWalletName,
|
|
23681
23722
|
connectedWalletInstance,
|
|
@@ -23684,7 +23725,10 @@ var useWalletStore = () => {
|
|
|
23684
23725
|
connectWallet,
|
|
23685
23726
|
disconnect,
|
|
23686
23727
|
setWallet,
|
|
23687
|
-
|
|
23728
|
+
setPersist,
|
|
23729
|
+
error,
|
|
23730
|
+
address,
|
|
23731
|
+
state
|
|
23688
23732
|
};
|
|
23689
23733
|
};
|
|
23690
23734
|
var WalletContext = (0, import_react.createContext)({
|
|
@@ -23697,7 +23741,11 @@ var WalletContext = (0, import_react.createContext)({
|
|
|
23697
23741
|
disconnect: () => {
|
|
23698
23742
|
},
|
|
23699
23743
|
setWallet: async () => {
|
|
23700
|
-
}
|
|
23744
|
+
},
|
|
23745
|
+
setPersist: () => {
|
|
23746
|
+
},
|
|
23747
|
+
address: "",
|
|
23748
|
+
state: "NOT_CONNECTED" /* NOT_CONNECTED */
|
|
23701
23749
|
});
|
|
23702
23750
|
|
|
23703
23751
|
// src/contexts/index.tsx
|
|
@@ -23816,7 +23864,10 @@ var useWallet = () => {
|
|
|
23816
23864
|
connectWallet,
|
|
23817
23865
|
disconnect,
|
|
23818
23866
|
setWallet,
|
|
23819
|
-
|
|
23867
|
+
setPersist,
|
|
23868
|
+
error,
|
|
23869
|
+
address,
|
|
23870
|
+
state
|
|
23820
23871
|
} = (0, import_react8.useContext)(WalletContext);
|
|
23821
23872
|
if (connectWallet === void 0 || disconnect === void 0) {
|
|
23822
23873
|
throw new Error(
|
|
@@ -23831,7 +23882,10 @@ var useWallet = () => {
|
|
|
23831
23882
|
connect: connectWallet,
|
|
23832
23883
|
disconnect,
|
|
23833
23884
|
setWallet,
|
|
23834
|
-
|
|
23885
|
+
setPersist,
|
|
23886
|
+
error,
|
|
23887
|
+
address,
|
|
23888
|
+
state
|
|
23835
23889
|
};
|
|
23836
23890
|
};
|
|
23837
23891
|
|
|
@@ -23866,9 +23920,6 @@ var useWalletSubmit = () => {
|
|
|
23866
23920
|
};
|
|
23867
23921
|
};
|
|
23868
23922
|
|
|
23869
|
-
// src/cardano-wallet/connected-button.tsx
|
|
23870
|
-
var import_react10 = require("react");
|
|
23871
|
-
|
|
23872
23923
|
// src/common/dropdown-menu.tsx
|
|
23873
23924
|
var React3 = __toESM(require("react"), 1);
|
|
23874
23925
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
@@ -24004,20 +24055,9 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
24004
24055
|
// src/cardano-wallet/connected-button.tsx
|
|
24005
24056
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
24006
24057
|
function ConnectedButton() {
|
|
24007
|
-
const { wallet, connected, disconnect } = useWallet();
|
|
24008
|
-
const [address, setAddress] = (0, import_react10.useState)("");
|
|
24009
|
-
(0, import_react10.useEffect)(() => {
|
|
24010
|
-
if (connected && wallet) {
|
|
24011
|
-
async function afterConnectedWallet() {
|
|
24012
|
-
let address2 = (await wallet.getUnusedAddresses())[0];
|
|
24013
|
-
if (!address2) address2 = await wallet.getChangeAddress();
|
|
24014
|
-
setAddress(address2);
|
|
24015
|
-
}
|
|
24016
|
-
afterConnectedWallet();
|
|
24017
|
-
}
|
|
24018
|
-
}, [connected, wallet]);
|
|
24058
|
+
const { wallet, connected, disconnect, address } = useWallet();
|
|
24019
24059
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenu, { children: [
|
|
24020
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Button, { variant: "outline",
|
|
24060
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Button, { variant: "outline", children: [
|
|
24021
24061
|
address.slice(0, 6),
|
|
24022
24062
|
"...",
|
|
24023
24063
|
address.slice(-6)
|
|
@@ -24065,7 +24105,7 @@ var screens = {
|
|
|
24065
24105
|
};
|
|
24066
24106
|
|
|
24067
24107
|
// src/cardano-wallet/screen-burner.tsx
|
|
24068
|
-
var
|
|
24108
|
+
var import_react10 = require("react");
|
|
24069
24109
|
var import_wallet3 = require("@meshsdk/wallet");
|
|
24070
24110
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
24071
24111
|
var localstoragekey = "mesh-burnerwallet";
|
|
@@ -24074,13 +24114,13 @@ function ScreenBurner({
|
|
|
24074
24114
|
provider,
|
|
24075
24115
|
setOpen
|
|
24076
24116
|
}) {
|
|
24077
|
-
const [loading, setLoading] = (0,
|
|
24078
|
-
const [hasKeyInStorage, setHasKeyInStorage] = (0,
|
|
24117
|
+
const [loading, setLoading] = (0, import_react10.useState)(false);
|
|
24118
|
+
const [hasKeyInStorage, setHasKeyInStorage] = (0, import_react10.useState)(false);
|
|
24079
24119
|
const { setWallet } = useWallet();
|
|
24080
24120
|
function getKeyFromStorage() {
|
|
24081
24121
|
return localStorage.getItem(localstoragekey);
|
|
24082
24122
|
}
|
|
24083
|
-
(0,
|
|
24123
|
+
(0, import_react10.useEffect)(() => {
|
|
24084
24124
|
const key = getKeyFromStorage();
|
|
24085
24125
|
if (key) {
|
|
24086
24126
|
setHasKeyInStorage(true);
|
|
@@ -24120,7 +24160,6 @@ function ScreenBurner({
|
|
|
24120
24160
|
Button,
|
|
24121
24161
|
{
|
|
24122
24162
|
variant: "outline",
|
|
24123
|
-
className: "mesh-text-white",
|
|
24124
24163
|
onClick: () => {
|
|
24125
24164
|
handleRestoreWallet();
|
|
24126
24165
|
},
|
|
@@ -24132,7 +24171,6 @@ function ScreenBurner({
|
|
|
24132
24171
|
Button,
|
|
24133
24172
|
{
|
|
24134
24173
|
variant: "outline",
|
|
24135
|
-
className: "mesh-text-white",
|
|
24136
24174
|
onClick: () => {
|
|
24137
24175
|
handleCreateWallet();
|
|
24138
24176
|
},
|
|
@@ -24333,6 +24371,7 @@ function ScreenMain({
|
|
|
24333
24371
|
extensions,
|
|
24334
24372
|
setOpen,
|
|
24335
24373
|
setScreen,
|
|
24374
|
+
persist,
|
|
24336
24375
|
cardanoPeerConnect,
|
|
24337
24376
|
burnerWallet,
|
|
24338
24377
|
webauthn
|
|
@@ -24346,7 +24385,7 @@ function ScreenMain({
|
|
|
24346
24385
|
icon: wallet.icon,
|
|
24347
24386
|
name: wallet.name,
|
|
24348
24387
|
action: () => {
|
|
24349
|
-
connect2(wallet.id, extensions);
|
|
24388
|
+
connect2(wallet.id, extensions, persist);
|
|
24350
24389
|
setOpen(false);
|
|
24351
24390
|
}
|
|
24352
24391
|
},
|
|
@@ -24399,19 +24438,19 @@ function ScreenMain({
|
|
|
24399
24438
|
}
|
|
24400
24439
|
|
|
24401
24440
|
// src/cardano-wallet/screen-p2p.tsx
|
|
24402
|
-
var
|
|
24441
|
+
var import_react11 = require("react");
|
|
24403
24442
|
var import_cardano_peer_connect = __toESM(require_dist(), 1);
|
|
24404
24443
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
24405
24444
|
function ScreenP2P({
|
|
24406
24445
|
cardanoPeerConnect,
|
|
24407
24446
|
setOpen
|
|
24408
24447
|
}) {
|
|
24409
|
-
const dAppConnect = (0,
|
|
24410
|
-
const qrCodeField = (0,
|
|
24411
|
-
const [address, setAddress] = (0,
|
|
24412
|
-
const [copied, setCopied] = (0,
|
|
24448
|
+
const dAppConnect = (0, import_react11.useRef)(null);
|
|
24449
|
+
const qrCodeField = (0, import_react11.useRef)(null);
|
|
24450
|
+
const [address, setAddress] = (0, import_react11.useState)("");
|
|
24451
|
+
const [copied, setCopied] = (0, import_react11.useState)(false);
|
|
24413
24452
|
const { connect: connect2 } = useWallet();
|
|
24414
|
-
(0,
|
|
24453
|
+
(0, import_react11.useEffect)(() => {
|
|
24415
24454
|
if (cardanoPeerConnect) {
|
|
24416
24455
|
if (dAppConnect.current === null) {
|
|
24417
24456
|
dAppConnect.current = new import_cardano_peer_connect.DAppPeerConnect({
|
|
@@ -24451,7 +24490,6 @@ function ScreenP2P({
|
|
|
24451
24490
|
Button,
|
|
24452
24491
|
{
|
|
24453
24492
|
variant: "outline",
|
|
24454
|
-
className: "mesh-text-white",
|
|
24455
24493
|
onClick: () => {
|
|
24456
24494
|
navigator.clipboard.writeText(address);
|
|
24457
24495
|
setCopied(true);
|
|
@@ -24463,7 +24501,7 @@ function ScreenP2P({
|
|
|
24463
24501
|
}
|
|
24464
24502
|
|
|
24465
24503
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
24466
|
-
var
|
|
24504
|
+
var import_react12 = require("react");
|
|
24467
24505
|
var import_wallet4 = require("@meshsdk/wallet");
|
|
24468
24506
|
|
|
24469
24507
|
// src/common/input.tsx
|
|
@@ -24513,9 +24551,9 @@ function ScreenWebauthn({
|
|
|
24513
24551
|
provider,
|
|
24514
24552
|
setOpen
|
|
24515
24553
|
}) {
|
|
24516
|
-
const [loading, setLoading] = (0,
|
|
24517
|
-
const [userName, setUserName] = (0,
|
|
24518
|
-
const [password, setPassword] = (0,
|
|
24554
|
+
const [loading, setLoading] = (0, import_react12.useState)(false);
|
|
24555
|
+
const [userName, setUserName] = (0, import_react12.useState)("");
|
|
24556
|
+
const [password, setPassword] = (0, import_react12.useState)("");
|
|
24519
24557
|
const { setWallet } = useWallet();
|
|
24520
24558
|
function createWallet(root) {
|
|
24521
24559
|
setTimeout(() => {
|
|
@@ -24587,26 +24625,30 @@ var CardanoWallet = ({
|
|
|
24587
24625
|
label = "Connect Wallet",
|
|
24588
24626
|
onConnected = void 0,
|
|
24589
24627
|
isDark = false,
|
|
24628
|
+
persist = false,
|
|
24590
24629
|
extensions = [],
|
|
24591
24630
|
injectFn = void 0,
|
|
24592
24631
|
cardanoPeerConnect = void 0,
|
|
24593
24632
|
burnerWallet = void 0,
|
|
24594
24633
|
webauthn = void 0
|
|
24595
24634
|
}) => {
|
|
24596
|
-
const [open, setOpen] = (0,
|
|
24597
|
-
const [screen, setScreen] = (0,
|
|
24598
|
-
const { wallet, connected } = useWallet();
|
|
24599
|
-
(0,
|
|
24635
|
+
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
24636
|
+
const [screen, setScreen] = (0, import_react13.useState)("main");
|
|
24637
|
+
const { wallet, connected, setPersist } = useWallet();
|
|
24638
|
+
(0, import_react13.useEffect)(() => {
|
|
24639
|
+
setPersist(persist);
|
|
24640
|
+
}, [persist]);
|
|
24641
|
+
(0, import_react13.useEffect)(() => {
|
|
24600
24642
|
if (connected) {
|
|
24601
24643
|
if (onConnected) onConnected();
|
|
24602
24644
|
}
|
|
24603
24645
|
}, [connected, wallet]);
|
|
24604
24646
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
|
|
24605
|
-
!connected ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "outline",
|
|
24647
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "outline", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ConnectedButton, {}) }),
|
|
24606
24648
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
24607
24649
|
DialogContent,
|
|
24608
24650
|
{
|
|
24609
|
-
className: "sm:mesh-max-w-[425px]",
|
|
24651
|
+
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
24610
24652
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
24611
24653
|
children: [
|
|
24612
24654
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Header, { screen, setScreen }),
|
|
@@ -24617,6 +24659,7 @@ var CardanoWallet = ({
|
|
|
24617
24659
|
extensions,
|
|
24618
24660
|
setOpen,
|
|
24619
24661
|
setScreen,
|
|
24662
|
+
persist,
|
|
24620
24663
|
cardanoPeerConnect: cardanoPeerConnect != void 0,
|
|
24621
24664
|
burnerWallet: burnerWallet != void 0,
|
|
24622
24665
|
webauthn: webauthn != void 0
|
|
@@ -24725,11 +24768,11 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime21
|
|
|
24725
24768
|
);
|
|
24726
24769
|
|
|
24727
24770
|
// src/stake-button/index.tsx
|
|
24728
|
-
var
|
|
24771
|
+
var import_react15 = require("react");
|
|
24729
24772
|
var import_transaction = require("@meshsdk/transaction");
|
|
24730
24773
|
|
|
24731
24774
|
// src/cardano-wallet-dropdown/index.tsx
|
|
24732
|
-
var
|
|
24775
|
+
var import_react14 = require("react");
|
|
24733
24776
|
|
|
24734
24777
|
// src/common/button-dropdown.tsx
|
|
24735
24778
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
@@ -24831,16 +24874,16 @@ var CardanoWallet2 = ({
|
|
|
24831
24874
|
extensions = [],
|
|
24832
24875
|
cardanoPeerConnect = void 0
|
|
24833
24876
|
}) => {
|
|
24834
|
-
const [isDarkMode, setIsDarkMode] = (0,
|
|
24835
|
-
const [hideMenuList, setHideMenuList] = (0,
|
|
24877
|
+
const [isDarkMode, setIsDarkMode] = (0, import_react14.useState)(false);
|
|
24878
|
+
const [hideMenuList, setHideMenuList] = (0, import_react14.useState)(true);
|
|
24836
24879
|
const { connect: connect2, connecting, connected, disconnect, name } = useWallet();
|
|
24837
24880
|
const wallets = useWalletList();
|
|
24838
|
-
(0,
|
|
24881
|
+
(0, import_react14.useEffect)(() => {
|
|
24839
24882
|
if (connected && onConnected) {
|
|
24840
24883
|
onConnected();
|
|
24841
24884
|
}
|
|
24842
24885
|
}, [connected]);
|
|
24843
|
-
(0,
|
|
24886
|
+
(0, import_react14.useEffect)(() => {
|
|
24844
24887
|
setIsDarkMode(isDark);
|
|
24845
24888
|
}, [isDark]);
|
|
24846
24889
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
@@ -24909,9 +24952,9 @@ var StakeButton = ({
|
|
|
24909
24952
|
onCheck,
|
|
24910
24953
|
onDelegated = void 0
|
|
24911
24954
|
}) => {
|
|
24912
|
-
const [isDarkMode, setIsDarkMode] = (0,
|
|
24955
|
+
const [isDarkMode, setIsDarkMode] = (0, import_react15.useState)(false);
|
|
24913
24956
|
const { connected } = useWallet();
|
|
24914
|
-
(0,
|
|
24957
|
+
(0, import_react15.useEffect)(() => {
|
|
24915
24958
|
setIsDarkMode(isDark);
|
|
24916
24959
|
}, [isDark]);
|
|
24917
24960
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: connected ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -24930,11 +24973,11 @@ var Delegate = ({
|
|
|
24930
24973
|
}) => {
|
|
24931
24974
|
const { wallet } = useWallet();
|
|
24932
24975
|
const rewardAddress = useRewardAddress();
|
|
24933
|
-
const [_, setError] = (0,
|
|
24934
|
-
const [checking, setChecking] = (0,
|
|
24935
|
-
const [accountInfo, setAccountInfo] = (0,
|
|
24936
|
-
const [processing, setProcessing] = (0,
|
|
24937
|
-
const [done, setDone] = (0,
|
|
24976
|
+
const [_, setError] = (0, import_react15.useState)();
|
|
24977
|
+
const [checking, setChecking] = (0, import_react15.useState)(false);
|
|
24978
|
+
const [accountInfo, setAccountInfo] = (0, import_react15.useState)();
|
|
24979
|
+
const [processing, setProcessing] = (0, import_react15.useState)(false);
|
|
24980
|
+
const [done, setDone] = (0, import_react15.useState)(false);
|
|
24938
24981
|
const checkAccountStatus = async () => {
|
|
24939
24982
|
try {
|
|
24940
24983
|
setChecking(true);
|
|
@@ -24985,7 +25028,7 @@ var Delegate = ({
|
|
|
24985
25028
|
}
|
|
24986
25029
|
setProcessing(false);
|
|
24987
25030
|
};
|
|
24988
|
-
(0,
|
|
25031
|
+
(0, import_react15.useEffect)(() => {
|
|
24989
25032
|
checkAccountStatus();
|
|
24990
25033
|
}, [rewardAddress]);
|
|
24991
25034
|
if (checking) {
|
package/dist/index.css
CHANGED
|
@@ -1379,109 +1379,112 @@ video {
|
|
|
1379
1379
|
--tw-enter-translate-y: -48%;
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1382
|
+
.dark\:mesh-border-zinc-800:is(.mesh-dark *) {
|
|
1383
|
+
--tw-border-opacity: 1;
|
|
1384
|
+
border-color: rgb(39 39 42 / var(--tw-border-opacity, 1));
|
|
1385
|
+
}
|
|
1386
1386
|
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1387
|
+
.dark\:mesh-bg-red-900:is(.mesh-dark *) {
|
|
1388
|
+
--tw-bg-opacity: 1;
|
|
1389
|
+
background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1));
|
|
1390
|
+
}
|
|
1390
1391
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1392
|
+
.dark\:mesh-bg-zinc-50:is(.mesh-dark *) {
|
|
1393
|
+
--tw-bg-opacity: 1;
|
|
1394
|
+
background-color: rgb(250 250 250 / var(--tw-bg-opacity, 1));
|
|
1395
|
+
}
|
|
1394
1396
|
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}
|
|
1397
|
+
.dark\:mesh-bg-zinc-800:is(.mesh-dark *) {
|
|
1398
|
+
--tw-bg-opacity: 1;
|
|
1399
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1400
|
+
}
|
|
1400
1401
|
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1402
|
+
.dark\:mesh-bg-zinc-950:is(.mesh-dark *) {
|
|
1403
|
+
--tw-bg-opacity: 1;
|
|
1404
|
+
background-color: rgb(9 9 11 / var(--tw-bg-opacity, 1));
|
|
1405
|
+
}
|
|
1404
1406
|
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1407
|
+
.dark\:mesh-text-white:is(.mesh-dark *) {
|
|
1408
|
+
--tw-text-opacity: 1;
|
|
1409
|
+
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1408
1410
|
}
|
|
1409
1411
|
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
}
|
|
1412
|
+
.dark\:mesh-text-zinc-50:is(.mesh-dark *) {
|
|
1413
|
+
--tw-text-opacity: 1;
|
|
1414
|
+
color: rgb(250 250 250 / var(--tw-text-opacity, 1));
|
|
1415
|
+
}
|
|
1415
1416
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1417
|
+
.dark\:mesh-text-zinc-900:is(.mesh-dark *) {
|
|
1418
|
+
--tw-text-opacity: 1;
|
|
1419
|
+
color: rgb(24 24 27 / var(--tw-text-opacity, 1));
|
|
1420
|
+
}
|
|
1420
1421
|
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
}
|
|
1422
|
+
.dark\:hover\:mesh-bg-red-900\/90:hover:is(.mesh-dark *) {
|
|
1423
|
+
background-color: rgb(127 29 29 / 0.9);
|
|
1424
|
+
}
|
|
1425
1425
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
}
|
|
1426
|
+
.dark\:hover\:mesh-bg-zinc-50\/90:hover:is(.mesh-dark *) {
|
|
1427
|
+
background-color: rgb(250 250 250 / 0.9);
|
|
1428
|
+
}
|
|
1430
1429
|
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1430
|
+
.dark\:hover\:mesh-bg-zinc-800:hover:is(.mesh-dark *) {
|
|
1431
|
+
--tw-bg-opacity: 1;
|
|
1432
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1433
|
+
}
|
|
1435
1434
|
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
}
|
|
1435
|
+
.dark\:hover\:mesh-bg-zinc-800\/80:hover:is(.mesh-dark *) {
|
|
1436
|
+
background-color: rgb(39 39 42 / 0.8);
|
|
1437
|
+
}
|
|
1440
1438
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1439
|
+
.dark\:hover\:mesh-text-zinc-50:hover:is(.mesh-dark *) {
|
|
1440
|
+
--tw-text-opacity: 1;
|
|
1441
|
+
color: rgb(250 250 250 / var(--tw-text-opacity, 1));
|
|
1442
|
+
}
|
|
1445
1443
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1444
|
+
.dark\:focus\:mesh-bg-zinc-800:focus:is(.mesh-dark *) {
|
|
1445
|
+
--tw-bg-opacity: 1;
|
|
1446
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1447
|
+
}
|
|
1449
1448
|
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1449
|
+
.dark\:focus\:mesh-text-zinc-50:focus:is(.mesh-dark *) {
|
|
1450
|
+
--tw-text-opacity: 1;
|
|
1451
|
+
color: rgb(250 250 250 / var(--tw-text-opacity, 1));
|
|
1452
|
+
}
|
|
1453
1453
|
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1454
|
+
.dark\:focus-visible\:mesh-ring-zinc-300:focus-visible:is(.mesh-dark *) {
|
|
1455
|
+
--tw-ring-opacity: 1;
|
|
1456
|
+
--tw-ring-color: rgb(212 212 216 / var(--tw-ring-opacity, 1));
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
.dark\:data-\[state\=open\]\:mesh-bg-zinc-800[data-state="open"]:is(.mesh-dark *) {
|
|
1460
|
+
--tw-bg-opacity: 1;
|
|
1461
|
+
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1462
|
+
}
|
|
1458
1463
|
|
|
1459
|
-
|
|
1460
|
-
|
|
1464
|
+
@media (min-width: 640px) {
|
|
1465
|
+
.sm\:mesh-max-w-\[425px\] {
|
|
1466
|
+
max-width: 425px;
|
|
1461
1467
|
}
|
|
1462
1468
|
|
|
1463
|
-
.
|
|
1464
|
-
|
|
1465
|
-
color: rgb(250 250 250 / var(--tw-text-opacity, 1));
|
|
1469
|
+
.sm\:mesh-flex-row {
|
|
1470
|
+
flex-direction: row;
|
|
1466
1471
|
}
|
|
1467
1472
|
|
|
1468
|
-
.
|
|
1469
|
-
|
|
1470
|
-
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1473
|
+
.sm\:mesh-justify-end {
|
|
1474
|
+
justify-content: flex-end;
|
|
1471
1475
|
}
|
|
1472
1476
|
|
|
1473
|
-
.
|
|
1474
|
-
--tw-
|
|
1475
|
-
|
|
1477
|
+
.sm\:mesh-space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
|
1478
|
+
--tw-space-x-reverse: 0;
|
|
1479
|
+
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
1480
|
+
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1476
1481
|
}
|
|
1477
1482
|
|
|
1478
|
-
.
|
|
1479
|
-
|
|
1480
|
-
--tw-ring-color: rgb(212 212 216 / var(--tw-ring-opacity, 1));
|
|
1483
|
+
.sm\:mesh-rounded-lg {
|
|
1484
|
+
border-radius: 0.5rem;
|
|
1481
1485
|
}
|
|
1482
1486
|
|
|
1483
|
-
.
|
|
1484
|
-
|
|
1485
|
-
background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1));
|
|
1487
|
+
.sm\:mesh-text-left {
|
|
1488
|
+
text-align: left;
|
|
1486
1489
|
}
|
|
1487
1490
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,7 @@ interface ButtonProps$1 {
|
|
|
7
7
|
label?: string;
|
|
8
8
|
onConnected?: Function;
|
|
9
9
|
isDark?: boolean;
|
|
10
|
+
persist?: boolean;
|
|
10
11
|
extensions?: number[];
|
|
11
12
|
injectFn?: () => Promise<void>;
|
|
12
13
|
cardanoPeerConnect?: {
|
|
@@ -26,17 +27,25 @@ interface ButtonProps$1 {
|
|
|
26
27
|
url: string;
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
declare const CardanoWallet: ({ label, onConnected, isDark, extensions, injectFn, cardanoPeerConnect, burnerWallet, webauthn, }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare const CardanoWallet: ({ label, onConnected, isDark, persist, extensions, injectFn, cardanoPeerConnect, burnerWallet, webauthn, }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
|
|
30
31
|
|
|
32
|
+
declare enum WalletState {
|
|
33
|
+
NOT_CONNECTED = "NOT_CONNECTED",
|
|
34
|
+
CONNECTING = "CONNECTING",
|
|
35
|
+
CONNECTED = "CONNECTED"
|
|
36
|
+
}
|
|
31
37
|
interface WalletContext {
|
|
32
38
|
hasConnectedWallet: boolean;
|
|
33
39
|
connectedWalletInstance: IWallet;
|
|
34
40
|
connectedWalletName: string | undefined;
|
|
35
41
|
connectingWallet: boolean;
|
|
36
|
-
connectWallet: (walletName: string, extensions?: number[]) => Promise<void>;
|
|
42
|
+
connectWallet: (walletName: string, extensions?: number[], persist?: boolean) => Promise<void>;
|
|
37
43
|
disconnect: () => void;
|
|
38
44
|
setWallet: (walletInstance: IWallet, walletName: string) => void;
|
|
45
|
+
setPersist: (persist: boolean) => void;
|
|
39
46
|
error?: unknown;
|
|
47
|
+
address: string;
|
|
48
|
+
state: WalletState;
|
|
40
49
|
}
|
|
41
50
|
declare const WalletContext: react.Context<WalletContext>;
|
|
42
51
|
|
|
@@ -64,10 +73,13 @@ declare const useWallet: () => {
|
|
|
64
73
|
connecting: boolean;
|
|
65
74
|
connected: boolean;
|
|
66
75
|
wallet: _meshsdk_common.IWallet;
|
|
67
|
-
connect: (walletName: string, extensions?: number[]) => Promise<void>;
|
|
76
|
+
connect: (walletName: string, extensions?: number[], persist?: boolean) => Promise<void>;
|
|
68
77
|
disconnect: () => void;
|
|
69
78
|
setWallet: (walletInstance: _meshsdk_common.IWallet, walletName: string) => void;
|
|
79
|
+
setPersist: (persist: boolean) => void;
|
|
70
80
|
error: unknown;
|
|
81
|
+
address: string;
|
|
82
|
+
state: WalletState;
|
|
71
83
|
};
|
|
72
84
|
|
|
73
85
|
declare const useWalletSubmit: () => {
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ interface ButtonProps$1 {
|
|
|
7
7
|
label?: string;
|
|
8
8
|
onConnected?: Function;
|
|
9
9
|
isDark?: boolean;
|
|
10
|
+
persist?: boolean;
|
|
10
11
|
extensions?: number[];
|
|
11
12
|
injectFn?: () => Promise<void>;
|
|
12
13
|
cardanoPeerConnect?: {
|
|
@@ -26,17 +27,25 @@ interface ButtonProps$1 {
|
|
|
26
27
|
url: string;
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
declare const CardanoWallet: ({ label, onConnected, isDark, extensions, injectFn, cardanoPeerConnect, burnerWallet, webauthn, }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare const CardanoWallet: ({ label, onConnected, isDark, persist, extensions, injectFn, cardanoPeerConnect, burnerWallet, webauthn, }: ButtonProps$1) => react_jsx_runtime.JSX.Element;
|
|
30
31
|
|
|
32
|
+
declare enum WalletState {
|
|
33
|
+
NOT_CONNECTED = "NOT_CONNECTED",
|
|
34
|
+
CONNECTING = "CONNECTING",
|
|
35
|
+
CONNECTED = "CONNECTED"
|
|
36
|
+
}
|
|
31
37
|
interface WalletContext {
|
|
32
38
|
hasConnectedWallet: boolean;
|
|
33
39
|
connectedWalletInstance: IWallet;
|
|
34
40
|
connectedWalletName: string | undefined;
|
|
35
41
|
connectingWallet: boolean;
|
|
36
|
-
connectWallet: (walletName: string, extensions?: number[]) => Promise<void>;
|
|
42
|
+
connectWallet: (walletName: string, extensions?: number[], persist?: boolean) => Promise<void>;
|
|
37
43
|
disconnect: () => void;
|
|
38
44
|
setWallet: (walletInstance: IWallet, walletName: string) => void;
|
|
45
|
+
setPersist: (persist: boolean) => void;
|
|
39
46
|
error?: unknown;
|
|
47
|
+
address: string;
|
|
48
|
+
state: WalletState;
|
|
40
49
|
}
|
|
41
50
|
declare const WalletContext: react.Context<WalletContext>;
|
|
42
51
|
|
|
@@ -64,10 +73,13 @@ declare const useWallet: () => {
|
|
|
64
73
|
connecting: boolean;
|
|
65
74
|
connected: boolean;
|
|
66
75
|
wallet: _meshsdk_common.IWallet;
|
|
67
|
-
connect: (walletName: string, extensions?: number[]) => Promise<void>;
|
|
76
|
+
connect: (walletName: string, extensions?: number[], persist?: boolean) => Promise<void>;
|
|
68
77
|
disconnect: () => void;
|
|
69
78
|
setWallet: (walletInstance: _meshsdk_common.IWallet, walletName: string) => void;
|
|
79
|
+
setPersist: (persist: boolean) => void;
|
|
70
80
|
error: unknown;
|
|
81
|
+
address: string;
|
|
82
|
+
state: WalletState;
|
|
71
83
|
};
|
|
72
84
|
|
|
73
85
|
declare const useWalletSubmit: () => {
|
package/dist/index.js
CHANGED
|
@@ -23432,7 +23432,7 @@ var require_dist = __commonJS({
|
|
|
23432
23432
|
});
|
|
23433
23433
|
|
|
23434
23434
|
// src/cardano-wallet/index.tsx
|
|
23435
|
-
import { useEffect as useEffect10, useState as
|
|
23435
|
+
import { useEffect as useEffect10, useState as useState12 } from "react";
|
|
23436
23436
|
|
|
23437
23437
|
// src/common/button.tsx
|
|
23438
23438
|
import * as React from "react";
|
|
@@ -23449,7 +23449,7 @@ function cn(...inputs) {
|
|
|
23449
23449
|
// src/common/button.tsx
|
|
23450
23450
|
import { jsx } from "react/jsx-runtime";
|
|
23451
23451
|
var buttonVariants = cva(
|
|
23452
|
-
"mesh-inline-flex mesh-items-center mesh-justify-center mesh-whitespace-nowrap mesh-rounded-md mesh-text-sm mesh-font-medium mesh-transition-colors focus-visible:mesh-outline-none focus-visible:mesh-ring-1 focus-visible:mesh-ring-zinc-950 disabled:mesh-pointer-events-none disabled:mesh-opacity-50 dark:focus-visible:mesh-ring-zinc-300",
|
|
23452
|
+
"mesh-inline-flex mesh-items-center mesh-justify-center mesh-whitespace-nowrap mesh-rounded-md mesh-text-sm mesh-font-medium mesh-transition-colors focus-visible:mesh-outline-none focus-visible:mesh-ring-1 focus-visible:mesh-ring-zinc-950 disabled:mesh-pointer-events-none disabled:mesh-opacity-50 dark:focus-visible:mesh-ring-zinc-300 dark:mesh-text-white",
|
|
23453
23453
|
{
|
|
23454
23454
|
variants: {
|
|
23455
23455
|
variant: {
|
|
@@ -23608,23 +23608,28 @@ function IconChevronRight() {
|
|
|
23608
23608
|
}
|
|
23609
23609
|
|
|
23610
23610
|
// src/hooks/useAddress.ts
|
|
23611
|
-
import { useContext, useEffect, useState as useState2 } from "react";
|
|
23611
|
+
import { useContext, useEffect as useEffect2, useState as useState2 } from "react";
|
|
23612
23612
|
|
|
23613
23613
|
// src/contexts/WalletContext.ts
|
|
23614
|
-
import { createContext, useCallback, useState } from "react";
|
|
23614
|
+
import { createContext, useCallback, useEffect, useState } from "react";
|
|
23615
23615
|
import { BrowserWallet } from "@meshsdk/wallet";
|
|
23616
23616
|
var INITIAL_STATE = {
|
|
23617
23617
|
walletName: void 0,
|
|
23618
23618
|
walletInstance: {}
|
|
23619
23619
|
};
|
|
23620
|
+
var localstoragePersist = "mesh-wallet-persist";
|
|
23620
23621
|
var useWalletStore = () => {
|
|
23621
23622
|
const [error, setError] = useState(void 0);
|
|
23623
|
+
const [state, setState] = useState("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23622
23624
|
const [connectingWallet, setConnectingWallet] = useState(false);
|
|
23625
|
+
const [persistSession, setPersistSession] = useState(false);
|
|
23626
|
+
const [address, setAddress] = useState("");
|
|
23623
23627
|
const [connectedWalletInstance, setConnectedWalletInstance] = useState(INITIAL_STATE.walletInstance);
|
|
23624
23628
|
const [connectedWalletName, setConnectedWalletName] = useState(INITIAL_STATE.walletName);
|
|
23625
23629
|
const connectWallet = useCallback(
|
|
23626
|
-
async (walletName, extensions) => {
|
|
23630
|
+
async (walletName, extensions, persist) => {
|
|
23627
23631
|
setConnectingWallet(true);
|
|
23632
|
+
setState("CONNECTING" /* CONNECTING */);
|
|
23628
23633
|
try {
|
|
23629
23634
|
const walletInstance = await BrowserWallet.enable(
|
|
23630
23635
|
walletName,
|
|
@@ -23633,8 +23638,18 @@ var useWalletStore = () => {
|
|
|
23633
23638
|
setConnectedWalletInstance(walletInstance);
|
|
23634
23639
|
setConnectedWalletName(walletName);
|
|
23635
23640
|
setError(void 0);
|
|
23641
|
+
if (persist) {
|
|
23642
|
+
localStorage.setItem(
|
|
23643
|
+
localstoragePersist,
|
|
23644
|
+
JSON.stringify({ walletName })
|
|
23645
|
+
);
|
|
23646
|
+
}
|
|
23647
|
+
setState("CONNECTED" /* CONNECTED */);
|
|
23636
23648
|
} catch (error2) {
|
|
23637
23649
|
setError(error2);
|
|
23650
|
+
setState("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23651
|
+
setConnectedWalletName(INITIAL_STATE.walletName);
|
|
23652
|
+
setConnectedWalletInstance(INITIAL_STATE.walletInstance);
|
|
23638
23653
|
}
|
|
23639
23654
|
setConnectingWallet(false);
|
|
23640
23655
|
},
|
|
@@ -23643,14 +23658,40 @@ var useWalletStore = () => {
|
|
|
23643
23658
|
const disconnect = useCallback(() => {
|
|
23644
23659
|
setConnectedWalletName(INITIAL_STATE.walletName);
|
|
23645
23660
|
setConnectedWalletInstance(INITIAL_STATE.walletInstance);
|
|
23661
|
+
setState("NOT_CONNECTED" /* NOT_CONNECTED */);
|
|
23662
|
+
localStorage.removeItem(localstoragePersist);
|
|
23646
23663
|
}, []);
|
|
23647
23664
|
const setWallet = useCallback(
|
|
23648
23665
|
async (walletInstance, walletName) => {
|
|
23649
23666
|
setConnectedWalletInstance(walletInstance);
|
|
23650
23667
|
setConnectedWalletName(walletName);
|
|
23668
|
+
setState("CONNECTED" /* CONNECTED */);
|
|
23651
23669
|
},
|
|
23652
23670
|
[]
|
|
23653
23671
|
);
|
|
23672
|
+
const setPersist = useCallback((persist) => {
|
|
23673
|
+
setPersistSession(persist);
|
|
23674
|
+
}, []);
|
|
23675
|
+
useEffect(() => {
|
|
23676
|
+
async function load() {
|
|
23677
|
+
if (Object.keys(connectedWalletInstance).length > 0 && address.length === 0) {
|
|
23678
|
+
let address2 = (await connectedWalletInstance.getUnusedAddresses())[0];
|
|
23679
|
+
if (!address2)
|
|
23680
|
+
address2 = await connectedWalletInstance.getChangeAddress();
|
|
23681
|
+
setAddress(address2);
|
|
23682
|
+
}
|
|
23683
|
+
}
|
|
23684
|
+
load();
|
|
23685
|
+
}, [connectedWalletInstance]);
|
|
23686
|
+
useEffect(() => {
|
|
23687
|
+
const persist = localStorage.getItem(localstoragePersist);
|
|
23688
|
+
if (persistSession && persist) {
|
|
23689
|
+
const persist2 = JSON.parse(
|
|
23690
|
+
localStorage.getItem(localstoragePersist) || ""
|
|
23691
|
+
);
|
|
23692
|
+
connectWallet(persist2.walletName);
|
|
23693
|
+
}
|
|
23694
|
+
}, [persistSession]);
|
|
23654
23695
|
return {
|
|
23655
23696
|
hasConnectedWallet: INITIAL_STATE.walletName !== connectedWalletName,
|
|
23656
23697
|
connectedWalletInstance,
|
|
@@ -23659,7 +23700,10 @@ var useWalletStore = () => {
|
|
|
23659
23700
|
connectWallet,
|
|
23660
23701
|
disconnect,
|
|
23661
23702
|
setWallet,
|
|
23662
|
-
|
|
23703
|
+
setPersist,
|
|
23704
|
+
error,
|
|
23705
|
+
address,
|
|
23706
|
+
state
|
|
23663
23707
|
};
|
|
23664
23708
|
};
|
|
23665
23709
|
var WalletContext = createContext({
|
|
@@ -23672,7 +23716,11 @@ var WalletContext = createContext({
|
|
|
23672
23716
|
disconnect: () => {
|
|
23673
23717
|
},
|
|
23674
23718
|
setWallet: async () => {
|
|
23675
|
-
}
|
|
23719
|
+
},
|
|
23720
|
+
setPersist: () => {
|
|
23721
|
+
},
|
|
23722
|
+
address: "",
|
|
23723
|
+
state: "NOT_CONNECTED" /* NOT_CONNECTED */
|
|
23676
23724
|
});
|
|
23677
23725
|
|
|
23678
23726
|
// src/contexts/index.tsx
|
|
@@ -23686,7 +23734,7 @@ var MeshProvider = (props) => {
|
|
|
23686
23734
|
var useAddress = (accountId = 0) => {
|
|
23687
23735
|
const [address, setAddress] = useState2();
|
|
23688
23736
|
const { hasConnectedWallet, connectedWalletInstance } = useContext(WalletContext);
|
|
23689
|
-
|
|
23737
|
+
useEffect2(() => {
|
|
23690
23738
|
if (hasConnectedWallet) {
|
|
23691
23739
|
connectedWalletInstance.getUsedAddresses().then((addresses) => {
|
|
23692
23740
|
if (addresses[accountId]) {
|
|
@@ -23699,11 +23747,11 @@ var useAddress = (accountId = 0) => {
|
|
|
23699
23747
|
};
|
|
23700
23748
|
|
|
23701
23749
|
// src/hooks/useAssets.ts
|
|
23702
|
-
import { useContext as useContext2, useEffect as
|
|
23750
|
+
import { useContext as useContext2, useEffect as useEffect3, useState as useState3 } from "react";
|
|
23703
23751
|
var useAssets = () => {
|
|
23704
23752
|
const [assets, setAssets] = useState3();
|
|
23705
23753
|
const { hasConnectedWallet, connectedWalletInstance } = useContext2(WalletContext);
|
|
23706
|
-
|
|
23754
|
+
useEffect3(() => {
|
|
23707
23755
|
if (hasConnectedWallet) {
|
|
23708
23756
|
connectedWalletInstance.getAssets().then(setAssets);
|
|
23709
23757
|
}
|
|
@@ -23712,13 +23760,13 @@ var useAssets = () => {
|
|
|
23712
23760
|
};
|
|
23713
23761
|
|
|
23714
23762
|
// src/hooks/useWalletList.ts
|
|
23715
|
-
import { useEffect as
|
|
23763
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
23716
23764
|
import { BrowserWallet as BrowserWallet2 } from "@meshsdk/wallet";
|
|
23717
23765
|
var useWalletList = ({
|
|
23718
23766
|
injectFn = void 0
|
|
23719
23767
|
} = {}) => {
|
|
23720
23768
|
const [wallets, setWallets] = useState4([]);
|
|
23721
|
-
|
|
23769
|
+
useEffect4(() => {
|
|
23722
23770
|
async function get() {
|
|
23723
23771
|
setWallets(await BrowserWallet2.getAvailableWallets({ injectFn }));
|
|
23724
23772
|
}
|
|
@@ -23728,12 +23776,12 @@ var useWalletList = ({
|
|
|
23728
23776
|
};
|
|
23729
23777
|
|
|
23730
23778
|
// src/hooks/useLovelace.ts
|
|
23731
|
-
import { useContext as useContext3, useEffect as
|
|
23779
|
+
import { useContext as useContext3, useEffect as useEffect5, useMemo, useRef, useState as useState5 } from "react";
|
|
23732
23780
|
var useLovelace = () => {
|
|
23733
23781
|
const [lovelace, setLovelace] = useState5();
|
|
23734
23782
|
const { hasConnectedWallet, connectedWalletInstance } = useContext3(WalletContext);
|
|
23735
23783
|
const hasFetchedLovelace = useRef(false);
|
|
23736
|
-
|
|
23784
|
+
useEffect5(() => {
|
|
23737
23785
|
async function getLovelace() {
|
|
23738
23786
|
if (hasConnectedWallet && !hasFetchedLovelace.current) {
|
|
23739
23787
|
setLovelace(await connectedWalletInstance.getLovelace());
|
|
@@ -23749,11 +23797,11 @@ var useLovelace = () => {
|
|
|
23749
23797
|
};
|
|
23750
23798
|
|
|
23751
23799
|
// src/hooks/useNetwork.ts
|
|
23752
|
-
import { useContext as useContext4, useEffect as
|
|
23800
|
+
import { useContext as useContext4, useEffect as useEffect6, useState as useState6 } from "react";
|
|
23753
23801
|
var useNetwork = () => {
|
|
23754
23802
|
const [networkId, setNetworkId] = useState6();
|
|
23755
23803
|
const { hasConnectedWallet, connectedWalletInstance } = useContext4(WalletContext);
|
|
23756
|
-
|
|
23804
|
+
useEffect6(() => {
|
|
23757
23805
|
if (hasConnectedWallet) {
|
|
23758
23806
|
connectedWalletInstance.getNetworkId().then(setNetworkId);
|
|
23759
23807
|
} else {
|
|
@@ -23764,11 +23812,11 @@ var useNetwork = () => {
|
|
|
23764
23812
|
};
|
|
23765
23813
|
|
|
23766
23814
|
// src/hooks/useRewardAddress.ts
|
|
23767
|
-
import { useContext as useContext5, useEffect as
|
|
23815
|
+
import { useContext as useContext5, useEffect as useEffect7, useState as useState7 } from "react";
|
|
23768
23816
|
var useRewardAddress = (accountId = 0) => {
|
|
23769
23817
|
const [rewardAddress, setRewardAddress] = useState7();
|
|
23770
23818
|
const { hasConnectedWallet, connectedWalletInstance } = useContext5(WalletContext);
|
|
23771
|
-
|
|
23819
|
+
useEffect7(() => {
|
|
23772
23820
|
if (hasConnectedWallet) {
|
|
23773
23821
|
connectedWalletInstance.getRewardAddresses().then((addresses) => {
|
|
23774
23822
|
if (addresses[accountId]) {
|
|
@@ -23791,7 +23839,10 @@ var useWallet = () => {
|
|
|
23791
23839
|
connectWallet,
|
|
23792
23840
|
disconnect,
|
|
23793
23841
|
setWallet,
|
|
23794
|
-
|
|
23842
|
+
setPersist,
|
|
23843
|
+
error,
|
|
23844
|
+
address,
|
|
23845
|
+
state
|
|
23795
23846
|
} = useContext6(WalletContext);
|
|
23796
23847
|
if (connectWallet === void 0 || disconnect === void 0) {
|
|
23797
23848
|
throw new Error(
|
|
@@ -23806,7 +23857,10 @@ var useWallet = () => {
|
|
|
23806
23857
|
connect: connectWallet,
|
|
23807
23858
|
disconnect,
|
|
23808
23859
|
setWallet,
|
|
23809
|
-
|
|
23860
|
+
setPersist,
|
|
23861
|
+
error,
|
|
23862
|
+
address,
|
|
23863
|
+
state
|
|
23810
23864
|
};
|
|
23811
23865
|
};
|
|
23812
23866
|
|
|
@@ -23841,9 +23895,6 @@ var useWalletSubmit = () => {
|
|
|
23841
23895
|
};
|
|
23842
23896
|
};
|
|
23843
23897
|
|
|
23844
|
-
// src/cardano-wallet/connected-button.tsx
|
|
23845
|
-
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
23846
|
-
|
|
23847
23898
|
// src/common/dropdown-menu.tsx
|
|
23848
23899
|
import * as React3 from "react";
|
|
23849
23900
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
@@ -23983,20 +24034,9 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
23983
24034
|
// src/cardano-wallet/connected-button.tsx
|
|
23984
24035
|
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
23985
24036
|
function ConnectedButton() {
|
|
23986
|
-
const { wallet, connected, disconnect } = useWallet();
|
|
23987
|
-
const [address, setAddress] = useState9("");
|
|
23988
|
-
useEffect7(() => {
|
|
23989
|
-
if (connected && wallet) {
|
|
23990
|
-
async function afterConnectedWallet() {
|
|
23991
|
-
let address2 = (await wallet.getUnusedAddresses())[0];
|
|
23992
|
-
if (!address2) address2 = await wallet.getChangeAddress();
|
|
23993
|
-
setAddress(address2);
|
|
23994
|
-
}
|
|
23995
|
-
afterConnectedWallet();
|
|
23996
|
-
}
|
|
23997
|
-
}, [connected, wallet]);
|
|
24037
|
+
const { wallet, connected, disconnect, address } = useWallet();
|
|
23998
24038
|
return /* @__PURE__ */ jsxs3(DropdownMenu, { children: [
|
|
23999
|
-
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs3(Button, { variant: "outline",
|
|
24039
|
+
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs3(Button, { variant: "outline", children: [
|
|
24000
24040
|
address.slice(0, 6),
|
|
24001
24041
|
"...",
|
|
24002
24042
|
address.slice(-6)
|
|
@@ -24044,7 +24084,7 @@ var screens = {
|
|
|
24044
24084
|
};
|
|
24045
24085
|
|
|
24046
24086
|
// src/cardano-wallet/screen-burner.tsx
|
|
24047
|
-
import { useEffect as useEffect8, useState as
|
|
24087
|
+
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
24048
24088
|
import { MeshWallet } from "@meshsdk/wallet";
|
|
24049
24089
|
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
24050
24090
|
var localstoragekey = "mesh-burnerwallet";
|
|
@@ -24053,8 +24093,8 @@ function ScreenBurner({
|
|
|
24053
24093
|
provider,
|
|
24054
24094
|
setOpen
|
|
24055
24095
|
}) {
|
|
24056
|
-
const [loading, setLoading] =
|
|
24057
|
-
const [hasKeyInStorage, setHasKeyInStorage] =
|
|
24096
|
+
const [loading, setLoading] = useState9(false);
|
|
24097
|
+
const [hasKeyInStorage, setHasKeyInStorage] = useState9(false);
|
|
24058
24098
|
const { setWallet } = useWallet();
|
|
24059
24099
|
function getKeyFromStorage() {
|
|
24060
24100
|
return localStorage.getItem(localstoragekey);
|
|
@@ -24099,7 +24139,6 @@ function ScreenBurner({
|
|
|
24099
24139
|
Button,
|
|
24100
24140
|
{
|
|
24101
24141
|
variant: "outline",
|
|
24102
|
-
className: "mesh-text-white",
|
|
24103
24142
|
onClick: () => {
|
|
24104
24143
|
handleRestoreWallet();
|
|
24105
24144
|
},
|
|
@@ -24111,7 +24150,6 @@ function ScreenBurner({
|
|
|
24111
24150
|
Button,
|
|
24112
24151
|
{
|
|
24113
24152
|
variant: "outline",
|
|
24114
|
-
className: "mesh-text-white",
|
|
24115
24153
|
onClick: () => {
|
|
24116
24154
|
handleCreateWallet();
|
|
24117
24155
|
},
|
|
@@ -24312,6 +24350,7 @@ function ScreenMain({
|
|
|
24312
24350
|
extensions,
|
|
24313
24351
|
setOpen,
|
|
24314
24352
|
setScreen,
|
|
24353
|
+
persist,
|
|
24315
24354
|
cardanoPeerConnect,
|
|
24316
24355
|
burnerWallet,
|
|
24317
24356
|
webauthn
|
|
@@ -24325,7 +24364,7 @@ function ScreenMain({
|
|
|
24325
24364
|
icon: wallet.icon,
|
|
24326
24365
|
name: wallet.name,
|
|
24327
24366
|
action: () => {
|
|
24328
|
-
connect2(wallet.id, extensions);
|
|
24367
|
+
connect2(wallet.id, extensions, persist);
|
|
24329
24368
|
setOpen(false);
|
|
24330
24369
|
}
|
|
24331
24370
|
},
|
|
@@ -24379,7 +24418,7 @@ function ScreenMain({
|
|
|
24379
24418
|
|
|
24380
24419
|
// src/cardano-wallet/screen-p2p.tsx
|
|
24381
24420
|
var import_cardano_peer_connect = __toESM(require_dist(), 1);
|
|
24382
|
-
import { useEffect as useEffect9, useRef as useRef2, useState as
|
|
24421
|
+
import { useEffect as useEffect9, useRef as useRef2, useState as useState10 } from "react";
|
|
24383
24422
|
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
24384
24423
|
function ScreenP2P({
|
|
24385
24424
|
cardanoPeerConnect,
|
|
@@ -24387,8 +24426,8 @@ function ScreenP2P({
|
|
|
24387
24426
|
}) {
|
|
24388
24427
|
const dAppConnect = useRef2(null);
|
|
24389
24428
|
const qrCodeField = useRef2(null);
|
|
24390
|
-
const [address, setAddress] =
|
|
24391
|
-
const [copied, setCopied] =
|
|
24429
|
+
const [address, setAddress] = useState10("");
|
|
24430
|
+
const [copied, setCopied] = useState10(false);
|
|
24392
24431
|
const { connect: connect2 } = useWallet();
|
|
24393
24432
|
useEffect9(() => {
|
|
24394
24433
|
if (cardanoPeerConnect) {
|
|
@@ -24430,7 +24469,6 @@ function ScreenP2P({
|
|
|
24430
24469
|
Button,
|
|
24431
24470
|
{
|
|
24432
24471
|
variant: "outline",
|
|
24433
|
-
className: "mesh-text-white",
|
|
24434
24472
|
onClick: () => {
|
|
24435
24473
|
navigator.clipboard.writeText(address);
|
|
24436
24474
|
setCopied(true);
|
|
@@ -24442,7 +24480,7 @@ function ScreenP2P({
|
|
|
24442
24480
|
}
|
|
24443
24481
|
|
|
24444
24482
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
24445
|
-
import { useState as
|
|
24483
|
+
import { useState as useState11 } from "react";
|
|
24446
24484
|
import { connect, MeshWallet as MeshWallet2 } from "@meshsdk/wallet";
|
|
24447
24485
|
|
|
24448
24486
|
// src/common/input.tsx
|
|
@@ -24492,9 +24530,9 @@ function ScreenWebauthn({
|
|
|
24492
24530
|
provider,
|
|
24493
24531
|
setOpen
|
|
24494
24532
|
}) {
|
|
24495
|
-
const [loading, setLoading] =
|
|
24496
|
-
const [userName, setUserName] =
|
|
24497
|
-
const [password, setPassword] =
|
|
24533
|
+
const [loading, setLoading] = useState11(false);
|
|
24534
|
+
const [userName, setUserName] = useState11("");
|
|
24535
|
+
const [password, setPassword] = useState11("");
|
|
24498
24536
|
const { setWallet } = useWallet();
|
|
24499
24537
|
function createWallet(root) {
|
|
24500
24538
|
setTimeout(() => {
|
|
@@ -24566,26 +24604,30 @@ var CardanoWallet = ({
|
|
|
24566
24604
|
label = "Connect Wallet",
|
|
24567
24605
|
onConnected = void 0,
|
|
24568
24606
|
isDark = false,
|
|
24607
|
+
persist = false,
|
|
24569
24608
|
extensions = [],
|
|
24570
24609
|
injectFn = void 0,
|
|
24571
24610
|
cardanoPeerConnect = void 0,
|
|
24572
24611
|
burnerWallet = void 0,
|
|
24573
24612
|
webauthn = void 0
|
|
24574
24613
|
}) => {
|
|
24575
|
-
const [open, setOpen] =
|
|
24576
|
-
const [screen, setScreen] =
|
|
24577
|
-
const { wallet, connected } = useWallet();
|
|
24614
|
+
const [open, setOpen] = useState12(false);
|
|
24615
|
+
const [screen, setScreen] = useState12("main");
|
|
24616
|
+
const { wallet, connected, setPersist } = useWallet();
|
|
24617
|
+
useEffect10(() => {
|
|
24618
|
+
setPersist(persist);
|
|
24619
|
+
}, [persist]);
|
|
24578
24620
|
useEffect10(() => {
|
|
24579
24621
|
if (connected) {
|
|
24580
24622
|
if (onConnected) onConnected();
|
|
24581
24623
|
}
|
|
24582
24624
|
}, [connected, wallet]);
|
|
24583
24625
|
return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
|
|
24584
|
-
!connected ? /* @__PURE__ */ jsx19(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx19(Button, { variant: "outline",
|
|
24626
|
+
/* @__PURE__ */ jsx19("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ jsx19(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx19(Button, { variant: "outline", children: label }) }) : /* @__PURE__ */ jsx19(ConnectedButton, {}) }),
|
|
24585
24627
|
/* @__PURE__ */ jsxs13(
|
|
24586
24628
|
DialogContent,
|
|
24587
24629
|
{
|
|
24588
|
-
className: "sm:mesh-max-w-[425px]",
|
|
24630
|
+
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
24589
24631
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
24590
24632
|
children: [
|
|
24591
24633
|
/* @__PURE__ */ jsx19(Header, { screen, setScreen }),
|
|
@@ -24596,6 +24638,7 @@ var CardanoWallet = ({
|
|
|
24596
24638
|
extensions,
|
|
24597
24639
|
setOpen,
|
|
24598
24640
|
setScreen,
|
|
24641
|
+
persist,
|
|
24599
24642
|
cardanoPeerConnect: cardanoPeerConnect != void 0,
|
|
24600
24643
|
burnerWallet: burnerWallet != void 0,
|
|
24601
24644
|
webauthn: webauthn != void 0
|
|
@@ -24704,11 +24747,11 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ jsxs14(
|
|
|
24704
24747
|
);
|
|
24705
24748
|
|
|
24706
24749
|
// src/stake-button/index.tsx
|
|
24707
|
-
import { useEffect as useEffect12, useState as
|
|
24750
|
+
import { useEffect as useEffect12, useState as useState14 } from "react";
|
|
24708
24751
|
import { Transaction } from "@meshsdk/transaction";
|
|
24709
24752
|
|
|
24710
24753
|
// src/cardano-wallet-dropdown/index.tsx
|
|
24711
|
-
import { useEffect as useEffect11, useState as
|
|
24754
|
+
import { useEffect as useEffect11, useState as useState13 } from "react";
|
|
24712
24755
|
|
|
24713
24756
|
// src/common/button-dropdown.tsx
|
|
24714
24757
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -24810,8 +24853,8 @@ var CardanoWallet2 = ({
|
|
|
24810
24853
|
extensions = [],
|
|
24811
24854
|
cardanoPeerConnect = void 0
|
|
24812
24855
|
}) => {
|
|
24813
|
-
const [isDarkMode, setIsDarkMode] =
|
|
24814
|
-
const [hideMenuList, setHideMenuList] =
|
|
24856
|
+
const [isDarkMode, setIsDarkMode] = useState13(false);
|
|
24857
|
+
const [hideMenuList, setHideMenuList] = useState13(true);
|
|
24815
24858
|
const { connect: connect2, connecting, connected, disconnect, name } = useWallet();
|
|
24816
24859
|
const wallets = useWalletList();
|
|
24817
24860
|
useEffect11(() => {
|
|
@@ -24888,7 +24931,7 @@ var StakeButton = ({
|
|
|
24888
24931
|
onCheck,
|
|
24889
24932
|
onDelegated = void 0
|
|
24890
24933
|
}) => {
|
|
24891
|
-
const [isDarkMode, setIsDarkMode] =
|
|
24934
|
+
const [isDarkMode, setIsDarkMode] = useState14(false);
|
|
24892
24935
|
const { connected } = useWallet();
|
|
24893
24936
|
useEffect12(() => {
|
|
24894
24937
|
setIsDarkMode(isDark);
|
|
@@ -24909,11 +24952,11 @@ var Delegate = ({
|
|
|
24909
24952
|
}) => {
|
|
24910
24953
|
const { wallet } = useWallet();
|
|
24911
24954
|
const rewardAddress = useRewardAddress();
|
|
24912
|
-
const [_, setError] =
|
|
24913
|
-
const [checking, setChecking] =
|
|
24914
|
-
const [accountInfo, setAccountInfo] =
|
|
24915
|
-
const [processing, setProcessing] =
|
|
24916
|
-
const [done, setDone] =
|
|
24955
|
+
const [_, setError] = useState14();
|
|
24956
|
+
const [checking, setChecking] = useState14(false);
|
|
24957
|
+
const [accountInfo, setAccountInfo] = useState14();
|
|
24958
|
+
const [processing, setProcessing] = useState14(false);
|
|
24959
|
+
const [done, setDone] = useState14(false);
|
|
24917
24960
|
const checkAccountStatus = async () => {
|
|
24918
24961
|
try {
|
|
24919
24962
|
setChecking(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.14",
|
|
4
4
|
"description": "React component library - https://meshjs.dev/react",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"browser": "./dist/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@fabianbormann/cardano-peer-connect": "^1.2.18",
|
|
33
|
-
"@meshsdk/common": "1.8.
|
|
34
|
-
"@meshsdk/transaction": "1.8.
|
|
35
|
-
"@meshsdk/wallet": "1.8.
|
|
33
|
+
"@meshsdk/common": "1.8.14",
|
|
34
|
+
"@meshsdk/transaction": "1.8.14",
|
|
35
|
+
"@meshsdk/wallet": "1.8.14",
|
|
36
36
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
37
37
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
38
38
|
"@radix-ui/react-icons": "^1.3.2",
|