@w3ux/react-connect-kit 0.1.13 → 0.1.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/VaultAccountsProvider/defaults.js +5 -5
- package/VaultAccountsProvider/defaults.js.map +1 -1
- package/VaultAccountsProvider/index.d.ts +1 -1
- package/VaultAccountsProvider/index.js +6 -6
- package/VaultAccountsProvider/index.js.map +1 -1
- package/VaultAccountsProvider/types.d.ts +5 -5
- package/VaultAccountsProvider/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export var defaultVaultAccountsContext = {
|
|
2
|
-
vaultAccountExists: function (address) { return false; },
|
|
3
|
-
addVaultAccount: function (address, index, callback) { return null; },
|
|
4
|
-
removeVaultAccount: function (address, callback) { },
|
|
5
|
-
renameVaultAccount: function (address, newName) { },
|
|
6
|
-
getVaultAccount: function (address) { return null; },
|
|
2
|
+
vaultAccountExists: function (network, address) { return false; },
|
|
3
|
+
addVaultAccount: function (network, address, index, callback) { return null; },
|
|
4
|
+
removeVaultAccount: function (network, address, callback) { },
|
|
5
|
+
renameVaultAccount: function (network, address, newName) { },
|
|
6
|
+
getVaultAccount: function (network, address) { return null; },
|
|
7
7
|
getVaultAccounts: function (network) { return []; },
|
|
8
8
|
vaultAccounts: [],
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VaultAccountsProvider/defaults.ts"],"names":[],"mappings":"AAAA;wCACwC;AACxC,6GAA6G;AAI7G,MAAM,CAAC,IAAM,2BAA2B,GAAkC;IACxE,kBAAkB,EAAE,UAAC,OAAO,IAAK,OAAA,KAAK,EAAL,CAAK;
|
|
1
|
+
{"version":3,"sources":["../src/VaultAccountsProvider/defaults.ts"],"names":[],"mappings":"AAAA;wCACwC;AACxC,6GAA6G;AAI7G,MAAM,CAAC,IAAM,2BAA2B,GAAkC;IACxE,kBAAkB,EAAE,UAAC,OAAO,EAAE,OAAO,IAAK,OAAA,KAAK,EAAL,CAAK;IAC/C,eAAe,EAAE,UAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,IAAK,OAAA,IAAI,EAAJ,CAAI;IAC5D,kBAAkB,EAAE,UAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,IAAM,CAAC;IACtD,kBAAkB,EAAE,UAAC,OAAO,EAAE,OAAO,EAAE,OAAO,IAAM,CAAC;IACrD,eAAe,EAAE,UAAC,OAAO,EAAE,OAAO,IAAK,OAAA,IAAI,EAAJ,CAAI;IAC3C,gBAAgB,EAAE,UAAC,OAAO,IAAK,OAAA,EAAE,EAAF,CAAE;IACjC,aAAa,EAAE,EAAE;CAClB,CAAC","file":"defaults.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function, no-unused-vars */\n\nimport type { VaultAccountsContextInterface } from \"./types\";\n\nexport const defaultVaultAccountsContext: VaultAccountsContextInterface = {\n vaultAccountExists: (network, address) => false,\n addVaultAccount: (network, address, index, callback) => null,\n removeVaultAccount: (network, address, callback) => {},\n renameVaultAccount: (network, address, newName) => {},\n getVaultAccount: (network, address) => null,\n getVaultAccounts: (network) => [],\n vaultAccounts: [],\n};\n"]}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import type { VaultAccountsContextInterface, VaultAccountsProviderProps } from "./types";
|
|
3
3
|
export declare const VaultAccountsContext: import("react").Context<VaultAccountsContextInterface>;
|
|
4
4
|
export declare const useVaultAccounts: () => VaultAccountsContextInterface;
|
|
5
|
-
export declare const VaultAccountsProvider: ({
|
|
5
|
+
export declare const VaultAccountsProvider: ({ children, }: VaultAccountsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,15 +26,15 @@ import { defaultVaultAccountsContext } from "./defaults";
|
|
|
26
26
|
export var VaultAccountsContext = createContext(defaultVaultAccountsContext);
|
|
27
27
|
export var useVaultAccounts = function () { return useContext(VaultAccountsContext); };
|
|
28
28
|
export var VaultAccountsProvider = function (_a) {
|
|
29
|
-
var
|
|
29
|
+
var children = _a.children;
|
|
30
30
|
var _b = useState(getLocalVaultAccounts()), vaultAccounts = _b[0], seVaultAccountsState = _b[1];
|
|
31
31
|
var vaultAccountsRef = useRef(vaultAccounts);
|
|
32
|
-
var vaultAccountExists = function (address) {
|
|
32
|
+
var vaultAccountExists = function (network, address) {
|
|
33
33
|
return !!getLocalVaultAccounts().find(function (a) {
|
|
34
34
|
return isLocalNetworkAddress(network, a, address);
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
var addVaultAccount = function (address, index, callback) {
|
|
37
|
+
var addVaultAccount = function (network, address, index, callback) {
|
|
38
38
|
var newVaultAccounts = getLocalVaultAccounts();
|
|
39
39
|
if (!newVaultAccounts.find(function (a) { return isLocalNetworkAddress(network, a, address); })) {
|
|
40
40
|
var account = {
|
|
@@ -54,7 +54,7 @@ export var VaultAccountsProvider = function (_a) {
|
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
56
|
};
|
|
57
|
-
var removeVaultAccount = function (address, callback) {
|
|
57
|
+
var removeVaultAccount = function (network, address, callback) {
|
|
58
58
|
var newVaultAccounts = getLocalVaultAccounts();
|
|
59
59
|
newVaultAccounts = newVaultAccounts.filter(function (a) {
|
|
60
60
|
if (a.address !== address) {
|
|
@@ -76,7 +76,7 @@ export var VaultAccountsProvider = function (_a) {
|
|
|
76
76
|
callback();
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
var getVaultAccount = function (address) {
|
|
79
|
+
var getVaultAccount = function (network, address) {
|
|
80
80
|
var _a;
|
|
81
81
|
var localVaultAccounts = getLocalVaultAccounts();
|
|
82
82
|
if (!localVaultAccounts) {
|
|
@@ -86,7 +86,7 @@ export var VaultAccountsProvider = function (_a) {
|
|
|
86
86
|
return isLocalNetworkAddress(network, a, address);
|
|
87
87
|
})) !== null && _a !== void 0 ? _a : null);
|
|
88
88
|
};
|
|
89
|
-
var renameVaultAccount = function (address, newName) {
|
|
89
|
+
var renameVaultAccount = function (network, address, newName) {
|
|
90
90
|
var newVaultAccounts = getLocalVaultAccounts();
|
|
91
91
|
newVaultAccounts = newVaultAccounts.map(function (a) {
|
|
92
92
|
return isLocalNetworkAddress(network, a, address)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VaultAccountsProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;wCACwC;AAExC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAKvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,CAAC,IAAM,oBAAoB,GAC/B,aAAa,CAAgC,2BAA2B,CAAC,CAAC;AAE5E,MAAM,CAAC,IAAM,gBAAgB,GAAG,cAAM,OAAA,UAAU,CAAC,oBAAoB,CAAC,EAAhC,CAAgC,CAAC;AAEvE,MAAM,CAAC,IAAM,qBAAqB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"sources":["../src/VaultAccountsProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;wCACwC;AAExC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAKvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,CAAC,IAAM,oBAAoB,GAC/B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AAe,iBAAA;YACf,kBAAkB,oBAAA;YAClB,kBAAkB,oBAAA;YAClB,eAAe,iBAAA;YACf,gBAAgB,kBAAA;YAChB,aAAa,EAAE,gBAAgB,CAAC,OAAO;SACxC,YAEA,QAAQ,GACqB,CACjC,CAAC;AACJ,CAAC,CAAC","file":"index.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nimport { ellipsisFn, setStateWithRef } from \"@w3ux/utils\";\nimport { createContext, useContext, useRef, useState } from \"react\";\nimport { getLocalVaultAccounts, isLocalNetworkAddress } from \"./utils\";\nimport type {\n VaultAccountsContextInterface,\n VaultAccountsProviderProps,\n} from \"./types\";\nimport { defaultVaultAccountsContext } from \"./defaults\";\nimport { VaultAccount } from \"../types\";\n\nexport const VaultAccountsContext =\n createContext<VaultAccountsContextInterface>(defaultVaultAccountsContext);\n\nexport const useVaultAccounts = () => useContext(VaultAccountsContext);\n\nexport const VaultAccountsProvider = ({\n children,\n}: VaultAccountsProviderProps) => {\n const [vaultAccounts, seVaultAccountsState] = useState<VaultAccount[]>(\n getLocalVaultAccounts()\n );\n const vaultAccountsRef = useRef(vaultAccounts);\n\n // Check if a Vault address exists in imported addresses.\n const vaultAccountExists = (network: string, address: string) =>\n !!getLocalVaultAccounts().find((a) =>\n isLocalNetworkAddress(network, a, address)\n );\n\n // Adds a vault account to state and local storage.\n const addVaultAccount = (\n network: string,\n address: string,\n index: number,\n callback?: () => void\n ) => {\n let newVaultAccounts = getLocalVaultAccounts();\n\n if (\n !newVaultAccounts.find((a) => isLocalNetworkAddress(network, a, address))\n ) {\n const account = {\n address,\n network,\n name: ellipsisFn(address),\n source: \"vault\",\n index,\n };\n\n newVaultAccounts = [...newVaultAccounts].concat(account);\n localStorage.setItem(\n \"polkadot_vault_accounts\",\n JSON.stringify(newVaultAccounts)\n );\n\n // store only those accounts on the current network in state.\n setStateWithRef(\n newVaultAccounts.filter((a) => a.network === network),\n seVaultAccountsState,\n vaultAccountsRef\n );\n\n // Handle optional callback function.\n if (typeof callback === \"function\") {\n callback();\n }\n\n return account;\n }\n return null;\n };\n\n const removeVaultAccount = (\n network: string,\n address: string,\n callback?: () => void\n ) => {\n let newVaultAccounts = getLocalVaultAccounts();\n\n newVaultAccounts = newVaultAccounts.filter((a) => {\n if (a.address !== address) {\n return true;\n }\n if (a.network !== network) {\n return true;\n }\n return false;\n });\n\n if (!newVaultAccounts.length) {\n localStorage.removeItem(\"polkadot_vault_accounts\");\n } else {\n localStorage.setItem(\n \"polkadot_vault_accounts\",\n JSON.stringify(newVaultAccounts)\n );\n }\n setStateWithRef(\n newVaultAccounts.filter((a) => a.network === network),\n seVaultAccountsState,\n vaultAccountsRef\n );\n\n // Handle optional callback function.\n if (typeof callback === \"function\") {\n callback();\n }\n };\n\n const getVaultAccount = (network: string, address: string) => {\n const localVaultAccounts = getLocalVaultAccounts();\n if (!localVaultAccounts) {\n return null;\n }\n return (\n localVaultAccounts.find((a) =>\n isLocalNetworkAddress(network, a, address)\n ) ?? null\n );\n };\n\n const renameVaultAccount = (\n network: string,\n address: string,\n newName: string\n ) => {\n let newVaultAccounts = getLocalVaultAccounts();\n\n newVaultAccounts = newVaultAccounts.map((a) =>\n isLocalNetworkAddress(network, a, address)\n ? {\n ...a,\n name: newName,\n }\n : a\n );\n localStorage.setItem(\n \"polkadot_vault_accounts\",\n JSON.stringify(newVaultAccounts)\n );\n setStateWithRef(\n newVaultAccounts.filter((a) => a.network === network),\n seVaultAccountsState,\n vaultAccountsRef\n );\n };\n\n // Gets Vault accounts for a network.\n const getVaultAccounts = (network: string) =>\n vaultAccountsRef.current.filter((a) => a.network === network);\n\n return (\n <VaultAccountsContext.Provider\n value={{\n vaultAccountExists,\n addVaultAccount,\n removeVaultAccount,\n renameVaultAccount,\n getVaultAccount,\n getVaultAccounts,\n vaultAccounts: vaultAccountsRef.current,\n }}\n >\n {children}\n </VaultAccountsContext.Provider>\n );\n};\n"]}
|
|
@@ -5,11 +5,11 @@ export interface VaultAccountsProviderProps {
|
|
|
5
5
|
network: string;
|
|
6
6
|
}
|
|
7
7
|
export interface VaultAccountsContextInterface {
|
|
8
|
-
vaultAccountExists: (address: string) => boolean;
|
|
9
|
-
addVaultAccount: (address: string, index: number, callback?: () => void) => VaultAccount | null;
|
|
10
|
-
removeVaultAccount: (address: string, callback?: () => void) => void;
|
|
11
|
-
renameVaultAccount: (address: string, newName: string) => void;
|
|
12
|
-
getVaultAccount: (address: string) => VaultAccount | null;
|
|
8
|
+
vaultAccountExists: (network: string, address: string) => boolean;
|
|
9
|
+
addVaultAccount: (network: string, address: string, index: number, callback?: () => void) => VaultAccount | null;
|
|
10
|
+
removeVaultAccount: (network: string, address: string, callback?: () => void) => void;
|
|
11
|
+
renameVaultAccount: (network: string, address: string, newName: string) => void;
|
|
12
|
+
getVaultAccount: (network: string, address: string) => VaultAccount | null;
|
|
13
13
|
getVaultAccounts: (network: string) => VaultAccount[];
|
|
14
14
|
vaultAccounts: VaultAccount[];
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/VaultAccountsProvider/types.ts"],"names":[],"mappings":"AAAA;wCACwC","file":"types.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nimport { ReactNode } from \"react\";\nimport { VaultAccount } from \"../types\";\n\nexport interface VaultAccountsProviderProps {\n children: ReactNode;\n network: string;\n}\n\nexport interface VaultAccountsContextInterface {\n vaultAccountExists: (address: string) => boolean;\n addVaultAccount: (\n address: string,\n index: number,\n callback?: () => void\n ) => VaultAccount | null;\n removeVaultAccount: (address: string
|
|
1
|
+
{"version":3,"sources":["../src/VaultAccountsProvider/types.ts"],"names":[],"mappings":"AAAA;wCACwC","file":"types.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nimport { ReactNode } from \"react\";\nimport { VaultAccount } from \"../types\";\n\nexport interface VaultAccountsProviderProps {\n children: ReactNode;\n network: string;\n}\n\nexport interface VaultAccountsContextInterface {\n vaultAccountExists: (network: string, address: string) => boolean;\n addVaultAccount: (\n network: string,\n address: string,\n index: number,\n callback?: () => void\n ) => VaultAccount | null;\n removeVaultAccount: (\n network: string,\n address: string,\n callback?: () => void\n ) => void;\n renameVaultAccount: (\n network: string,\n address: string,\n newName: string\n ) => void;\n getVaultAccount: (network: string, address: string) => VaultAccount | null;\n getVaultAccounts: (network: string) => VaultAccount[];\n vaultAccounts: VaultAccount[];\n}\n"]}
|