@multiversx/sdk-dapp-liquidity 1.1.0-alpha.2 → 1.1.0-alpha.21
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 +6 -1
- package/api/getTransactions.d.ts +8 -2
- package/api/getTransactions.js +23 -3
- package/api/getTransactions.mjs +23 -3
- package/api/tests/getChains.spec.js +2 -1
- package/api/tests/getChains.spec.mjs +2 -1
- package/api/tests/getTokens.spec.js +2 -2
- package/api/tests/getTokens.spec.mjs +2 -2
- package/api/tests/getTransactions.spec.js +79 -69
- package/api/tests/getTransactions.spec.mjs +79 -69
- package/constants/index.d.ts +1 -1
- package/constants/index.js +1 -1
- package/constants/index.mjs +1 -1
- package/dto/Chain.dto.d.ts +3 -1
- package/dto/ConfirmRate.dto.d.ts +1 -0
- package/dto/Token.dto.d.ts +7 -2
- package/index.js +44 -16
- package/index.mjs +14 -16
- package/package.json +10 -6
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +3 -1
- package/reactjs/components/BridgeForm/BridgeForm.js +182 -87
- package/reactjs/components/BridgeForm/BridgeForm.mjs +153 -58
- package/reactjs/components/BridgeHistory/BridgeHistory.js +73 -26
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +68 -21
- package/reactjs/components/Connect/BridgeAccountDisplay.js +2 -5
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +2 -5
- package/reactjs/components/Connect/CustomConnectButton.js +2 -5
- package/reactjs/components/Connect/CustomConnectButton.mjs +1 -4
- package/reactjs/components/Connect/MvxConnectButton.d.ts +2 -4
- package/reactjs/components/Connect/MvxConnectButton.js +2 -2
- package/reactjs/components/Connect/MvxConnectButton.mjs +2 -2
- package/reactjs/components/Connect/SwitchChainButton.js +2 -6
- package/reactjs/components/Connect/SwitchChainButton.mjs +1 -5
- package/reactjs/components/CopyButton/CopyButton.js +2 -2
- package/reactjs/components/CopyButton/CopyButton.mjs +2 -2
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +5 -5
- package/reactjs/components/Error/Error.d.ts +6 -0
- package/reactjs/components/Error/Error.js +67 -0
- package/reactjs/components/Error/Error.mjs +66 -0
- package/reactjs/components/Error/index.d.ts +1 -0
- package/reactjs/components/Error/index.js +5 -0
- package/reactjs/components/Error/index.mjs +4 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +2 -1
- package/reactjs/components/TokenSelector/TokenSelector.js +17 -9
- package/reactjs/components/TokenSelector/TokenSelector.mjs +13 -5
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +2 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +7 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +4 -0
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -1
- package/reactjs/components/TokenSelector/components/SelectContent.js +12 -9
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +4 -1
- package/reactjs/components/TokenSelector/components/TokenIcon.js +3 -3
- package/reactjs/components/TokenSelector/components/TokenItem.js +9 -9
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +6 -6
- package/reactjs/components/base/MxCard/MxCard.js +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +4 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +29 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +28 -0
- package/reactjs/components/base/MxCircleLoader/index.d.ts +1 -0
- package/reactjs/components/base/MxCircleLoader/index.js +5 -0
- package/reactjs/components/base/MxCircleLoader/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.js +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +4 -4
- package/reactjs/components/base/MxSlideover/MxSlideover.js +4 -4
- package/reactjs/components/base/MxTooltip/MxTooltip.js +9 -9
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +2 -2
- package/reactjs/components/index.d.ts +1 -0
- package/reactjs/components/index.js +2 -0
- package/reactjs/components/index.mjs +2 -0
- package/reactjs/context/Web3AppProvider.d.ts +3 -1
- package/reactjs/context/Web3AppProvider.js +7 -5
- package/reactjs/context/Web3AppProvider.mjs +4 -2
- package/reactjs/context/useWeb3App.js +2 -2
- package/reactjs/hooks/index.js +1 -1
- package/reactjs/hooks/index.mjs +1 -1
- package/reactjs/hooks/useAccount.js +1 -5
- package/reactjs/hooks/useAccount.mjs +1 -5
- package/reactjs/hooks/useBalances.d.ts +4 -4
- package/reactjs/hooks/useBalances.js +16 -1
- package/reactjs/hooks/useBalances.mjs +16 -1
- package/reactjs/hooks/useBridgeFormik.js +9 -16
- package/reactjs/hooks/useBridgeFormik.mjs +0 -7
- package/reactjs/hooks/useDebounce.js +3 -3
- package/reactjs/hooks/useFetchBridgeData.d.ts +14 -4
- package/reactjs/hooks/useFetchTokens.d.ts +14 -4
- package/reactjs/hooks/useFetchTokens.js +9 -9
- package/reactjs/hooks/useFetchTokens.mjs +2 -2
- package/reactjs/hooks/useFiatData.d.ts +7 -2
- package/reactjs/hooks/useFiatData.js +6 -6
- package/reactjs/hooks/useFiatData.mjs +1 -1
- package/reactjs/hooks/useGetChainId.js +3 -3
- package/reactjs/hooks/useGetChainId.mjs +1 -1
- package/reactjs/hooks/useResolveTokenChain.js +2 -2
- package/reactjs/hooks/useSendTransactions.js +2 -2
- package/reactjs/hooks/useSignTransaction.d.ts +93 -67
- package/reactjs/hooks/useSignTransaction.js +53 -4
- package/reactjs/hooks/useSignTransaction.mjs +53 -4
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +3 -3
- package/reactjs/hooks/validation/useTestIsConnected.js +2 -2
- package/reactjs/index.js +44 -16
- package/reactjs/index.mjs +14 -16
- package/reactjs/init/init.d.ts +220 -1
- package/reactjs/init/init.js +34 -10
- package/reactjs/init/init.mjs +31 -7
- package/reactjs/init/tests/init.spec.js +5 -6
- package/reactjs/init/tests/init.spec.mjs +5 -6
- package/reactjs/queries/index.d.ts +0 -1
- package/reactjs/queries/index.js +0 -2
- package/reactjs/queries/index.mjs +1 -3
- package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +8 -3
- package/reactjs/queries/useGetEvmTokensBalances.query.js +15 -18
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +15 -18
- package/reactjs/queries/useGetHistory.query.d.ts +9 -1
- package/reactjs/queries/useGetHistory.query.js +23 -5
- package/reactjs/queries/useGetHistory.query.mjs +23 -5
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +7 -2
- package/reactjs/queries/useGetMvxTokensBalances.query.js +2 -2
- package/reactjs/reexports.d.ts +2 -1
- package/reactjs/reexports.js +41 -13
- package/reactjs/reexports.mjs +11 -13
- package/reactjs/utils/getInitialTokens.d.ts +4 -1
- package/reactjs/utils/getInitialTokens.js +3 -3
- package/reactjs/utils/getInitialTokens.mjs +3 -3
- package/style.css +33 -1730
- package/types/chainType.d.ts +6 -0
- package/types/chainType.js +11 -0
- package/types/chainType.mjs +10 -0
- package/types/transaction.d.ts +28 -0
- package/types/utxo.d.ts +11 -0
- package/types/utxo.js +2 -0
- package/types/utxo.mjs +1 -0
- package/{useBalances-C_69CFoa.mjs → useBalances-Bom1mw1J.mjs} +101 -23
- package/{useBalances-C4YhEYxy.js → useBalances-gZTsFZHe.js} +102 -24
- package/index-BIVnypNe.mjs +0 -108
- package/index-Ben8n3bd.js +0 -58656
- package/index-CnKr4rL1.mjs +0 -91
- package/index-CnuruJNu.js +0 -329
- package/index-DsBh-EBw.js +0 -108
- package/index-iN9APQ6x.mjs +0 -58735
- package/modules/fiat/components/FiatForm/FiatForm.d.ts +0 -9
- package/modules/fiat/components/FiatForm/FiatForm.js +0 -314
- package/modules/fiat/components/FiatForm/FiatForm.mjs +0 -313
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.d.ts +0 -13
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.js +0 -117
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.mjs +0 -116
- package/modules/fiat/components/FiatForm/components/AmountInput/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/components/AmountInput/index.js +0 -5
- package/modules/fiat/components/FiatForm/components/AmountInput/index.mjs +0 -4
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.js +0 -74
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.mjs +0 -73
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.d.ts +0 -14
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.js +0 -94
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.mjs +0 -93
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.js +0 -82
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.mjs +0 -81
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.js +0 -91
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.mjs +0 -90
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.d.ts +0 -5
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.js +0 -30
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.mjs +0 -29
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.d.ts +0 -8
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.js +0 -103
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.mjs +0 -102
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.js +0 -33
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.mjs +0 -32
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.js +0 -21
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.mjs +0 -20
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.d.ts +0 -9
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.js +0 -26
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.mjs +0 -25
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.js +0 -5
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.mjs +0 -4
- package/modules/fiat/components/FiatForm/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/index.js +0 -5
- package/modules/fiat/components/FiatForm/index.mjs +0 -4
- package/modules/fiat/components/index.d.ts +0 -1
- package/modules/fiat/components/index.js +0 -5
- package/modules/fiat/components/index.mjs +0 -4
- package/modules/fiat/context/FiatProvider.d.ts +0 -8
- package/modules/fiat/context/FiatProvider.js +0 -24
- package/modules/fiat/context/FiatProvider.mjs +0 -23
- package/modules/fiat/context/queryClient.d.ts +0 -3
- package/modules/fiat/context/queryClient.js +0 -12
- package/modules/fiat/context/queryClient.mjs +0 -11
- package/modules/fiat/context/useFiat.d.ts +0 -1
- package/modules/fiat/context/useFiat.js +0 -13
- package/modules/fiat/context/useFiat.mjs +0 -12
- package/modules/fiat/hooks/index.d.ts +0 -2
- package/modules/fiat/hooks/index.js +0 -7
- package/modules/fiat/hooks/index.mjs +0 -6
- package/modules/fiat/hooks/useFiatData.d.ts +0 -7
- package/modules/fiat/hooks/useFiatData.js +0 -75
- package/modules/fiat/hooks/useFiatData.mjs +0 -74
- package/modules/fiat/hooks/validation/index.d.ts +0 -1
- package/modules/fiat/hooks/validation/index.js +0 -5
- package/modules/fiat/hooks/validation/index.mjs +0 -4
- package/modules/fiat/hooks/validation/useAmountSchema.d.ts +0 -2
- package/modules/fiat/hooks/validation/useAmountSchema.js +0 -27
- package/modules/fiat/hooks/validation/useAmountSchema.mjs +0 -9
- package/modules/fiat/index.d.ts +0 -8
- package/modules/fiat/index.js +0 -22
- package/modules/fiat/index.mjs +0 -21
- package/modules/fiat/init/index.d.ts +0 -2
- package/modules/fiat/init/index.js +0 -5
- package/modules/fiat/init/index.mjs +0 -4
- package/modules/fiat/init/init.d.ts +0 -22
- package/modules/fiat/init/init.js +0 -15
- package/modules/fiat/init/init.mjs +0 -14
- package/modules/fiat/queries/index.d.ts +0 -2
- package/modules/fiat/queries/index.js +0 -7
- package/modules/fiat/queries/index.mjs +0 -6
- package/modules/fiat/queries/useGetRate.mutation.d.ts +0 -6
- package/modules/fiat/queries/useGetRate.mutation.js +0 -20
- package/modules/fiat/queries/useGetRate.mutation.mjs +0 -19
- package/modules/fiat/queries/useGetTokens.query.d.ts +0 -5
- package/modules/fiat/queries/useGetTokens.query.js +0 -33
- package/modules/fiat/queries/useGetTokens.query.mjs +0 -32
- package/react-47kZTyAT.mjs +0 -51
- package/react-B_iI3-1z.mjs +0 -3133
- package/react-BomcNL1v.js +0 -254
- package/react-CqKlu0W0.js +0 -51
- package/react-R_xxu7fN.js +0 -3133
- package/react-cXurUY4Z.mjs +0 -254
- package/reactjs/queries/useGetTokens.query.d.ts +0 -3
- package/reactjs/queries/useGetTokens.query.js +0 -34
- package/reactjs/queries/useGetTokens.query.mjs +0 -33
- package/w3m-modal-Bhg44d6I.js +0 -356
- package/w3m-modal-Br2Ec3MM.mjs +0 -356
package/react-BomcNL1v.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const require$$0 = require("react");
|
|
4
|
-
const index = require("./index-Ben8n3bd.js");
|
|
5
|
-
var shim = { exports: {} };
|
|
6
|
-
var useSyncExternalStoreShim_production_min = {};
|
|
7
|
-
/**
|
|
8
|
-
* @license React
|
|
9
|
-
* use-sync-external-store-shim.production.min.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
var hasRequiredUseSyncExternalStoreShim_production_min;
|
|
17
|
-
function requireUseSyncExternalStoreShim_production_min() {
|
|
18
|
-
if (hasRequiredUseSyncExternalStoreShim_production_min) return useSyncExternalStoreShim_production_min;
|
|
19
|
-
hasRequiredUseSyncExternalStoreShim_production_min = 1;
|
|
20
|
-
var e = require$$0;
|
|
21
|
-
function h(a, b) {
|
|
22
|
-
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
23
|
-
}
|
|
24
|
-
var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
|
|
25
|
-
function q(a, b) {
|
|
26
|
-
var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
|
|
27
|
-
n(function() {
|
|
28
|
-
c.value = d;
|
|
29
|
-
c.getSnapshot = b;
|
|
30
|
-
r(c) && g({ inst: c });
|
|
31
|
-
}, [a, d, b]);
|
|
32
|
-
m(function() {
|
|
33
|
-
r(c) && g({ inst: c });
|
|
34
|
-
return a(function() {
|
|
35
|
-
r(c) && g({ inst: c });
|
|
36
|
-
});
|
|
37
|
-
}, [a]);
|
|
38
|
-
p(d);
|
|
39
|
-
return d;
|
|
40
|
-
}
|
|
41
|
-
function r(a) {
|
|
42
|
-
var b = a.getSnapshot;
|
|
43
|
-
a = a.value;
|
|
44
|
-
try {
|
|
45
|
-
var d = b();
|
|
46
|
-
return !k(a, d);
|
|
47
|
-
} catch (f) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function t(a, b) {
|
|
52
|
-
return b();
|
|
53
|
-
}
|
|
54
|
-
var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
|
|
55
|
-
useSyncExternalStoreShim_production_min.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
|
|
56
|
-
return useSyncExternalStoreShim_production_min;
|
|
57
|
-
}
|
|
58
|
-
var useSyncExternalStoreShim_development = {};
|
|
59
|
-
/**
|
|
60
|
-
* @license React
|
|
61
|
-
* use-sync-external-store-shim.development.js
|
|
62
|
-
*
|
|
63
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the MIT license found in the
|
|
66
|
-
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/
|
|
68
|
-
var hasRequiredUseSyncExternalStoreShim_development;
|
|
69
|
-
function requireUseSyncExternalStoreShim_development() {
|
|
70
|
-
if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
|
|
71
|
-
hasRequiredUseSyncExternalStoreShim_development = 1;
|
|
72
|
-
if (process.env.NODE_ENV !== "production") {
|
|
73
|
-
(function() {
|
|
74
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
75
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
76
|
-
}
|
|
77
|
-
var React = require$$0;
|
|
78
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
79
|
-
function error(format) {
|
|
80
|
-
{
|
|
81
|
-
{
|
|
82
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
83
|
-
args[_key2 - 1] = arguments[_key2];
|
|
84
|
-
}
|
|
85
|
-
printWarning("error", format, args);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function printWarning(level, format, args) {
|
|
90
|
-
{
|
|
91
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
92
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
93
|
-
if (stack !== "") {
|
|
94
|
-
format += "%s";
|
|
95
|
-
args = args.concat([stack]);
|
|
96
|
-
}
|
|
97
|
-
var argsWithFormat = args.map(function(item) {
|
|
98
|
-
return String(item);
|
|
99
|
-
});
|
|
100
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
101
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function is(x, y) {
|
|
105
|
-
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
106
|
-
}
|
|
107
|
-
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
108
|
-
var useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
109
|
-
var didWarnOld18Alpha = false;
|
|
110
|
-
var didWarnUncachedGetSnapshot = false;
|
|
111
|
-
function useSyncExternalStore2(subscribe, getSnapshot, getServerSnapshot) {
|
|
112
|
-
{
|
|
113
|
-
if (!didWarnOld18Alpha) {
|
|
114
|
-
if (React.startTransition !== void 0) {
|
|
115
|
-
didWarnOld18Alpha = true;
|
|
116
|
-
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
var value = getSnapshot();
|
|
121
|
-
{
|
|
122
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
123
|
-
var cachedValue = getSnapshot();
|
|
124
|
-
if (!objectIs(value, cachedValue)) {
|
|
125
|
-
error("The result of getSnapshot should be cached to avoid an infinite loop");
|
|
126
|
-
didWarnUncachedGetSnapshot = true;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
var _useState = useState({
|
|
131
|
-
inst: {
|
|
132
|
-
value,
|
|
133
|
-
getSnapshot
|
|
134
|
-
}
|
|
135
|
-
}), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
136
|
-
useLayoutEffect(function() {
|
|
137
|
-
inst.value = value;
|
|
138
|
-
inst.getSnapshot = getSnapshot;
|
|
139
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
140
|
-
forceUpdate({
|
|
141
|
-
inst
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}, [subscribe, value, getSnapshot]);
|
|
145
|
-
useEffect(function() {
|
|
146
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
147
|
-
forceUpdate({
|
|
148
|
-
inst
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
var handleStoreChange = function() {
|
|
152
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
153
|
-
forceUpdate({
|
|
154
|
-
inst
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
return subscribe(handleStoreChange);
|
|
159
|
-
}, [subscribe]);
|
|
160
|
-
useDebugValue(value);
|
|
161
|
-
return value;
|
|
162
|
-
}
|
|
163
|
-
function checkIfSnapshotChanged(inst) {
|
|
164
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
165
|
-
var prevValue = inst.value;
|
|
166
|
-
try {
|
|
167
|
-
var nextValue = latestGetSnapshot();
|
|
168
|
-
return !objectIs(prevValue, nextValue);
|
|
169
|
-
} catch (error2) {
|
|
170
|
-
return true;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
|
|
174
|
-
return getSnapshot();
|
|
175
|
-
}
|
|
176
|
-
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
177
|
-
var isServerEnvironment = !canUseDOM;
|
|
178
|
-
var shim2 = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore2;
|
|
179
|
-
var useSyncExternalStore$2 = React.useSyncExternalStore !== void 0 ? React.useSyncExternalStore : shim2;
|
|
180
|
-
useSyncExternalStoreShim_development.useSyncExternalStore = useSyncExternalStore$2;
|
|
181
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
182
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
183
|
-
}
|
|
184
|
-
})();
|
|
185
|
-
}
|
|
186
|
-
return useSyncExternalStoreShim_development;
|
|
187
|
-
}
|
|
188
|
-
if (process.env.NODE_ENV === "production") {
|
|
189
|
-
shim.exports = requireUseSyncExternalStoreShim_production_min();
|
|
190
|
-
} else {
|
|
191
|
-
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
192
|
-
}
|
|
193
|
-
var shimExports = shim.exports;
|
|
194
|
-
const useSyncExternalStoreExports = /* @__PURE__ */ index.getDefaultExportFromCjs(shimExports);
|
|
195
|
-
const __vite_import_meta_env__ = {};
|
|
196
|
-
const { use } = require$$0;
|
|
197
|
-
const { useSyncExternalStore } = useSyncExternalStoreExports;
|
|
198
|
-
const useAffectedDebugValue = (state, affected) => {
|
|
199
|
-
const pathList = require$$0.useRef();
|
|
200
|
-
require$$0.useEffect(() => {
|
|
201
|
-
pathList.current = index.w(state, affected);
|
|
202
|
-
});
|
|
203
|
-
require$$0.useDebugValue(pathList.current);
|
|
204
|
-
};
|
|
205
|
-
const targetCache = /* @__PURE__ */ new WeakMap();
|
|
206
|
-
function useSnapshot(proxyObject, options) {
|
|
207
|
-
const notifyInSync = void 0;
|
|
208
|
-
const lastSnapshot = require$$0.useRef();
|
|
209
|
-
const lastAffected = require$$0.useRef();
|
|
210
|
-
let inRender = true;
|
|
211
|
-
const currSnapshot = useSyncExternalStore(
|
|
212
|
-
require$$0.useCallback(
|
|
213
|
-
(callback) => {
|
|
214
|
-
const unsub = index.subscribe(proxyObject, callback);
|
|
215
|
-
callback();
|
|
216
|
-
return unsub;
|
|
217
|
-
},
|
|
218
|
-
[proxyObject, notifyInSync]
|
|
219
|
-
),
|
|
220
|
-
() => {
|
|
221
|
-
const nextSnapshot = index.snapshot(proxyObject, use);
|
|
222
|
-
try {
|
|
223
|
-
if (!inRender && lastSnapshot.current && lastAffected.current && !index.p(
|
|
224
|
-
lastSnapshot.current,
|
|
225
|
-
nextSnapshot,
|
|
226
|
-
lastAffected.current,
|
|
227
|
-
/* @__PURE__ */ new WeakMap()
|
|
228
|
-
)) {
|
|
229
|
-
return lastSnapshot.current;
|
|
230
|
-
}
|
|
231
|
-
} catch (e) {
|
|
232
|
-
}
|
|
233
|
-
return nextSnapshot;
|
|
234
|
-
},
|
|
235
|
-
() => index.snapshot(proxyObject, use)
|
|
236
|
-
);
|
|
237
|
-
inRender = false;
|
|
238
|
-
const currAffected = /* @__PURE__ */ new WeakMap();
|
|
239
|
-
require$$0.useEffect(() => {
|
|
240
|
-
lastSnapshot.current = currSnapshot;
|
|
241
|
-
lastAffected.current = currAffected;
|
|
242
|
-
});
|
|
243
|
-
if ((__vite_import_meta_env__ ? "production" : void 0) !== "production") {
|
|
244
|
-
useAffectedDebugValue(currSnapshot, currAffected);
|
|
245
|
-
}
|
|
246
|
-
const proxyCache = require$$0.useMemo(() => /* @__PURE__ */ new WeakMap(), []);
|
|
247
|
-
return index.a(
|
|
248
|
-
currSnapshot,
|
|
249
|
-
currAffected,
|
|
250
|
-
proxyCache,
|
|
251
|
-
targetCache
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
exports.useSnapshot = useSnapshot;
|
package/react-CqKlu0W0.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const index = require("./index-Ben8n3bd.js");
|
|
4
|
-
const react = require("./react-BomcNL1v.js");
|
|
5
|
-
function useAppKitNetworkCore() {
|
|
6
|
-
const { activeCaipNetwork } = react.useSnapshot(index.ChainController.state);
|
|
7
|
-
return {
|
|
8
|
-
caipNetwork: activeCaipNetwork,
|
|
9
|
-
chainId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.id,
|
|
10
|
-
caipNetworkId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.caipNetworkId
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function useAppKitAccount(options) {
|
|
14
|
-
var _a;
|
|
15
|
-
const state = react.useSnapshot(index.ChainController.state);
|
|
16
|
-
const chainNamespace = (options == null ? void 0 : options.namespace) || state.activeChain;
|
|
17
|
-
if (!chainNamespace) {
|
|
18
|
-
return {
|
|
19
|
-
allAccounts: [],
|
|
20
|
-
address: void 0,
|
|
21
|
-
caipAddress: void 0,
|
|
22
|
-
status: void 0,
|
|
23
|
-
isConnected: false,
|
|
24
|
-
embeddedWalletInfo: void 0
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const chainAccountState = (_a = state.chains.get(chainNamespace)) == null ? void 0 : _a.accountState;
|
|
28
|
-
const authConnector = index.ConnectorController.getAuthConnector(chainNamespace);
|
|
29
|
-
return {
|
|
30
|
-
allAccounts: (chainAccountState == null ? void 0 : chainAccountState.allAccounts) || [],
|
|
31
|
-
caipAddress: chainAccountState == null ? void 0 : chainAccountState.caipAddress,
|
|
32
|
-
address: index.CoreHelperUtil.getPlainAddress(chainAccountState == null ? void 0 : chainAccountState.caipAddress),
|
|
33
|
-
isConnected: Boolean(chainAccountState == null ? void 0 : chainAccountState.caipAddress),
|
|
34
|
-
status: chainAccountState == null ? void 0 : chainAccountState.status,
|
|
35
|
-
embeddedWalletInfo: authConnector ? {
|
|
36
|
-
user: chainAccountState == null ? void 0 : chainAccountState.user,
|
|
37
|
-
authProvider: (chainAccountState == null ? void 0 : chainAccountState.socialProvider) || "email",
|
|
38
|
-
accountType: chainAccountState == null ? void 0 : chainAccountState.preferredAccountType,
|
|
39
|
-
isSmartAccountDeployed: Boolean(chainAccountState == null ? void 0 : chainAccountState.smartAccountDeployed)
|
|
40
|
-
} : void 0
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function useDisconnect() {
|
|
44
|
-
async function disconnect() {
|
|
45
|
-
await index.ConnectionController.disconnect();
|
|
46
|
-
}
|
|
47
|
-
return { disconnect };
|
|
48
|
-
}
|
|
49
|
-
exports.useAppKitAccount = useAppKitAccount;
|
|
50
|
-
exports.useAppKitNetworkCore = useAppKitNetworkCore;
|
|
51
|
-
exports.useDisconnect = useDisconnect;
|