@rhinestone/deposit-modal 0.3.0-alpha.4 → 0.3.0-alpha.6
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-A2E4QTSF.mjs → DepositModalReown-3N7YYGB4.mjs} +2 -2
- package/dist/{DepositModalReown-XV4BEUHT.cjs → DepositModalReown-SBSP5ZW2.cjs} +3 -3
- package/dist/{WithdrawModalReown-KGFCNAJP.cjs → WithdrawModalReown-4B6IMTBB.cjs} +3 -3
- package/dist/{WithdrawModalReown-UO7XCJ7K.mjs → WithdrawModalReown-BB3MZAIO.mjs} +2 -2
- package/dist/{chunk-UEYFJM5Y.cjs → chunk-BB6UVRAV.cjs} +74 -74
- package/dist/{chunk-TFXIQ7YH.mjs → chunk-CTYKQ4B4.mjs} +295 -171
- package/dist/{chunk-V6NJIPSS.cjs → chunk-DX2D2TRZ.cjs} +239 -115
- package/dist/{chunk-BNY4AL7P.mjs → chunk-EJH36TH2.mjs} +90 -102
- package/dist/{chunk-GE3TMZEL.mjs → chunk-QI6Q7V6O.mjs} +19 -19
- package/dist/{chunk-NSI4BCBV.cjs → chunk-UVIIWUWP.cjs} +272 -284
- 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/styles.css +401 -180
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlertTriangleIcon,
|
|
3
|
-
|
|
3
|
+
ArrowUpRightIcon,
|
|
4
4
|
BodyHeader,
|
|
5
5
|
Button,
|
|
6
6
|
CheckIcon,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
tokenFormatter,
|
|
49
49
|
txRefsMatch,
|
|
50
50
|
useLatestRef
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-CTYKQ4B4.mjs";
|
|
52
52
|
import {
|
|
53
53
|
DEFAULT_BACKEND_URL,
|
|
54
54
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -586,7 +586,7 @@ function AmountStep({
|
|
|
586
586
|
liquidityWarning
|
|
587
587
|
);
|
|
588
588
|
};
|
|
589
|
-
const continueLabel =
|
|
589
|
+
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
590
590
|
const continueDisabled = chainMismatch || isCheckingLiquidity || exceedsBalance || numericAmount === 0 && !isBelowMin || balance === null;
|
|
591
591
|
const sourceChainName = getChainName(asset.chainId);
|
|
592
592
|
const targetChainName = getChainName(targetChain);
|
|
@@ -679,6 +679,8 @@ function AmountStep({
|
|
|
679
679
|
{
|
|
680
680
|
onClick: handleContinue,
|
|
681
681
|
fullWidth: true,
|
|
682
|
+
loading: isCheckingLiquidity,
|
|
683
|
+
loadingText: "Checking liquidity\u2026",
|
|
682
684
|
disabled: continueDisabled,
|
|
683
685
|
children: continueLabel
|
|
684
686
|
}
|
|
@@ -834,50 +836,50 @@ function ConfirmStep({
|
|
|
834
836
|
return /* @__PURE__ */ jsxs3("div", { className: "rs-screen", children: [
|
|
835
837
|
/* @__PURE__ */ jsxs3("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
836
838
|
/* @__PURE__ */ jsx3(BodyHeader, { icon: /* @__PURE__ */ jsx3(WalletIcon, {}), title: "Review deposit" }),
|
|
837
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
838
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
839
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-details", children: [
|
|
840
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
839
841
|
/* @__PURE__ */ jsx3("span", { children: "Source chain" }),
|
|
840
|
-
/* @__PURE__ */ jsxs3("span", { className: "rs-
|
|
842
|
+
/* @__PURE__ */ jsxs3("span", { className: "rs-review-detail-value", children: [
|
|
841
843
|
/* @__PURE__ */ jsx3("span", { children: sourceChainName }),
|
|
842
|
-
sourceChainIcon && /* @__PURE__ */ jsx3("span", { className: "rs-
|
|
844
|
+
sourceChainIcon && /* @__PURE__ */ jsx3("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: sourceChainIcon, alt: "" }) })
|
|
843
845
|
] })
|
|
844
846
|
] }),
|
|
845
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
847
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
846
848
|
/* @__PURE__ */ jsx3("span", { children: "Destination chain" }),
|
|
847
|
-
/* @__PURE__ */ jsxs3("span", { className: "rs-
|
|
849
|
+
/* @__PURE__ */ jsxs3("span", { className: "rs-review-detail-value", children: [
|
|
848
850
|
/* @__PURE__ */ jsx3("span", { children: targetChainName }),
|
|
849
|
-
targetChainIcon && /* @__PURE__ */ jsx3("span", { className: "rs-
|
|
851
|
+
targetChainIcon && /* @__PURE__ */ jsx3("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: targetChainIcon, alt: "" }) })
|
|
850
852
|
] })
|
|
851
853
|
] }),
|
|
852
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
854
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
853
855
|
/* @__PURE__ */ jsx3("span", { children: "Estimated time" }),
|
|
854
|
-
/* @__PURE__ */ jsx3("span", { className: "rs-
|
|
856
|
+
/* @__PURE__ */ jsx3("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
855
857
|
] }),
|
|
856
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
858
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
857
859
|
/* @__PURE__ */ jsx3("span", { children: "You send" }),
|
|
858
|
-
/* @__PURE__ */ jsxs3("span", { className: "rs-
|
|
860
|
+
/* @__PURE__ */ jsxs3("span", { className: "rs-review-detail-value", children: [
|
|
859
861
|
/* @__PURE__ */ jsxs3("span", { children: [
|
|
860
862
|
formattedSendAmount,
|
|
861
863
|
" ",
|
|
862
864
|
asset.symbol
|
|
863
865
|
] }),
|
|
864
|
-
sourceTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-
|
|
866
|
+
sourceTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: sourceTokenIcon, alt: "" }) })
|
|
865
867
|
] })
|
|
866
868
|
] }),
|
|
867
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
869
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
868
870
|
/* @__PURE__ */ jsx3("span", { children: "Receive" }),
|
|
869
|
-
/* @__PURE__ */ jsxs3("span", { className: "rs-
|
|
871
|
+
/* @__PURE__ */ jsxs3("span", { className: "rs-review-detail-value", children: [
|
|
870
872
|
/* @__PURE__ */ jsxs3("span", { children: [
|
|
871
873
|
receiveAmount,
|
|
872
874
|
" ",
|
|
873
875
|
targetSymbol
|
|
874
876
|
] }),
|
|
875
|
-
targetTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-
|
|
877
|
+
targetTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: targetTokenIcon, alt: "" }) })
|
|
876
878
|
] })
|
|
877
879
|
] }),
|
|
878
|
-
/* @__PURE__ */ jsxs3("div", { className: "rs-
|
|
880
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-review-detail-row", children: [
|
|
879
881
|
/* @__PURE__ */ jsx3("span", { children: "Fees" }),
|
|
880
|
-
/* @__PURE__ */ jsxs3("span", { className: "rs-
|
|
882
|
+
/* @__PURE__ */ jsxs3("span", { className: "rs-review-detail-value", children: [
|
|
881
883
|
/* @__PURE__ */ jsx3(
|
|
882
884
|
"span",
|
|
883
885
|
{
|
|
@@ -885,7 +887,7 @@ function ConfirmStep({
|
|
|
885
887
|
children: "$0.05"
|
|
886
888
|
}
|
|
887
889
|
),
|
|
888
|
-
/* @__PURE__ */ jsx3(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx3("span", { className: "rs-
|
|
890
|
+
/* @__PURE__ */ jsx3(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx3("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx3(InfoIcon, {}) }) })
|
|
889
891
|
] })
|
|
890
892
|
] })
|
|
891
893
|
] }),
|
|
@@ -1141,28 +1143,44 @@ function DepositNotification({
|
|
|
1141
1143
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1142
1144
|
const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
|
|
1143
1145
|
const statusIcon = status === "complete" ? /* @__PURE__ */ jsx4("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ jsx4(CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ jsx4("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ jsx4(CloseIcon, {}) }) : /* @__PURE__ */ jsx4("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ jsx4(Spinner, {}) });
|
|
1146
|
+
const showClose = status !== "processing";
|
|
1144
1147
|
return /* @__PURE__ */ jsxs4(
|
|
1145
1148
|
"div",
|
|
1146
1149
|
{
|
|
1147
|
-
className: `rs-deposit-notification rs-deposit-notification--${status}`,
|
|
1150
|
+
className: `rs-deposit-notification rs-deposit-notification--${status} ${expanded ? "rs-deposit-notification--expanded" : ""}`,
|
|
1148
1151
|
children: [
|
|
1149
1152
|
/* @__PURE__ */ jsxs4("div", { className: "rs-deposit-notification-header", children: [
|
|
1150
1153
|
/* @__PURE__ */ jsx4("div", { className: "rs-deposit-notification-icon", children: statusIcon }),
|
|
1151
1154
|
/* @__PURE__ */ jsxs4("div", { className: "rs-deposit-notification-content", children: [
|
|
1152
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-deposit-notification-title-row", children: [
|
|
1156
|
+
/* @__PURE__ */ jsx4("span", { className: "rs-deposit-notification-title", children: title }),
|
|
1157
|
+
showClose && /* @__PURE__ */ jsx4(
|
|
1158
|
+
"button",
|
|
1159
|
+
{
|
|
1160
|
+
type: "button",
|
|
1161
|
+
className: "rs-deposit-notification-close",
|
|
1162
|
+
onClick: () => onDismiss(deposit.id),
|
|
1163
|
+
"aria-label": "Dismiss",
|
|
1164
|
+
children: /* @__PURE__ */ jsx4(CloseIcon, {})
|
|
1165
|
+
}
|
|
1166
|
+
)
|
|
1167
|
+
] }),
|
|
1153
1168
|
/* @__PURE__ */ jsx4("div", { className: "rs-deposit-notification-subtitle", children: subtitle })
|
|
1154
|
-
] })
|
|
1155
|
-
/* @__PURE__ */ jsx4(
|
|
1156
|
-
"button",
|
|
1157
|
-
{
|
|
1158
|
-
type: "button",
|
|
1159
|
-
className: "rs-deposit-notification-close",
|
|
1160
|
-
onClick: () => onDismiss(deposit.id),
|
|
1161
|
-
"aria-label": "Dismiss",
|
|
1162
|
-
children: /* @__PURE__ */ jsx4(CloseIcon, {})
|
|
1163
|
-
}
|
|
1164
|
-
)
|
|
1169
|
+
] })
|
|
1165
1170
|
] }),
|
|
1171
|
+
/* @__PURE__ */ jsxs4(
|
|
1172
|
+
"button",
|
|
1173
|
+
{
|
|
1174
|
+
type: "button",
|
|
1175
|
+
className: "rs-deposit-notification-toggle",
|
|
1176
|
+
onClick: () => setExpanded(!expanded),
|
|
1177
|
+
"aria-expanded": expanded,
|
|
1178
|
+
children: [
|
|
1179
|
+
/* @__PURE__ */ jsx4("span", { children: expanded ? "See less details" : "See more details" }),
|
|
1180
|
+
/* @__PURE__ */ jsx4(ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
),
|
|
1166
1184
|
expanded && /* @__PURE__ */ jsxs4("div", { className: "rs-deposit-notification-details", children: [
|
|
1167
1185
|
/* @__PURE__ */ jsxs4("div", { className: "rs-deposit-notification-row", children: [
|
|
1168
1186
|
/* @__PURE__ */ jsx4("span", { className: "rs-deposit-notification-label", children: "Deposit tx" }),
|
|
@@ -1204,16 +1222,7 @@ function DepositNotification({
|
|
|
1204
1222
|
/* @__PURE__ */ jsx4("span", { className: "rs-deposit-notification-label", children: "Order filled" }),
|
|
1205
1223
|
/* @__PURE__ */ jsx4("span", { className: "rs-deposit-notification-value", children: formatTimestamp(completedAt) })
|
|
1206
1224
|
] })
|
|
1207
|
-
] })
|
|
1208
|
-
/* @__PURE__ */ jsx4(
|
|
1209
|
-
"button",
|
|
1210
|
-
{
|
|
1211
|
-
type: "button",
|
|
1212
|
-
className: "rs-deposit-notification-toggle",
|
|
1213
|
-
onClick: () => setExpanded(!expanded),
|
|
1214
|
-
children: expanded ? "See less" : "See more"
|
|
1215
|
-
}
|
|
1216
|
-
)
|
|
1225
|
+
] })
|
|
1217
1226
|
]
|
|
1218
1227
|
}
|
|
1219
1228
|
);
|
|
@@ -1429,7 +1438,6 @@ function DepositAddressStep({
|
|
|
1429
1438
|
onDepositComplete,
|
|
1430
1439
|
onDepositFailed,
|
|
1431
1440
|
onCopyAddress,
|
|
1432
|
-
onRequestWalletPicker,
|
|
1433
1441
|
onError
|
|
1434
1442
|
}) {
|
|
1435
1443
|
const hasSolana = Boolean(solanaDepositAddress);
|
|
@@ -1723,7 +1731,7 @@ function DepositAddressStep({
|
|
|
1723
1731
|
const qrIconSrc = getChainIcon(sourceChainId);
|
|
1724
1732
|
return /* @__PURE__ */ jsxs5("div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
1725
1733
|
/* @__PURE__ */ jsxs5("div", { className: "rs-screen-body", children: [
|
|
1726
|
-
/* @__PURE__ */ jsx5(BodyHeader, { icon: /* @__PURE__ */ jsx5(
|
|
1734
|
+
/* @__PURE__ */ jsx5(BodyHeader, { icon: /* @__PURE__ */ jsx5(HandCoinsIcon, {}), title: "Transfer crypto" }),
|
|
1727
1735
|
/* @__PURE__ */ jsxs5("div", { className: "rs-deposit-address-selectors", children: [
|
|
1728
1736
|
/* @__PURE__ */ jsxs5("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
1729
1737
|
/* @__PURE__ */ jsx5("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -1731,7 +1739,8 @@ function DepositAddressStep({
|
|
|
1731
1739
|
"button",
|
|
1732
1740
|
{
|
|
1733
1741
|
type: "button",
|
|
1734
|
-
className: "rs-deposit-address-dropdown-trigger"
|
|
1742
|
+
className: `rs-deposit-address-dropdown-trigger ${chainDropdownOpen ? "rs-deposit-address-dropdown-trigger--open" : ""}`,
|
|
1743
|
+
"aria-expanded": chainDropdownOpen,
|
|
1735
1744
|
onClick: () => {
|
|
1736
1745
|
setChainDropdownOpen(!chainDropdownOpen);
|
|
1737
1746
|
setTokenDropdownOpen(false);
|
|
@@ -1779,7 +1788,7 @@ function DepositAddressStep({
|
|
|
1779
1788
|
/* @__PURE__ */ jsx5("span", { children: "Supported token" }),
|
|
1780
1789
|
/* @__PURE__ */ jsxs5("span", { className: "rs-deposit-address-min", children: [
|
|
1781
1790
|
"Min.$",
|
|
1782
|
-
uiConfig?.minDepositUsd ?? 0.1,
|
|
1791
|
+
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
1783
1792
|
/* @__PURE__ */ jsx5(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx5(
|
|
1784
1793
|
InfoIcon,
|
|
1785
1794
|
{
|
|
@@ -1793,7 +1802,8 @@ function DepositAddressStep({
|
|
|
1793
1802
|
"button",
|
|
1794
1803
|
{
|
|
1795
1804
|
type: "button",
|
|
1796
|
-
className: "rs-deposit-address-dropdown-trigger"
|
|
1805
|
+
className: `rs-deposit-address-dropdown-trigger ${tokenDropdownOpen ? "rs-deposit-address-dropdown-trigger--open" : ""}`,
|
|
1806
|
+
"aria-expanded": tokenDropdownOpen,
|
|
1797
1807
|
onClick: () => {
|
|
1798
1808
|
setTokenDropdownOpen(!tokenDropdownOpen);
|
|
1799
1809
|
setChainDropdownOpen(false);
|
|
@@ -1850,8 +1860,8 @@ function DepositAddressStep({
|
|
|
1850
1860
|
"div",
|
|
1851
1861
|
{
|
|
1852
1862
|
style: {
|
|
1853
|
-
width:
|
|
1854
|
-
height:
|
|
1863
|
+
width: 200,
|
|
1864
|
+
height: 200,
|
|
1855
1865
|
display: "flex",
|
|
1856
1866
|
alignItems: "center",
|
|
1857
1867
|
justifyContent: "center"
|
|
@@ -1859,7 +1869,7 @@ function DepositAddressStep({
|
|
|
1859
1869
|
children: /* @__PURE__ */ jsx5(Spinner, {})
|
|
1860
1870
|
}
|
|
1861
1871
|
),
|
|
1862
|
-
children: /* @__PURE__ */ jsx5(QRCode, { value: displayAddress, size:
|
|
1872
|
+
children: /* @__PURE__ */ jsx5(QRCode, { value: displayAddress, size: 200, iconSrc: qrIconSrc })
|
|
1863
1873
|
}
|
|
1864
1874
|
) }),
|
|
1865
1875
|
/* @__PURE__ */ jsx5("div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
@@ -1952,16 +1962,7 @@ function DepositAddressStep({
|
|
|
1952
1962
|
]
|
|
1953
1963
|
}
|
|
1954
1964
|
),
|
|
1955
|
-
pollingError && /* @__PURE__ */ jsx5("div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1956
|
-
onRequestWalletPicker && /* @__PURE__ */ jsx5(
|
|
1957
|
-
"button",
|
|
1958
|
-
{
|
|
1959
|
-
type: "button",
|
|
1960
|
-
className: "rs-connect-wallet-manage",
|
|
1961
|
-
onClick: onRequestWalletPicker,
|
|
1962
|
-
children: "Use a wallet to deposit instead"
|
|
1963
|
-
}
|
|
1964
|
-
)
|
|
1965
|
+
pollingError && /* @__PURE__ */ jsx5("div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1965
1966
|
] }),
|
|
1966
1967
|
notifications.length > 0 && /* @__PURE__ */ jsx5("div", { className: "rs-deposit-notifications", children: notifications.map((deposit) => /* @__PURE__ */ jsx5(
|
|
1967
1968
|
DepositNotification,
|
|
@@ -3912,15 +3913,6 @@ function AccountPreparingSkeleton({
|
|
|
3912
3913
|
) })
|
|
3913
3914
|
] });
|
|
3914
3915
|
}
|
|
3915
|
-
function SetupUpdatingBanner({
|
|
3916
|
-
status,
|
|
3917
|
-
message
|
|
3918
|
-
}) {
|
|
3919
|
-
if (status === "error") {
|
|
3920
|
-
return /* @__PURE__ */ jsx10("div", { className: "rs-deposit-address-error", role: "alert", children: message ?? "Couldn't update deposit details \u2014 please retry." });
|
|
3921
|
-
}
|
|
3922
|
-
return /* @__PURE__ */ jsx10("div", { className: "rs-loading-state", style: { padding: "8px 16px" }, children: /* @__PURE__ */ jsx10("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx10("div", { className: "rs-loading-subtitle", children: "Updating deposit details\u2026" }) }) });
|
|
3923
|
-
}
|
|
3924
3916
|
var QR_AUTO_ADVANCE_HYDRATION_GRACE_MS = 1e3;
|
|
3925
3917
|
function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
|
|
3926
3918
|
return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
|
|
@@ -4092,6 +4084,9 @@ function DepositFlow({
|
|
|
4092
4084
|
const hasNavigatedBack = flowSlice.hasNavigatedBack;
|
|
4093
4085
|
const selectedWalletId = useDepositStore(selectedWalletIdSelector);
|
|
4094
4086
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState9(0);
|
|
4087
|
+
const [targetBalanceUsd, setTargetBalanceUsd] = useState9(
|
|
4088
|
+
void 0
|
|
4089
|
+
);
|
|
4095
4090
|
const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = useState9(() => !hasInitialWalletHydrationPending);
|
|
4096
4091
|
const portfolioAssetsRef = useRef5([]);
|
|
4097
4092
|
const stableWalletSignerRef = useRef5(null);
|
|
@@ -4372,6 +4367,26 @@ function DepositFlow({
|
|
|
4372
4367
|
() => readSetupForOwner(setupSlice, activeOwner),
|
|
4373
4368
|
[setupSlice, activeOwner]
|
|
4374
4369
|
);
|
|
4370
|
+
const activeSmartAccount = activeEntry.smartAccount;
|
|
4371
|
+
useEffect8(() => {
|
|
4372
|
+
if (!activeSmartAccount) {
|
|
4373
|
+
setTargetBalanceUsd(void 0);
|
|
4374
|
+
return;
|
|
4375
|
+
}
|
|
4376
|
+
let active = true;
|
|
4377
|
+
service.fetchPortfolio(activeSmartAccount).then((portfolio) => {
|
|
4378
|
+
if (!active) return;
|
|
4379
|
+
const target = portfolio.tokens.find(
|
|
4380
|
+
(t) => t.chainId === targetChain && typeof t.address === "string" && t.address.toLowerCase() === targetToken.toLowerCase()
|
|
4381
|
+
);
|
|
4382
|
+
setTargetBalanceUsd(target?.balanceUsd ?? 0);
|
|
4383
|
+
}).catch(() => {
|
|
4384
|
+
if (active) setTargetBalanceUsd(0);
|
|
4385
|
+
});
|
|
4386
|
+
return () => {
|
|
4387
|
+
active = false;
|
|
4388
|
+
};
|
|
4389
|
+
}, [activeSmartAccount, targetChain, targetToken, service]);
|
|
4375
4390
|
const lastActiveSetupLifecycleKeyRef = useRef5(null);
|
|
4376
4391
|
useEffect8(() => {
|
|
4377
4392
|
if (!flowMode || !isConnectSelectionConfirmed) {
|
|
@@ -5111,16 +5126,7 @@ function DepositFlow({
|
|
|
5111
5126
|
}
|
|
5112
5127
|
if (isDepositAddressMode) {
|
|
5113
5128
|
if (!dappAddress) return null;
|
|
5114
|
-
const isWalletPickerReachable = walletOptions.length > 0 || Boolean(reownWallet) || Boolean(onConnect);
|
|
5115
|
-
const showBanner = effectiveStep.type !== "setup" && (activeEntry.status === "loading" || activeEntry.status === "error");
|
|
5116
5129
|
return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
|
|
5117
|
-
showBanner && /* @__PURE__ */ jsx10(
|
|
5118
|
-
SetupUpdatingBanner,
|
|
5119
|
-
{
|
|
5120
|
-
status: activeEntry.status,
|
|
5121
|
-
message: activeEntry.message ?? void 0
|
|
5122
|
-
}
|
|
5123
|
-
),
|
|
5124
5130
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx10(
|
|
5125
5131
|
AccountPreparingSkeleton,
|
|
5126
5132
|
{
|
|
@@ -5154,9 +5160,6 @@ function DepositFlow({
|
|
|
5154
5160
|
cta_name: "copy"
|
|
5155
5161
|
});
|
|
5156
5162
|
},
|
|
5157
|
-
onRequestWalletPicker: isWalletPickerReachable ? () => storeApi.dispatch({
|
|
5158
|
-
type: "connect/wallet-picker-requested"
|
|
5159
|
-
}) : void 0,
|
|
5160
5163
|
onError: handleError,
|
|
5161
5164
|
debug
|
|
5162
5165
|
}
|
|
@@ -5167,15 +5170,7 @@ function DepositFlow({
|
|
|
5167
5170
|
if (!dappAddress) return null;
|
|
5168
5171
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
5169
5172
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
5170
|
-
const solanaShowBanner = effectiveStep.type !== "setup" && effectiveStep.type !== "processing" && (activeEntry.status === "loading" || activeEntry.status === "error");
|
|
5171
5173
|
return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
|
|
5172
|
-
solanaShowBanner && /* @__PURE__ */ jsx10(
|
|
5173
|
-
SetupUpdatingBanner,
|
|
5174
|
-
{
|
|
5175
|
-
status: activeEntry.status,
|
|
5176
|
-
message: activeEntry.message ?? void 0
|
|
5177
|
-
}
|
|
5178
|
-
),
|
|
5179
5174
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx10(
|
|
5180
5175
|
AccountPreparingSkeleton,
|
|
5181
5176
|
{
|
|
@@ -5206,6 +5201,7 @@ function DepositFlow({
|
|
|
5206
5201
|
targetTokenIcon: getTokenIcon(
|
|
5207
5202
|
getTokenSymbol(targetToken, targetChain)
|
|
5208
5203
|
),
|
|
5204
|
+
targetBalanceUsd,
|
|
5209
5205
|
onContinue: handleSolanaAmountContinue,
|
|
5210
5206
|
debug
|
|
5211
5207
|
}
|
|
@@ -5301,15 +5297,7 @@ function DepositFlow({
|
|
|
5301
5297
|
}
|
|
5302
5298
|
return getPublicClient(chainId);
|
|
5303
5299
|
};
|
|
5304
|
-
const walletShowBanner = effectiveStep.type !== "setup" && effectiveStep.type !== "processing" && (activeEntry.status === "loading" || activeEntry.status === "error");
|
|
5305
5300
|
return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
|
|
5306
|
-
walletShowBanner && /* @__PURE__ */ jsx10(
|
|
5307
|
-
SetupUpdatingBanner,
|
|
5308
|
-
{
|
|
5309
|
-
status: activeEntry.status,
|
|
5310
|
-
message: activeEntry.message ?? void 0
|
|
5311
|
-
}
|
|
5312
|
-
),
|
|
5313
5301
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx10(
|
|
5314
5302
|
AccountPreparingSkeleton,
|
|
5315
5303
|
{
|
|
@@ -5360,6 +5348,7 @@ function DepositFlow({
|
|
|
5360
5348
|
targetChain,
|
|
5361
5349
|
targetToken,
|
|
5362
5350
|
uiConfig,
|
|
5351
|
+
targetBalanceUsd,
|
|
5363
5352
|
service,
|
|
5364
5353
|
onContinue: handleAmountContinue,
|
|
5365
5354
|
onCtaClick: (ctaName) => {
|
|
@@ -5584,7 +5573,6 @@ function DepositHistoryPanel({
|
|
|
5584
5573
|
children: /* @__PURE__ */ jsx11(ChevronLeftIcon, {})
|
|
5585
5574
|
}
|
|
5586
5575
|
) }),
|
|
5587
|
-
/* @__PURE__ */ jsx11("div", { className: "rs-modal-header-nav-center" }),
|
|
5588
5576
|
/* @__PURE__ */ jsx11("div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ jsx11(
|
|
5589
5577
|
"button",
|
|
5590
5578
|
{
|
|
@@ -5708,7 +5696,7 @@ function HistoryCard({ deposit }) {
|
|
|
5708
5696
|
onClick: (e) => e.stopPropagation(),
|
|
5709
5697
|
children: [
|
|
5710
5698
|
/* @__PURE__ */ jsx11("span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
5711
|
-
/* @__PURE__ */ jsx11(
|
|
5699
|
+
/* @__PURE__ */ jsx11(ArrowUpRightIcon, {})
|
|
5712
5700
|
]
|
|
5713
5701
|
}
|
|
5714
5702
|
)
|
|
@@ -5723,7 +5711,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
5723
5711
|
// src/DepositModal.tsx
|
|
5724
5712
|
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5725
5713
|
var ReownDepositInner = lazy2(
|
|
5726
|
-
() => import("./DepositModalReown-
|
|
5714
|
+
() => import("./DepositModalReown-3N7YYGB4.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
5727
5715
|
);
|
|
5728
5716
|
function sortByCreatedAtDesc(items) {
|
|
5729
5717
|
return [...items].sort((a, b) => {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
saveSessionOwnerToStorage,
|
|
32
32
|
toEvmCaip2,
|
|
33
33
|
useLatestRef
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-CTYKQ4B4.mjs";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_BACKEND_URL,
|
|
37
37
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -697,50 +697,50 @@ function WithdrawReviewStep({
|
|
|
697
697
|
title: "Review withdrawal"
|
|
698
698
|
}
|
|
699
699
|
),
|
|
700
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
701
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
700
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-details", children: [
|
|
701
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
702
702
|
/* @__PURE__ */ jsx2("span", { children: "You send" }),
|
|
703
|
-
/* @__PURE__ */ jsxs2("span", { className: "rs-
|
|
703
|
+
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
704
704
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
705
705
|
amount,
|
|
706
706
|
" ",
|
|
707
707
|
sourceSymbol
|
|
708
708
|
] }),
|
|
709
|
-
sourceTokenIcon && /* @__PURE__ */ jsx2("span", { className: "rs-
|
|
709
|
+
sourceTokenIcon && /* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2("img", { src: sourceTokenIcon, alt: "" }) })
|
|
710
710
|
] })
|
|
711
711
|
] }),
|
|
712
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
712
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
713
713
|
/* @__PURE__ */ jsx2("span", { children: "Source chain" }),
|
|
714
|
-
/* @__PURE__ */ jsxs2("span", { className: "rs-
|
|
714
|
+
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
715
715
|
/* @__PURE__ */ jsx2("span", { children: sourceChainName }),
|
|
716
|
-
sourceChainIcon && /* @__PURE__ */ jsx2("span", { className: "rs-
|
|
716
|
+
sourceChainIcon && /* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2("img", { src: sourceChainIcon, alt: "" }) })
|
|
717
717
|
] })
|
|
718
718
|
] }),
|
|
719
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
719
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
720
720
|
/* @__PURE__ */ jsx2("span", { children: "Recipient" }),
|
|
721
|
-
/* @__PURE__ */ jsx2("span", { className: "rs-
|
|
721
|
+
/* @__PURE__ */ jsx2("span", { className: "rs-review-detail-value", children: /* @__PURE__ */ jsx2("span", { children: shortenAddress(recipient) }) })
|
|
722
722
|
] }),
|
|
723
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
723
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
724
724
|
/* @__PURE__ */ jsx2("span", { children: "Receive" }),
|
|
725
|
-
/* @__PURE__ */ jsxs2("span", { className: "rs-
|
|
725
|
+
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
726
726
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
727
727
|
amount,
|
|
728
728
|
" ",
|
|
729
729
|
targetSymbol
|
|
730
730
|
] }),
|
|
731
|
-
targetTokenIcon && /* @__PURE__ */ jsx2("span", { className: "rs-
|
|
731
|
+
targetTokenIcon && /* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2("img", { src: targetTokenIcon, alt: "" }) })
|
|
732
732
|
] })
|
|
733
733
|
] }),
|
|
734
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
734
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
735
735
|
/* @__PURE__ */ jsx2("span", { children: "Destination chain" }),
|
|
736
|
-
/* @__PURE__ */ jsxs2("span", { className: "rs-
|
|
736
|
+
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
737
737
|
/* @__PURE__ */ jsx2("span", { children: targetChainName }),
|
|
738
|
-
targetChainIcon && /* @__PURE__ */ jsx2("span", { className: "rs-
|
|
738
|
+
targetChainIcon && /* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2("img", { src: targetChainIcon, alt: "" }) })
|
|
739
739
|
] })
|
|
740
740
|
] }),
|
|
741
|
-
/* @__PURE__ */ jsxs2("div", { className: "rs-
|
|
741
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
742
742
|
/* @__PURE__ */ jsx2("span", { children: "Estimated time" }),
|
|
743
|
-
/* @__PURE__ */ jsx2("span", { className: "rs-
|
|
743
|
+
/* @__PURE__ */ jsx2("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
744
744
|
] })
|
|
745
745
|
] }),
|
|
746
746
|
error && /* @__PURE__ */ jsxs2("div", { className: "rs-amount-error", role: "alert", children: [
|
|
@@ -1493,7 +1493,7 @@ function deriveStepView(step, _registration) {
|
|
|
1493
1493
|
// src/WithdrawModal.tsx
|
|
1494
1494
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1495
1495
|
var ReownWithdrawInner = lazy(
|
|
1496
|
-
() => import("./WithdrawModalReown-
|
|
1496
|
+
() => import("./WithdrawModalReown-BB3MZAIO.mjs").then((m) => ({
|
|
1497
1497
|
default: m.WithdrawModalReown
|
|
1498
1498
|
}))
|
|
1499
1499
|
);
|