@interchain-kit/react 0.0.1-beta.3 → 0.0.1-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/README.md +163 -12
- package/esm/hooks/index.js +2 -1
- package/esm/hooks/useAccount.js +22 -11
- package/esm/hooks/useChain.js +37 -5
- package/esm/hooks/useChainWallet.js +1 -0
- package/esm/hooks/useConfig.js +10 -0
- package/esm/hooks/useCurrentWallet.js +14 -0
- package/esm/hooks/useInterchainClient.js +38 -39
- package/esm/hooks/useOfflineSigner.js +15 -0
- package/esm/hooks/useWalletManager.js +2 -2
- package/esm/modal/modal.js +45 -13
- package/esm/modal/provider.js +1 -2
- package/esm/modal/views/Astronaut.js +4 -0
- package/esm/modal/views/Connected.js +32 -0
- package/esm/modal/views/Connecting.js +33 -0
- package/esm/modal/views/QRCode.js +19 -0
- package/esm/modal/views/Reject.js +16 -0
- package/esm/modal/views/WalletList.js +32 -0
- package/esm/modal/views/index.js +5 -0
- package/esm/provider.js +9 -9
- package/esm/utils/index.js +1 -1
- package/esm/utils/wallet.js +8 -0
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +2 -1
- package/hooks/useAccount.d.ts +1 -1
- package/hooks/useAccount.js +21 -10
- package/hooks/useChain.d.ts +2 -2
- package/hooks/useChain.js +37 -5
- package/hooks/useChainWallet.js +1 -0
- package/hooks/useConfig.d.ts +8 -0
- package/hooks/useConfig.js +14 -0
- package/hooks/useCurrentWallet.d.ts +1 -0
- package/hooks/useCurrentWallet.js +18 -0
- package/hooks/useInterchainClient.d.ts +8 -7
- package/hooks/useInterchainClient.js +38 -39
- package/hooks/useOfflineSigner.d.ts +4 -0
- package/hooks/useOfflineSigner.js +19 -0
- package/hooks/useWalletManager.js +1 -1
- package/modal/modal.js +43 -11
- package/modal/provider.js +1 -2
- package/modal/views/Astronaut.d.ts +2 -0
- package/modal/views/Astronaut.js +8 -0
- package/modal/views/Connected.d.ts +4 -0
- package/modal/views/Connected.js +37 -0
- package/modal/views/Connecting.d.ts +4 -0
- package/modal/views/Connecting.js +38 -0
- package/modal/views/QRCode.d.ts +4 -0
- package/modal/views/QRCode.js +24 -0
- package/modal/views/Reject.d.ts +4 -0
- package/modal/views/Reject.js +21 -0
- package/modal/views/WalletList.d.ts +2 -0
- package/modal/views/WalletList.js +37 -0
- package/modal/views/index.d.ts +5 -0
- package/modal/views/index.js +21 -0
- package/package.json +10 -5
- package/provider.d.ts +6 -6
- package/provider.js +9 -9
- package/types/chain.d.ts +20 -9
- package/types/wallet.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +16 -0
- package/utils/wallet.d.ts +7 -0
- package/utils/wallet.js +12 -0
- package/esm/hooks/useActiveWallet.js +0 -5
- package/hooks/useActiveWallet.d.ts +0 -1
- package/hooks/useActiveWallet.js +0 -9
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectingContent = exports.ConnectingHeader = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@interchain-ui/react");
|
|
6
|
+
const hooks_1 = require("../../hooks");
|
|
7
|
+
const provider_1 = require("../provider");
|
|
8
|
+
const ConnectingHeader = ({ onBack }) => {
|
|
9
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
10
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
11
|
+
const walletManager = (0, hooks_1.useWalletManager)();
|
|
12
|
+
if (!currentWallet)
|
|
13
|
+
return null;
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalHead, { title: currentWallet.option.prettyName, hasBackButton: true, onClose: close, onBack: onBack, closeButtonProps: {
|
|
15
|
+
onClick: async () => {
|
|
16
|
+
await walletManager.disconnect(currentWallet.option.name);
|
|
17
|
+
close();
|
|
18
|
+
},
|
|
19
|
+
} }));
|
|
20
|
+
};
|
|
21
|
+
exports.ConnectingHeader = ConnectingHeader;
|
|
22
|
+
const ConnectingContent = () => {
|
|
23
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
24
|
+
const { option: { prettyName, mode }, } = currentWallet;
|
|
25
|
+
let title = "Requesting Connection";
|
|
26
|
+
let desc = mode === "wallet-connect"
|
|
27
|
+
? `Approve ${prettyName} connection request on your mobile.`
|
|
28
|
+
: `Open the ${prettyName} browser extension to connect your wallet.`;
|
|
29
|
+
if (!currentWallet)
|
|
30
|
+
return null;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalStatus, { wallet: {
|
|
32
|
+
name: currentWallet.option.name,
|
|
33
|
+
prettyName: currentWallet.option.prettyName,
|
|
34
|
+
logo: currentWallet.option.logo,
|
|
35
|
+
mobileDisabled: true,
|
|
36
|
+
}, status: "Connecting", contentHeader: title, contentDesc: desc }));
|
|
37
|
+
};
|
|
38
|
+
exports.ConnectingContent = ConnectingContent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QRCodeContent = exports.QRCodeHeader = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@interchain-ui/react");
|
|
6
|
+
const hooks_1 = require("../../hooks");
|
|
7
|
+
const provider_1 = require("../provider");
|
|
8
|
+
const QRCodeHeader = ({ onBack }) => {
|
|
9
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
10
|
+
const walletManager = (0, hooks_1.useWalletManager)();
|
|
11
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalHead, { title: currentWallet?.option?.prettyName || "", hasBackButton: true, onClose: () => void 0, onBack: async () => {
|
|
13
|
+
await walletManager.disconnect(currentWallet?.option?.name || "");
|
|
14
|
+
onBack();
|
|
15
|
+
}, closeButtonProps: { onClick: close } }));
|
|
16
|
+
};
|
|
17
|
+
exports.QRCodeHeader = QRCodeHeader;
|
|
18
|
+
const QRCodeContent = () => {
|
|
19
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
20
|
+
const walletManager = (0, hooks_1.useWalletManager)();
|
|
21
|
+
const data = currentWallet.pairingUri;
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalQRCode, { status: data ? "Done" : "Pending", link: data, description: "Open App to connect", errorTitle: "errorTitle", errorDesc: currentWallet.errorMessage || "", onRefresh: () => walletManager.connect(currentWallet?.option?.name || "") }));
|
|
23
|
+
};
|
|
24
|
+
exports.QRCodeContent = QRCodeContent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RejectContent = exports.RejectHeader = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@interchain-ui/react");
|
|
6
|
+
const provider_1 = require("../provider");
|
|
7
|
+
const hooks_1 = require("../../hooks");
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
const RejectHeader = ({ onBack }) => {
|
|
10
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
11
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalHead, { title: currentWallet.option.prettyName, hasBackButton: true, onClose: close, onBack: onBack, closeButtonProps: { onClick: close } }));
|
|
13
|
+
};
|
|
14
|
+
exports.RejectHeader = RejectHeader;
|
|
15
|
+
const RejectContent = () => {
|
|
16
|
+
const currentWallet = (0, hooks_1.useCurrentWallet)();
|
|
17
|
+
const walletManager = (0, hooks_1.useWalletManager)();
|
|
18
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalStatus, { status: "Rejected", wallet: (0, utils_1.getWalletInfo)(currentWallet), contentHeader: "Request Rejected", contentDesc: currentWallet.errorMessage || "Connection permission is denied.", onConnect: () => walletManager.connect(currentWallet.option.name).then(close) }));
|
|
20
|
+
};
|
|
21
|
+
exports.RejectContent = RejectContent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletListContent = exports.WalletListHeader = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@interchain-ui/react");
|
|
6
|
+
const provider_1 = require("../provider");
|
|
7
|
+
const hooks_1 = require("../../hooks");
|
|
8
|
+
const WalletListHeader = () => {
|
|
9
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_1.ConnectModalHead, { title: "Select your wallet", hasBackButton: false, onClose: close, closeButtonProps: { onClick: close } }));
|
|
11
|
+
};
|
|
12
|
+
exports.WalletListHeader = WalletListHeader;
|
|
13
|
+
const WalletListContent = () => {
|
|
14
|
+
const walletManager = (0, hooks_1.useWalletManager)();
|
|
15
|
+
const { close } = (0, provider_1.useWalletModal)();
|
|
16
|
+
const wallets = walletManager.wallets.map((w) => {
|
|
17
|
+
return ({
|
|
18
|
+
name: w.option.name,
|
|
19
|
+
prettyName: w.option.prettyName,
|
|
20
|
+
logo: w.option.logo,
|
|
21
|
+
mobileDisabled: true,
|
|
22
|
+
shape: 'list',
|
|
23
|
+
originalWallet: w
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
const onWalletClick = async (wallet) => {
|
|
27
|
+
try {
|
|
28
|
+
await walletManager.connect(wallet.option.name);
|
|
29
|
+
close();
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.log(error);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return (0, jsx_runtime_1.jsx)(react_1.ConnectModalWalletList, { wallets: wallets, onWalletItemClick: onWalletClick });
|
|
36
|
+
};
|
|
37
|
+
exports.WalletListContent = WalletListContent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Connecting"), exports);
|
|
18
|
+
__exportStar(require("./WalletList"), exports);
|
|
19
|
+
__exportStar(require("./Connected"), exports);
|
|
20
|
+
__exportStar(require("./Reject"), exports);
|
|
21
|
+
__exportStar(require("./QRCode"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interchain-kit/react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.31",
|
|
4
4
|
"author": "cosmology-tech <developers@cosmology.zone>",
|
|
5
5
|
"description": "interchain-kit wallet connector react package",
|
|
6
6
|
"main": "index.js",
|
|
@@ -27,16 +27,21 @@
|
|
|
27
27
|
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
|
|
28
28
|
"lint": "eslint . --fix",
|
|
29
29
|
"test": "jest",
|
|
30
|
-
"test:watch": "jest --watch"
|
|
30
|
+
"test:watch": "jest --watch",
|
|
31
|
+
"dev": "tsc -w --preserveWatchOutput -p tsconfig.esm.json"
|
|
31
32
|
},
|
|
32
33
|
"keywords": [],
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@chain-registry/v2-types": "^0.
|
|
35
|
-
"@interchain-kit/core": "0.0.1-beta.
|
|
35
|
+
"@chain-registry/v2-types": "^0.53.0",
|
|
36
|
+
"@interchain-kit/core": "0.0.1-beta.31",
|
|
37
|
+
"@interchain-ui/react": "1.24.0",
|
|
38
|
+
"@interchainjs/cosmos-types": "0.0.1-beta.13",
|
|
39
|
+
"@interchainjs/injective": "0.0.1-beta.18",
|
|
36
40
|
"@types/react": "^18.3.3",
|
|
37
41
|
"@types/react-dom": "^18.3.0",
|
|
42
|
+
"interchainjs": "0.0.1-beta.19",
|
|
38
43
|
"react": "^18.3.1",
|
|
39
44
|
"react-dom": "^18.3.1"
|
|
40
45
|
},
|
|
41
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "8e43c08ce6e6ce5647832415a2429f7c91a2ced6"
|
|
42
47
|
}
|
package/provider.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { BaseWallet, SignerOptions, WalletManager, EndpointOptions } from
|
|
3
|
-
import { AssetList, Chain } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseWallet, SignerOptions, WalletManager, EndpointOptions } from "@interchain-kit/core";
|
|
3
|
+
import { AssetList, Chain } from "@chain-registry/v2-types";
|
|
4
4
|
type InterchainWalletContextType = {
|
|
5
5
|
walletManager: WalletManager;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
7
|
+
type InterchainWalletProviderProps = {
|
|
8
8
|
chains: Chain[];
|
|
9
9
|
assetLists: AssetList[];
|
|
10
10
|
wallets: BaseWallet[];
|
|
@@ -12,6 +12,6 @@ type InterchianWalletProviderProps = {
|
|
|
12
12
|
endpointOptions: EndpointOptions;
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export declare const ChainProvider: ({ chains, assetLists, wallets, signerOptions, endpointOptions, children }:
|
|
16
|
-
export declare const
|
|
15
|
+
export declare const ChainProvider: ({ chains, assetLists, wallets, signerOptions, endpointOptions, children, }: InterchainWalletProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useInterchainWalletContext: () => InterchainWalletContextType;
|
|
17
17
|
export {};
|
package/provider.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useInterchainWalletContext = exports.ChainProvider = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_2 = require("react");
|
|
7
|
-
const core_1 = require("@
|
|
7
|
+
const core_1 = require("@interchain-kit/core");
|
|
8
8
|
const modal_1 = require("./modal");
|
|
9
|
-
const
|
|
10
|
-
const ChainProvider = ({ chains, assetLists, wallets, signerOptions, endpointOptions, children }) => {
|
|
9
|
+
const InterchainWalletContext = (0, react_2.createContext)(null);
|
|
10
|
+
const ChainProvider = ({ chains, assetLists, wallets, signerOptions, endpointOptions, children, }) => {
|
|
11
11
|
const [_, forceRender] = (0, react_1.useState)({});
|
|
12
12
|
const walletManager = (0, react_1.useMemo)(() => {
|
|
13
13
|
return new core_1.WalletManager(chains, assetLists, wallets, signerOptions, endpointOptions, () => forceRender({}));
|
|
@@ -15,14 +15,14 @@ const ChainProvider = ({ chains, assetLists, wallets, signerOptions, endpointOpt
|
|
|
15
15
|
(0, react_1.useEffect)(() => {
|
|
16
16
|
walletManager.init();
|
|
17
17
|
}, []);
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(InterchainWalletContext.Provider, { value: { walletManager }, children: (0, jsx_runtime_1.jsx)(modal_1.WalletModalProvider, { children: children }) }));
|
|
19
19
|
};
|
|
20
20
|
exports.ChainProvider = ChainProvider;
|
|
21
|
-
const
|
|
22
|
-
const context = (0, react_2.useContext)(
|
|
21
|
+
const useInterchainWalletContext = () => {
|
|
22
|
+
const context = (0, react_2.useContext)(InterchainWalletContext);
|
|
23
23
|
if (!context) {
|
|
24
|
-
throw new Error(
|
|
24
|
+
throw new Error("useInterChainWalletContext must be used within a InterChainProvider");
|
|
25
25
|
}
|
|
26
26
|
return context;
|
|
27
27
|
};
|
|
28
|
-
exports.
|
|
28
|
+
exports.useInterchainWalletContext = useInterchainWalletContext;
|
package/types/chain.d.ts
CHANGED
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { HttpEndpoint } from '@interchainjs/types';
|
|
2
|
+
import { CosmWasmSigningClient } from 'interchainjs/cosmwasm';
|
|
3
3
|
import { SigningClient } from 'interchainjs/signing-client';
|
|
4
4
|
import { RpcQuery } from 'interchainjs/query/rpc';
|
|
5
|
-
import {
|
|
6
|
-
import { HttpEndpoint } from '@cosmjs/stargate';
|
|
5
|
+
import { CosmosSigningClient } from 'interchainjs/cosmos';
|
|
7
6
|
import { Chain, AssetList } from '@chain-registry/v2-types';
|
|
8
|
-
import { BaseWallet } from '@
|
|
7
|
+
import { BaseWallet, WalletState } from '@interchain-kit/core';
|
|
8
|
+
export type CosmosKitUseChainReturnType = {
|
|
9
|
+
connect: () => void;
|
|
10
|
+
disconnect: () => void;
|
|
11
|
+
openView: () => void;
|
|
12
|
+
closeView: () => void;
|
|
13
|
+
getRpcEndpoint: () => Promise<string | HttpEndpoint>;
|
|
14
|
+
status: WalletState;
|
|
15
|
+
username: string;
|
|
16
|
+
message: string;
|
|
17
|
+
getSigningCosmWasmClient: () => Promise<CosmWasmSigningClient>;
|
|
18
|
+
getSigningCosmosClient: () => Promise<CosmosSigningClient>;
|
|
19
|
+
};
|
|
9
20
|
export type UseChainReturnType = {
|
|
21
|
+
logoUrl: string | undefined;
|
|
10
22
|
chain: Chain;
|
|
11
23
|
assetList: AssetList;
|
|
12
24
|
address: string;
|
|
13
25
|
wallet: BaseWallet;
|
|
14
26
|
rpcEndpoint: string | HttpEndpoint;
|
|
15
|
-
|
|
27
|
+
queryClient: RpcQuery;
|
|
16
28
|
signingClient: SigningClient;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cosmWasmSigningClient: CosmWasmSigningClient;
|
|
29
|
+
signingCosmosClient: CosmosSigningClient;
|
|
30
|
+
signingCosmWasmClient: CosmWasmSigningClient;
|
|
20
31
|
isLoading: boolean;
|
|
21
32
|
error: unknown;
|
|
22
33
|
};
|
package/types/wallet.d.ts
CHANGED
package/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './wallet';
|
package/utils/index.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./wallet"), exports);
|
package/utils/wallet.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWalletInfo = void 0;
|
|
4
|
+
const getWalletInfo = (wallet) => {
|
|
5
|
+
return {
|
|
6
|
+
name: wallet.option.name,
|
|
7
|
+
prettyName: wallet.option.prettyName,
|
|
8
|
+
logo: wallet.option.logo,
|
|
9
|
+
mobileDisabled: true,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.getWalletInfo = getWalletInfo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useActiveWallet: () => import("@interChain-kit/core").BaseWallet;
|
package/hooks/useActiveWallet.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useActiveWallet = void 0;
|
|
4
|
-
const useWalletManager_1 = require("./useWalletManager");
|
|
5
|
-
const useActiveWallet = () => {
|
|
6
|
-
const walletManager = (0, useWalletManager_1.useWalletManager)();
|
|
7
|
-
return walletManager.getActiveWallet();
|
|
8
|
-
};
|
|
9
|
-
exports.useActiveWallet = useActiveWallet;
|