@rhinestone/deposit-modal 0.1.32 → 0.1.34
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-SZPCCNPH.mjs → DepositModalReown-25YB4LPZ.mjs} +2 -2
- package/dist/{DepositModalReown-XUAEWIW7.cjs → DepositModalReown-TLKQ7Y4X.cjs} +5 -5
- package/dist/{WithdrawModalReown-YGGV7BL2.mjs → WithdrawModalReown-E3OEW7QZ.mjs} +2 -2
- package/dist/{WithdrawModalReown-53FDOZG2.cjs → WithdrawModalReown-HTPBAGPM.cjs} +5 -5
- package/dist/{chunk-MKKJ7ZE2.mjs → chunk-DL5M5QZZ.mjs} +63 -87
- package/dist/{chunk-SQDXU7ML.cjs → chunk-DQO6MO27.cjs} +43 -68
- package/dist/{chunk-RR25E5DZ.mjs → chunk-EIWNQ2MO.mjs} +23 -48
- package/dist/{chunk-K2JJKFTV.mjs → chunk-SJEIKMVO.mjs} +5 -1
- package/dist/{chunk-52FVEYTL.cjs → chunk-V7I5T4SW.cjs} +5 -1
- package/dist/{chunk-NYEWO4NW.cjs → chunk-YCXVHPGZ.cjs} +62 -86
- package/dist/deposit.cjs +2 -2
- package/dist/deposit.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +2 -2
- package/dist/reown.cjs +3 -3
- package/dist/reown.mjs +2 -2
- package/dist/withdraw.cjs +2 -2
- package/dist/withdraw.mjs +1 -1
- package/package.json +1 -1
|
@@ -586,13 +586,16 @@ function AmountStep({
|
|
|
586
586
|
hasAttemptedSwitch.current = true;
|
|
587
587
|
setIsSwitching(true);
|
|
588
588
|
switchChain(asset.chainId).catch((err) => {
|
|
589
|
-
const
|
|
590
|
-
setError(
|
|
589
|
+
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
590
|
+
setError(_chunkYIHOACM3cjs.formatUserError.call(void 0, raw));
|
|
591
591
|
}).finally(() => {
|
|
592
592
|
setIsSwitching(false);
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
596
|
+
_react.useEffect.call(void 0, () => {
|
|
597
|
+
hasAttemptedSwitch.current = false;
|
|
598
|
+
}, [asset.chainId]);
|
|
596
599
|
_react.useEffect.call(void 0, () => {
|
|
597
600
|
if (defaultAmount && !amount) {
|
|
598
601
|
const parsed = Number(defaultAmount);
|
|
@@ -688,18 +691,6 @@ function AmountStep({
|
|
|
688
691
|
setError(null);
|
|
689
692
|
onContinue(tokenAmountStr, amount, _nullishCoalesce(balance, () => ( void 0)));
|
|
690
693
|
};
|
|
691
|
-
const handleSwitch = async () => {
|
|
692
|
-
if (!asset.chainId || !switchChain) return;
|
|
693
|
-
setIsSwitching(true);
|
|
694
|
-
try {
|
|
695
|
-
await switchChain(asset.chainId);
|
|
696
|
-
} catch (err) {
|
|
697
|
-
const message = err instanceof Error ? err.message : "Failed to switch chain";
|
|
698
|
-
setError(message);
|
|
699
|
-
} finally {
|
|
700
|
-
setIsSwitching(false);
|
|
701
|
-
}
|
|
702
|
-
};
|
|
703
694
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
704
695
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body", style: { paddingTop: 0 }, children: [
|
|
705
696
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
@@ -865,14 +856,7 @@ function AmountStep({
|
|
|
865
856
|
}
|
|
866
857
|
)
|
|
867
858
|
] }),
|
|
868
|
-
chainMismatch &&
|
|
869
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
|
|
870
|
-
"Switch your wallet to ",
|
|
871
|
-
_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId),
|
|
872
|
-
" to continue."
|
|
873
|
-
] }),
|
|
874
|
-
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYIHOACM3cjs.Button, { variant: "outline", size: "small", onClick: handleSwitch, children: "Switch" })
|
|
875
|
-
] }),
|
|
859
|
+
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
|
|
876
860
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
|
|
877
861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
878
862
|
"svg",
|
|
@@ -932,6 +916,7 @@ function ConfirmStep({
|
|
|
932
916
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
933
917
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
934
918
|
const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
|
|
919
|
+
const hasAttemptedSwitch = _react.useRef.call(void 0, false);
|
|
935
920
|
const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _13 => _13.chain, 'optionalAccess', _14 => _14.id]) && walletClient.chain.id !== asset.chainId;
|
|
936
921
|
const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
|
|
937
922
|
const targetSymbol = sameRoute ? asset.symbol : _chunkS4UBVD3Hcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
@@ -947,6 +932,21 @@ function ConfirmStep({
|
|
|
947
932
|
return formattedSendAmount;
|
|
948
933
|
})();
|
|
949
934
|
const receiveAmount = sameRoute ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
|
|
935
|
+
_react.useEffect.call(void 0, () => {
|
|
936
|
+
if (chainMismatch && switchChain && !hasAttemptedSwitch.current) {
|
|
937
|
+
hasAttemptedSwitch.current = true;
|
|
938
|
+
setIsSwitching(true);
|
|
939
|
+
switchChain(asset.chainId).catch((err) => {
|
|
940
|
+
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
941
|
+
setError(_chunkYIHOACM3cjs.formatUserError.call(void 0, raw));
|
|
942
|
+
}).finally(() => {
|
|
943
|
+
setIsSwitching(false);
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
}, [chainMismatch, switchChain, asset.chainId]);
|
|
947
|
+
_react.useEffect.call(void 0, () => {
|
|
948
|
+
hasAttemptedSwitch.current = false;
|
|
949
|
+
}, [asset.chainId]);
|
|
950
950
|
const handleConfirm = async () => {
|
|
951
951
|
if (!address || !walletClient) {
|
|
952
952
|
setError("Wallet not connected");
|
|
@@ -1005,18 +1005,6 @@ function ConfirmStep({
|
|
|
1005
1005
|
setIsSubmitting(false);
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
|
-
const handleSwitch = async () => {
|
|
1009
|
-
if (!switchChain) return;
|
|
1010
|
-
setIsSwitching(true);
|
|
1011
|
-
try {
|
|
1012
|
-
await switchChain(asset.chainId);
|
|
1013
|
-
} catch (err) {
|
|
1014
|
-
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1015
|
-
setError(_chunkYIHOACM3cjs.formatUserError.call(void 0, raw));
|
|
1016
|
-
} finally {
|
|
1017
|
-
setIsSwitching(false);
|
|
1018
|
-
}
|
|
1019
|
-
};
|
|
1020
1008
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
1021
1009
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { padding: "12px 12px 10px" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-title", children: "Review order" }) }),
|
|
1022
1010
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-space-y-3", style: { paddingTop: 0 }, children: [
|
|
@@ -1116,23 +1104,7 @@ function ConfirmStep({
|
|
|
1116
1104
|
)
|
|
1117
1105
|
] })
|
|
1118
1106
|
] }),
|
|
1119
|
-
chainMismatch && /* @__PURE__ */ _jsxruntime.
|
|
1120
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
|
|
1121
|
-
"Switch your wallet to ",
|
|
1122
|
-
_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId),
|
|
1123
|
-
" to sign."
|
|
1124
|
-
] }),
|
|
1125
|
-
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1126
|
-
_chunkYIHOACM3cjs.Button,
|
|
1127
|
-
{
|
|
1128
|
-
variant: "outline",
|
|
1129
|
-
size: "small",
|
|
1130
|
-
loading: isSwitching,
|
|
1131
|
-
onClick: handleSwitch,
|
|
1132
|
-
children: "Switch"
|
|
1133
|
-
}
|
|
1134
|
-
)
|
|
1135
|
-
] }),
|
|
1107
|
+
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkS4UBVD3Hcjs.getChainName.call(void 0, asset.chainId)} to sign.` }) }),
|
|
1136
1108
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-alert rs-alert--error", children: [
|
|
1137
1109
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1138
1110
|
"svg",
|
|
@@ -1663,7 +1635,7 @@ function DepositFlow({
|
|
|
1663
1635
|
});
|
|
1664
1636
|
seen.add(dappWalletClient.account.address.toLowerCase());
|
|
1665
1637
|
}
|
|
1666
|
-
if (_optionalChain([reownWallet, 'optionalAccess', _27 => _27.address]) && reownWallet.isConnected && !seen.has(reownWallet.address.toLowerCase())) {
|
|
1638
|
+
if (_optionalChain([reownWallet, 'optionalAccess', _27 => _27.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(reownWallet.address.toLowerCase())) {
|
|
1667
1639
|
options.push({
|
|
1668
1640
|
address: reownWallet.address,
|
|
1669
1641
|
label: "External Wallet",
|
|
@@ -1677,10 +1649,13 @@ function DepositFlow({
|
|
|
1677
1649
|
dappAddress,
|
|
1678
1650
|
_optionalChain([reownWallet, 'optionalAccess', _28 => _28.address]),
|
|
1679
1651
|
_optionalChain([reownWallet, 'optionalAccess', _29 => _29.isConnected]),
|
|
1680
|
-
_optionalChain([reownWallet, 'optionalAccess', _30 => _30.
|
|
1652
|
+
_optionalChain([reownWallet, 'optionalAccess', _30 => _30.walletClient]),
|
|
1653
|
+
_optionalChain([reownWallet, 'optionalAccess', _31 => _31.publicClient]),
|
|
1654
|
+
_optionalChain([reownWallet, 'optionalAccess', _32 => _32.icon])
|
|
1681
1655
|
]);
|
|
1682
|
-
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess',
|
|
1656
|
+
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _33 => _33.account]) && dappAddress && !reownWallet;
|
|
1683
1657
|
const hasWalletOptions = walletOptions.length > 0;
|
|
1658
|
+
const hasReownSession = Boolean(_optionalChain([reownWallet, 'optionalAccess', _34 => _34.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _35 => _35.address]));
|
|
1684
1659
|
const showConnectStep = !canAutoLock && !isConnectSelectionConfirmed;
|
|
1685
1660
|
const signerContext = _react.useMemo.call(void 0, () => {
|
|
1686
1661
|
if (flowMode === "deposit-address") {
|
|
@@ -1693,7 +1668,7 @@ function DepositFlow({
|
|
|
1693
1668
|
};
|
|
1694
1669
|
}
|
|
1695
1670
|
if (canAutoLock) {
|
|
1696
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1671
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _36 => _36.chain, 'optionalAccess', _37 => _37.id]), () => ( targetChain));
|
|
1697
1672
|
return {
|
|
1698
1673
|
ownerAddress: dappWalletClient.account.address,
|
|
1699
1674
|
walletClient: dappWalletClient,
|
|
@@ -1702,8 +1677,8 @@ function DepositFlow({
|
|
|
1702
1677
|
};
|
|
1703
1678
|
}
|
|
1704
1679
|
if (!isConnectSelectionConfirmed || !selectedConnectAddress) return null;
|
|
1705
|
-
if (_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1706
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1680
|
+
if (_optionalChain([dappWalletClient, 'optionalAccess', _38 => _38.account]) && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
|
|
1681
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _39 => _39.chain, 'optionalAccess', _40 => _40.id]), () => ( targetChain));
|
|
1707
1682
|
return {
|
|
1708
1683
|
ownerAddress: dappWalletClient.account.address,
|
|
1709
1684
|
walletClient: dappWalletClient,
|
|
@@ -1711,7 +1686,7 @@ function DepositFlow({
|
|
|
1711
1686
|
switchChain: dappSwitchChain
|
|
1712
1687
|
};
|
|
1713
1688
|
}
|
|
1714
|
-
if (_optionalChain([reownWallet, 'optionalAccess',
|
|
1689
|
+
if (_optionalChain([reownWallet, 'optionalAccess', _41 => _41.address, 'optionalAccess', _42 => _42.toLowerCase, 'call', _43 => _43()]) === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
|
|
1715
1690
|
return {
|
|
1716
1691
|
ownerAddress: reownWallet.address,
|
|
1717
1692
|
walletClient: reownWallet.walletClient,
|
|
@@ -1732,7 +1707,7 @@ function DepositFlow({
|
|
|
1732
1707
|
reownWallet,
|
|
1733
1708
|
targetChain
|
|
1734
1709
|
]);
|
|
1735
|
-
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess',
|
|
1710
|
+
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _44 => _44.ownerAddress]))), () => ( null));
|
|
1736
1711
|
const lastTargetRef = _react.useRef.call(void 0, null);
|
|
1737
1712
|
_react.useEffect.call(void 0, () => {
|
|
1738
1713
|
const prev = lastTargetRef.current;
|
|
@@ -1776,10 +1751,10 @@ function DepositFlow({
|
|
|
1776
1751
|
const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : 4;
|
|
1777
1752
|
const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
|
|
1778
1753
|
_react.useEffect.call(void 0, () => {
|
|
1779
|
-
_optionalChain([onStepChange, 'optionalCall',
|
|
1754
|
+
_optionalChain([onStepChange, 'optionalCall', _45 => _45(stepIndex, currentBackHandler)]);
|
|
1780
1755
|
}, [stepIndex, currentBackHandler, onStepChange]);
|
|
1781
1756
|
_react.useEffect.call(void 0, () => {
|
|
1782
|
-
_optionalChain([onTotalBalanceChange, 'optionalCall',
|
|
1757
|
+
_optionalChain([onTotalBalanceChange, 'optionalCall', _46 => _46(totalBalanceUsd)]);
|
|
1783
1758
|
}, [totalBalanceUsd, onTotalBalanceChange]);
|
|
1784
1759
|
const isDepositAddressMode = flowMode === "deposit-address";
|
|
1785
1760
|
const handleSelectProvider = _react.useCallback.call(void 0, () => {
|
|
@@ -1817,13 +1792,13 @@ function DepositFlow({
|
|
|
1817
1792
|
directTransfer: isSameRoute(chainId, token, targetChain, targetToken)
|
|
1818
1793
|
};
|
|
1819
1794
|
});
|
|
1820
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
1795
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _47 => _47({ txHash, sourceChain: chainId, amount })]);
|
|
1821
1796
|
},
|
|
1822
1797
|
[onDepositSubmitted, targetChain, targetToken]
|
|
1823
1798
|
);
|
|
1824
1799
|
const handleConnected = _react.useCallback.call(void 0,
|
|
1825
1800
|
(addr, smartAccount) => {
|
|
1826
|
-
_optionalChain([onConnected, 'optionalCall',
|
|
1801
|
+
_optionalChain([onConnected, 'optionalCall', _48 => _48({ address: addr, smartAccount })]);
|
|
1827
1802
|
},
|
|
1828
1803
|
[onConnected]
|
|
1829
1804
|
);
|
|
@@ -1880,25 +1855,25 @@ function DepositFlow({
|
|
|
1880
1855
|
);
|
|
1881
1856
|
const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
|
|
1882
1857
|
(txHash, sourceChain, amount) => {
|
|
1883
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
1858
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _49 => _49({ txHash, sourceChain, amount })]);
|
|
1884
1859
|
},
|
|
1885
1860
|
[onDepositSubmitted]
|
|
1886
1861
|
);
|
|
1887
1862
|
const handleDepositComplete = _react.useCallback.call(void 0,
|
|
1888
1863
|
(txHash, destinationTxHash) => {
|
|
1889
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1864
|
+
_optionalChain([onDepositComplete, 'optionalCall', _50 => _50({ txHash, destinationTxHash })]);
|
|
1890
1865
|
},
|
|
1891
1866
|
[onDepositComplete]
|
|
1892
1867
|
);
|
|
1893
1868
|
const handleDepositFailed = _react.useCallback.call(void 0,
|
|
1894
1869
|
(txHash, error) => {
|
|
1895
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
1870
|
+
_optionalChain([onDepositFailed, 'optionalCall', _51 => _51({ txHash, error })]);
|
|
1896
1871
|
},
|
|
1897
1872
|
[onDepositFailed]
|
|
1898
1873
|
);
|
|
1899
1874
|
const handleError = _react.useCallback.call(void 0,
|
|
1900
1875
|
(message, code) => {
|
|
1901
|
-
_optionalChain([onError, 'optionalCall',
|
|
1876
|
+
_optionalChain([onError, 'optionalCall', _52 => _52({ message, code })]);
|
|
1902
1877
|
},
|
|
1903
1878
|
[onError]
|
|
1904
1879
|
);
|
|
@@ -1912,14 +1887,14 @@ function DepositFlow({
|
|
|
1912
1887
|
}
|
|
1913
1888
|
return null;
|
|
1914
1889
|
}, [selectedConnectAddress, walletOptions]);
|
|
1915
|
-
const walletOptionsKey = _react.useMemo.call(void 0,
|
|
1916
|
-
() => walletOptions.map((option) => option.address.toLowerCase()).join(","),
|
|
1917
|
-
[walletOptions]
|
|
1918
|
-
);
|
|
1919
1890
|
const hasNavigatedBackRef = _react.useRef.call(void 0, false);
|
|
1920
1891
|
_react.useEffect.call(void 0, () => {
|
|
1921
|
-
|
|
1922
|
-
|
|
1892
|
+
if (!showConnectStep && isConnectSelectionConfirmed && flowMode === "wallet" && !signerContext) {
|
|
1893
|
+
setSelectedConnectAddress(null);
|
|
1894
|
+
setIsConnectSelectionConfirmed(false);
|
|
1895
|
+
setFlowMode(null);
|
|
1896
|
+
}
|
|
1897
|
+
}, [showConnectStep, isConnectSelectionConfirmed, flowMode, signerContext]);
|
|
1923
1898
|
_react.useEffect.call(void 0, () => {
|
|
1924
1899
|
if (hasNavigatedBackRef.current || isConnectSelectionConfirmed || flowMode) {
|
|
1925
1900
|
return;
|
|
@@ -1933,12 +1908,13 @@ function DepositFlow({
|
|
|
1933
1908
|
return;
|
|
1934
1909
|
}
|
|
1935
1910
|
}
|
|
1936
|
-
if (!hasWalletOptions && dappAddress) {
|
|
1911
|
+
if (!hasWalletOptions && dappAddress && !hasReownSession) {
|
|
1937
1912
|
handleSelectTransferCrypto();
|
|
1938
1913
|
setIsConnectSelectionConfirmed(true);
|
|
1939
1914
|
}
|
|
1940
1915
|
}, [
|
|
1941
1916
|
hasWalletOptions,
|
|
1917
|
+
hasReownSession,
|
|
1942
1918
|
isConnectSelectionConfirmed,
|
|
1943
1919
|
flowMode,
|
|
1944
1920
|
selectedConnectAddressEffective,
|
|
@@ -2021,13 +1997,13 @@ function DepositFlow({
|
|
|
2021
1997
|
)
|
|
2022
1998
|
] });
|
|
2023
1999
|
}
|
|
2024
|
-
if (!_optionalChain([signerContext, 'optionalAccess',
|
|
2000
|
+
if (!_optionalChain([signerContext, 'optionalAccess', _53 => _53.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _54 => _54.publicClient])) {
|
|
2025
2001
|
return null;
|
|
2026
2002
|
}
|
|
2027
2003
|
const ownerAddress = signerContext.ownerAddress;
|
|
2028
|
-
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access',
|
|
2004
|
+
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _55 => _55.walletClient, 'optionalAccess', _56 => _56.chain, 'optionalAccess', _57 => _57.id]), () => ( _optionalChain([signerContext, 'access', _58 => _58.publicClient, 'access', _59 => _59.chain, 'optionalAccess', _60 => _60.id]))), () => ( targetChain));
|
|
2029
2005
|
const getReadClientForChain = (chainId) => {
|
|
2030
|
-
if (_optionalChain([signerContext, 'access',
|
|
2006
|
+
if (_optionalChain([signerContext, 'access', _61 => _61.publicClient, 'access', _62 => _62.chain, 'optionalAccess', _63 => _63.id]) === chainId) {
|
|
2031
2007
|
return signerContext.publicClient;
|
|
2032
2008
|
}
|
|
2033
2009
|
return _chunkYIHOACM3cjs.getPublicClient.call(void 0, chainId);
|
|
@@ -2123,7 +2099,7 @@ function DepositFlow({
|
|
|
2123
2099
|
// src/DepositModal.tsx
|
|
2124
2100
|
|
|
2125
2101
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
2126
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
2102
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-TLKQ7Y4X.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
2127
2103
|
);
|
|
2128
2104
|
function DepositModal(props) {
|
|
2129
2105
|
const needsReown = !!props.reownAppId;
|
|
@@ -2184,7 +2160,7 @@ function DepositModalInner({
|
|
|
2184
2160
|
_react.useEffect.call(void 0, () => {
|
|
2185
2161
|
if (isOpen && !hasCalledReady.current) {
|
|
2186
2162
|
hasCalledReady.current = true;
|
|
2187
|
-
_optionalChain([onReady, 'optionalCall',
|
|
2163
|
+
_optionalChain([onReady, 'optionalCall', _64 => _64()]);
|
|
2188
2164
|
}
|
|
2189
2165
|
}, [isOpen, onReady]);
|
|
2190
2166
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2203,14 +2179,14 @@ function DepositModalInner({
|
|
|
2203
2179
|
setTotalBalanceUsd(balance2);
|
|
2204
2180
|
}, []);
|
|
2205
2181
|
const handleBack = _react.useCallback.call(void 0, () => {
|
|
2206
|
-
_optionalChain([backHandlerRef, 'access',
|
|
2182
|
+
_optionalChain([backHandlerRef, 'access', _65 => _65.current, 'optionalCall', _66 => _66()]);
|
|
2207
2183
|
}, []);
|
|
2208
|
-
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2209
|
-
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2210
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2211
|
-
const balance = _optionalChain([uiConfig, 'optionalAccess',
|
|
2212
|
-
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
2213
|
-
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
2184
|
+
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _67 => _67.showLogo]), () => ( false));
|
|
2185
|
+
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _68 => _68.showStepper]), () => ( false));
|
|
2186
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _69 => _69.showBackButton]), () => ( true));
|
|
2187
|
+
const balance = _optionalChain([uiConfig, 'optionalAccess', _70 => _70.balance]);
|
|
2188
|
+
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _71 => _71.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
|
|
2189
|
+
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _72 => _72.title]), () => ( "Deposit"));
|
|
2214
2190
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
2215
2191
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2216
2192
|
_chunkYIHOACM3cjs.Modal,
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYCXVHPGZcjs = require('./chunk-YCXVHPGZ.cjs');
|
|
4
4
|
require('./chunk-YIHOACM3.cjs');
|
|
5
5
|
require('./chunk-S4UBVD3H.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.DepositModal =
|
|
8
|
+
exports.DepositModal = _chunkYCXVHPGZcjs.DepositModal;
|
package/dist/deposit.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYCXVHPGZcjs = require('./chunk-YCXVHPGZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkDQO6MO27cjs = require('./chunk-DQO6MO27.cjs');
|
|
7
7
|
require('./chunk-YIHOACM3.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
@@ -66,4 +66,4 @@ var _chunkS4UBVD3Hcjs = require('./chunk-S4UBVD3H.cjs');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
exports.CHAIN_BY_ID = _chunkS4UBVD3Hcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkS4UBVD3Hcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkS4UBVD3Hcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
69
|
+
exports.CHAIN_BY_ID = _chunkS4UBVD3Hcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkS4UBVD3Hcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkS4UBVD3Hcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkYCXVHPGZcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkS4UBVD3Hcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkS4UBVD3Hcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkS4UBVD3Hcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkDQO6MO27cjs.WithdrawModal; exports.chainRegistry = _chunkS4UBVD3Hcjs.chainRegistry; exports.findChainIdForToken = _chunkS4UBVD3Hcjs.findChainIdForToken; exports.getChainBadge = _chunkS4UBVD3Hcjs.getChainBadge; exports.getChainIcon = _chunkS4UBVD3Hcjs.getChainIcon; exports.getChainId = _chunkS4UBVD3Hcjs.getChainId; exports.getChainName = _chunkS4UBVD3Hcjs.getChainName; exports.getChainObject = _chunkS4UBVD3Hcjs.getChainObject; exports.getExplorerName = _chunkS4UBVD3Hcjs.getExplorerName; exports.getExplorerTxUrl = _chunkS4UBVD3Hcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkS4UBVD3Hcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkS4UBVD3Hcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkS4UBVD3Hcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkS4UBVD3Hcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkS4UBVD3Hcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkS4UBVD3Hcjs.getTokenAddress; exports.getTokenDecimals = _chunkS4UBVD3Hcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkS4UBVD3Hcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkS4UBVD3Hcjs.getTokenIcon; exports.getTokenSymbol = _chunkS4UBVD3Hcjs.getTokenSymbol; exports.getUsdcAddress = _chunkS4UBVD3Hcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkS4UBVD3Hcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkS4UBVD3Hcjs.isSupportedTokenAddressForChain;
|
package/dist/index.mjs
CHANGED
package/dist/reown.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYCXVHPGZcjs = require('./chunk-YCXVHPGZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkDQO6MO27cjs = require('./chunk-DQO6MO27.cjs');
|
|
7
7
|
require('./chunk-YIHOACM3.cjs');
|
|
8
8
|
require('./chunk-S4UBVD3H.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.DepositModal =
|
|
12
|
+
exports.DepositModal = _chunkYCXVHPGZcjs.DepositModal; exports.WithdrawModal = _chunkDQO6MO27cjs.WithdrawModal;
|
package/dist/reown.mjs
CHANGED
package/dist/withdraw.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDQO6MO27cjs = require('./chunk-DQO6MO27.cjs');
|
|
4
4
|
require('./chunk-YIHOACM3.cjs');
|
|
5
5
|
require('./chunk-S4UBVD3H.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.WithdrawModal =
|
|
8
|
+
exports.WithdrawModal = _chunkDQO6MO27cjs.WithdrawModal;
|
package/dist/withdraw.mjs
CHANGED