@rhinestone/deposit-modal 0.1.52 → 0.1.53
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/{DepositModalReown-63LD7KSU.mjs → DepositModalReown-LNZ46L4O.mjs} +3 -3
- package/dist/{DepositModalReown-SXQJYLTX.cjs → DepositModalReown-OXAW4Y7O.cjs} +6 -6
- package/dist/{WithdrawModalReown-PUIM36NO.mjs → WithdrawModalReown-EE74V66X.mjs} +3 -3
- package/dist/{WithdrawModalReown-JD665MKM.cjs → WithdrawModalReown-V3ZJESQ5.cjs} +6 -6
- package/dist/{chunk-ZW4SRCW5.cjs → chunk-47WDWD6Z.cjs} +242 -163
- package/dist/{chunk-R64A3IEI.mjs → chunk-4BL7RCZB.mjs} +2 -2
- package/dist/{chunk-RVKMKH2C.cjs → chunk-DBBSH7HP.cjs} +201 -296
- package/dist/{chunk-JL3R3JT6.cjs → chunk-K57KO3SW.cjs} +33 -33
- package/dist/{chunk-UPA7N6GY.mjs → chunk-MBURQ26S.mjs} +10 -1
- package/dist/{chunk-XAGXQV4K.cjs → chunk-N2Y34LQO.cjs} +9 -0
- package/dist/{chunk-MKSZIA74.mjs → chunk-REDAO3MS.mjs} +201 -296
- package/dist/{chunk-VYYJWMEI.mjs → chunk-ZB5Y2ACC.mjs} +100 -21
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/reown.cjs +4 -4
- package/dist/reown.mjs +3 -3
- package/dist/styles.css +312 -188
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkDBBSH7HPcjs = require('./chunk-DBBSH7HP.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -141,7 +141,7 @@ function WithdrawFormStep({
|
|
|
141
141
|
setIsSwitching(true);
|
|
142
142
|
switchChain(asset.chainId).catch((err) => {
|
|
143
143
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
144
|
-
setError(
|
|
144
|
+
setError(_chunkDBBSH7HPcjs.formatUserError.call(void 0, raw));
|
|
145
145
|
}).finally(() => {
|
|
146
146
|
setIsSwitching(false);
|
|
147
147
|
});
|
|
@@ -161,7 +161,7 @@ function WithdrawFormStep({
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
|
-
const bal =
|
|
164
|
+
const bal = _chunkDBBSH7HPcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
165
165
|
address: asset.token,
|
|
166
166
|
abi: _viem.erc20Abi,
|
|
167
167
|
functionName: "balanceOf",
|
|
@@ -264,7 +264,7 @@ function WithdrawFormStep({
|
|
|
264
264
|
await onSubmit(recipient, amount);
|
|
265
265
|
} catch (err) {
|
|
266
266
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
267
|
-
setError(
|
|
267
|
+
setError(_chunkDBBSH7HPcjs.formatUserError.call(void 0, raw));
|
|
268
268
|
} finally {
|
|
269
269
|
setIsSubmitting(false);
|
|
270
270
|
}
|
|
@@ -272,11 +272,11 @@ function WithdrawFormStep({
|
|
|
272
272
|
if (isBalanceLoading) {
|
|
273
273
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
274
274
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-withdraw-loading", children: [
|
|
275
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
275
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.Spinner, { className: "rs-spinner--lg" }),
|
|
276
276
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
277
277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
278
278
|
] }),
|
|
279
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
279
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
|
|
280
280
|
] });
|
|
281
281
|
}
|
|
282
282
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
@@ -372,7 +372,7 @@ function WithdrawFormStep({
|
|
|
372
372
|
] })
|
|
373
373
|
] }),
|
|
374
374
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
375
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
375
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkDBBSH7HPcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
376
376
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
377
377
|
formattedBalance,
|
|
378
378
|
" ",
|
|
@@ -565,7 +565,7 @@ function WithdrawFormStep({
|
|
|
565
565
|
] })
|
|
566
566
|
] }),
|
|
567
567
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
568
|
-
|
|
568
|
+
_chunkDBBSH7HPcjs.Button,
|
|
569
569
|
{
|
|
570
570
|
onClick: handleWithdraw,
|
|
571
571
|
fullWidth: true,
|
|
@@ -574,7 +574,7 @@ function WithdrawFormStep({
|
|
|
574
574
|
children: isBusy ? "Preparing..." : "Withdraw"
|
|
575
575
|
}
|
|
576
576
|
) }),
|
|
577
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
577
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
|
|
578
578
|
] });
|
|
579
579
|
}
|
|
580
580
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -905,13 +905,13 @@ function WithdrawFlow({
|
|
|
905
905
|
const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
|
|
906
906
|
const logFlow = _react.useCallback.call(void 0,
|
|
907
907
|
(message, data) => {
|
|
908
|
-
|
|
908
|
+
_chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
909
909
|
},
|
|
910
910
|
[debug]
|
|
911
911
|
);
|
|
912
912
|
const logFlowError = _react.useCallback.call(void 0,
|
|
913
913
|
(message, error, data) => {
|
|
914
|
-
|
|
914
|
+
_chunkDBBSH7HPcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
915
915
|
},
|
|
916
916
|
[debug]
|
|
917
917
|
);
|
|
@@ -970,14 +970,14 @@ function WithdrawFlow({
|
|
|
970
970
|
return {
|
|
971
971
|
ownerAddress: dappAddress,
|
|
972
972
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
973
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
973
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, sourceChain))),
|
|
974
974
|
switchChain: dappSwitchChain
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
977
|
return {
|
|
978
978
|
ownerAddress: dappWalletClient.account.address,
|
|
979
979
|
walletClient: dappWalletClient,
|
|
980
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
980
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, sourceChain))),
|
|
981
981
|
switchChain: dappSwitchChain
|
|
982
982
|
};
|
|
983
983
|
}
|
|
@@ -988,7 +988,7 @@ function WithdrawFlow({
|
|
|
988
988
|
return {
|
|
989
989
|
ownerAddress: dappWalletClient.account.address,
|
|
990
990
|
walletClient: dappWalletClient,
|
|
991
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
991
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, sourceChain))),
|
|
992
992
|
switchChain: dappSwitchChain
|
|
993
993
|
};
|
|
994
994
|
}
|
|
@@ -1018,7 +1018,7 @@ function WithdrawFlow({
|
|
|
1018
1018
|
const symbol = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1019
1019
|
const decimals = _chunkNELAYNA3cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1020
1020
|
return {
|
|
1021
|
-
id:
|
|
1021
|
+
id: _chunkDBBSH7HPcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1022
1022
|
chainId: sourceChain,
|
|
1023
1023
|
token: sourceToken,
|
|
1024
1024
|
symbol,
|
|
@@ -1068,15 +1068,15 @@ function WithdrawFlow({
|
|
|
1068
1068
|
[logFlowError, onError]
|
|
1069
1069
|
);
|
|
1070
1070
|
const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
|
|
1071
|
-
const localOwner =
|
|
1071
|
+
const localOwner = _chunkDBBSH7HPcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
1072
1072
|
if (localOwner) {
|
|
1073
1073
|
return {
|
|
1074
|
-
account:
|
|
1074
|
+
account: _chunkDBBSH7HPcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
1075
1075
|
address: localOwner.address
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
|
-
const created =
|
|
1079
|
-
|
|
1078
|
+
const created = _chunkDBBSH7HPcjs.createSessionOwnerKey.call(void 0, );
|
|
1079
|
+
_chunkDBBSH7HPcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
1080
1080
|
return {
|
|
1081
1081
|
account: created.account,
|
|
1082
1082
|
address: created.address
|
|
@@ -1106,7 +1106,7 @@ function WithdrawFlow({
|
|
|
1106
1106
|
const setup = await service.setupAccount({
|
|
1107
1107
|
ownerAddress: ownerAddress2,
|
|
1108
1108
|
sessionOwnerAddress: sessionOwner.address,
|
|
1109
|
-
targetChain:
|
|
1109
|
+
targetChain: _chunkDBBSH7HPcjs.toEvmCaip2.call(void 0, targetChain),
|
|
1110
1110
|
targetToken,
|
|
1111
1111
|
signerAddress,
|
|
1112
1112
|
sessionChainIds,
|
|
@@ -1133,7 +1133,7 @@ function WithdrawFlow({
|
|
|
1133
1133
|
primaryType: typedData.primaryType,
|
|
1134
1134
|
message: typedData.message
|
|
1135
1135
|
});
|
|
1136
|
-
const sessionDetails =
|
|
1136
|
+
const sessionDetails = _chunkDBBSH7HPcjs.buildSessionDetails.call(void 0,
|
|
1137
1137
|
setup.sessionDetailsUnsigned,
|
|
1138
1138
|
signature
|
|
1139
1139
|
);
|
|
@@ -1147,7 +1147,7 @@ function WithdrawFlow({
|
|
|
1147
1147
|
eoaAddress: ownerAddress2,
|
|
1148
1148
|
sessionOwner: sessionOwner.address,
|
|
1149
1149
|
target: {
|
|
1150
|
-
chain:
|
|
1150
|
+
chain: _chunkDBBSH7HPcjs.toEvmCaip2.call(void 0, targetChain),
|
|
1151
1151
|
token: targetToken,
|
|
1152
1152
|
recipient
|
|
1153
1153
|
}
|
|
@@ -1156,7 +1156,7 @@ function WithdrawFlow({
|
|
|
1156
1156
|
}
|
|
1157
1157
|
handleConnected(ownerAddress2, smartAccount);
|
|
1158
1158
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1159
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => (
|
|
1159
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1160
1160
|
let result;
|
|
1161
1161
|
if (onSignTransaction) {
|
|
1162
1162
|
const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
|
|
@@ -1179,7 +1179,7 @@ function WithdrawFlow({
|
|
|
1179
1179
|
const { signature } = await onSignTransaction(request);
|
|
1180
1180
|
const relayResult = await service.relayWithdraw({
|
|
1181
1181
|
smartAccount,
|
|
1182
|
-
chainId:
|
|
1182
|
+
chainId: _chunkDBBSH7HPcjs.toEvmCaip2.call(void 0, sourceChain),
|
|
1183
1183
|
safeAddress,
|
|
1184
1184
|
safeTransaction: request.typedData.message,
|
|
1185
1185
|
signature
|
|
@@ -1237,7 +1237,7 @@ function WithdrawFlow({
|
|
|
1237
1237
|
targetChain,
|
|
1238
1238
|
targetToken
|
|
1239
1239
|
});
|
|
1240
|
-
handleError(
|
|
1240
|
+
handleError(_chunkDBBSH7HPcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1241
1241
|
throw err;
|
|
1242
1242
|
} finally {
|
|
1243
1243
|
setIsSubmitting(false);
|
|
@@ -1355,7 +1355,7 @@ function WithdrawFlow({
|
|
|
1355
1355
|
}, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _37 => _37.icon])]);
|
|
1356
1356
|
if (showConnectStep) {
|
|
1357
1357
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1358
|
-
|
|
1358
|
+
_chunkDBBSH7HPcjs.ConnectStep,
|
|
1359
1359
|
{
|
|
1360
1360
|
walletOptions,
|
|
1361
1361
|
selectedWalletId: selectedWalletIdEffective,
|
|
@@ -1378,7 +1378,7 @@ function WithdrawFlow({
|
|
|
1378
1378
|
const resolvedOwnerAddress = signerContext.ownerAddress;
|
|
1379
1379
|
const resolvedConnectedAddress = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _38 => _38.walletClient, 'optionalAccess', _39 => _39.account, 'optionalAccess', _40 => _40.address]), () => ( _optionalChain([reownWallet, 'optionalAccess', _41 => _41.address]))), () => ( _optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.account, 'optionalAccess', _43 => _43.address]))), () => ( resolvedOwnerAddress));
|
|
1380
1380
|
const resolvedDefaultRecipient = _nullishCoalesce(defaultRecipient, () => ( resolvedConnectedAddress));
|
|
1381
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1381
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1382
1382
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1383
1383
|
step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1384
1384
|
WithdrawFormStep,
|
|
@@ -1405,7 +1405,7 @@ function WithdrawFlow({
|
|
|
1405
1405
|
}
|
|
1406
1406
|
),
|
|
1407
1407
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1408
|
-
|
|
1408
|
+
_chunkDBBSH7HPcjs.ProcessingStep,
|
|
1409
1409
|
{
|
|
1410
1410
|
smartAccount: step.smartAccount,
|
|
1411
1411
|
txHash: step.txHash,
|
|
@@ -1431,7 +1431,7 @@ function WithdrawFlow({
|
|
|
1431
1431
|
// src/WithdrawModal.tsx
|
|
1432
1432
|
|
|
1433
1433
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1434
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1434
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-V3ZJESQ5.cjs"))).then((m) => ({
|
|
1435
1435
|
default: m.WithdrawModalReown
|
|
1436
1436
|
}))
|
|
1437
1437
|
);
|
|
@@ -1487,12 +1487,12 @@ function WithdrawModalInner({
|
|
|
1487
1487
|
const targetChain = _chunkNELAYNA3cjs.getChainId.call(void 0, targetChainProp);
|
|
1488
1488
|
const sourceChain = _chunkNELAYNA3cjs.getChainId.call(void 0, sourceChainProp);
|
|
1489
1489
|
const service = _react.useMemo.call(void 0,
|
|
1490
|
-
() =>
|
|
1490
|
+
() => _chunkDBBSH7HPcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1491
1491
|
[backendUrl, debug]
|
|
1492
1492
|
);
|
|
1493
1493
|
_react.useEffect.call(void 0, () => {
|
|
1494
1494
|
if (isOpen && modalRef.current) {
|
|
1495
|
-
|
|
1495
|
+
_chunkDBBSH7HPcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1496
1496
|
}
|
|
1497
1497
|
}, [isOpen, theme]);
|
|
1498
1498
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
@@ -1528,7 +1528,7 @@ function WithdrawModalInner({
|
|
|
1528
1528
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _52 => _52.title]), () => ( "Withdraw"));
|
|
1529
1529
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
|
|
1530
1530
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1531
|
-
|
|
1531
|
+
_chunkDBBSH7HPcjs.Modal,
|
|
1532
1532
|
{
|
|
1533
1533
|
isOpen,
|
|
1534
1534
|
onClose,
|
|
@@ -1586,7 +1586,7 @@ function WithdrawModalInner({
|
|
|
1586
1586
|
] }),
|
|
1587
1587
|
balance && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
|
|
1588
1588
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balance.title }),
|
|
1589
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
1589
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkDBBSH7HPcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
1590
1590
|
] })
|
|
1591
1591
|
] }),
|
|
1592
1592
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4,7 +4,14 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
|
4
4
|
import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
|
|
5
5
|
import { SolanaAdapter } from "@reown/appkit-adapter-solana";
|
|
6
6
|
import { WagmiProvider } from "wagmi";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
createAppKit,
|
|
9
|
+
useAppKit,
|
|
10
|
+
useAppKitAccount,
|
|
11
|
+
useAppKitState,
|
|
12
|
+
useWalletInfo,
|
|
13
|
+
modal
|
|
14
|
+
} from "@reown/appkit/react";
|
|
8
15
|
import {
|
|
9
16
|
mainnet,
|
|
10
17
|
base,
|
|
@@ -74,6 +81,7 @@ function ReownWalletProvider({
|
|
|
74
81
|
function useReownWallet() {
|
|
75
82
|
const { open } = useAppKit();
|
|
76
83
|
const { address, isConnected, caipAddress } = useAppKitAccount();
|
|
84
|
+
const { initialized, loading } = useAppKitState();
|
|
77
85
|
const { walletInfo } = useWalletInfo();
|
|
78
86
|
const { data: walletClient } = useWalletClient();
|
|
79
87
|
const publicClient = usePublicClient();
|
|
@@ -86,6 +94,7 @@ function useReownWallet() {
|
|
|
86
94
|
address: isSolana ? void 0 : address,
|
|
87
95
|
caipAddress,
|
|
88
96
|
isConnected,
|
|
97
|
+
isReady: initialized && !loading,
|
|
89
98
|
icon: walletInfo?.icon,
|
|
90
99
|
isSolana,
|
|
91
100
|
solanaAddress,
|
|
@@ -4,6 +4,13 @@ var _reactquery = require('@tanstack/react-query');
|
|
|
4
4
|
var _appkitadapterwagmi = require('@reown/appkit-adapter-wagmi');
|
|
5
5
|
var _appkitadaptersolana = require('@reown/appkit-adapter-solana');
|
|
6
6
|
var _wagmi = require('wagmi');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
7
14
|
var _react3 = require('@reown/appkit/react');
|
|
8
15
|
|
|
9
16
|
|
|
@@ -74,6 +81,7 @@ function ReownWalletProvider({
|
|
|
74
81
|
function useReownWallet() {
|
|
75
82
|
const { open } = _react3.useAppKit.call(void 0, );
|
|
76
83
|
const { address, isConnected, caipAddress } = _react3.useAppKitAccount.call(void 0, );
|
|
84
|
+
const { initialized, loading } = _react3.useAppKitState.call(void 0, );
|
|
77
85
|
const { walletInfo } = _react3.useWalletInfo.call(void 0, );
|
|
78
86
|
const { data: walletClient } = _wagmi.useWalletClient.call(void 0, );
|
|
79
87
|
const publicClient = _wagmi.usePublicClient.call(void 0, );
|
|
@@ -86,6 +94,7 @@ function useReownWallet() {
|
|
|
86
94
|
address: isSolana ? void 0 : address,
|
|
87
95
|
caipAddress,
|
|
88
96
|
isConnected,
|
|
97
|
+
isReady: initialized && !loading,
|
|
89
98
|
icon: _optionalChain([walletInfo, 'optionalAccess', _11 => _11.icon]),
|
|
90
99
|
isSolana,
|
|
91
100
|
solanaAddress,
|