@deframe-sdk/components 0.1.28 → 0.1.30
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/index.d.mts +285 -2
- package/dist/index.d.ts +285 -2
- package/dist/index.js +2105 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2088 -57
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +139 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,9 +4,10 @@ import { HiXMark, HiChevronUp, HiChevronDown, HiChevronLeft, HiOutlineClock, HiA
|
|
|
4
4
|
import * as React6 from 'react';
|
|
5
5
|
import React6__default, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
6
6
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
7
|
-
import { MdClose, MdOutlineSearch, MdOutlineSearchOff, MdOutlineSwapHoriz, MdHistory, MdOutlineSwapVert, MdArrowRight, MdArrowDropDown, MdQrCodeScanner, MdOutlineArrowUpward, MdOutlineArrowDownward, MdCheckCircleOutline, MdErrorOutline, MdWarningAmber, MdInfoOutline, MdArrowUpward, MdArrowDownward } from 'react-icons/md';
|
|
7
|
+
import { MdClose, MdOutlineSearch, MdOutlineSearchOff, MdOutlineSwapHoriz, MdHistory, MdOutlineSwapVert, MdArrowRight, MdArrowDropDown, MdOutlineArrowBack, MdOutlineArrowDropDown, MdOutlineClose, MdContentCopy, MdOutlineExpandMore, MdQrCodeScanner, MdOutlineArrowUpward, MdOutlineArrowDownward, MdCheckCircleOutline, MdErrorOutline, MdWarningAmber, MdInfoOutline, MdArrowUpward, MdArrowDownward } from 'react-icons/md';
|
|
8
8
|
import { IoAlertCircleOutline, IoTimeOutline, IoCheckmarkOutline } from 'react-icons/io5';
|
|
9
9
|
import { PiClockCountdownBold } from 'react-icons/pi';
|
|
10
|
+
import QRCode from 'react-qr-code';
|
|
10
11
|
|
|
11
12
|
var __defProp = Object.defineProperty;
|
|
12
13
|
var __defProps = Object.defineProperties;
|
|
@@ -4339,9 +4340,9 @@ var ChooseAnAssetSwapView = ({
|
|
|
4339
4340
|
/* @__PURE__ */ jsx(LoadingDots, {})
|
|
4340
4341
|
] }) }),
|
|
4341
4342
|
displayedTokens.map((token, index) => {
|
|
4342
|
-
const balance = findBalance(token);
|
|
4343
|
-
const
|
|
4344
|
-
const formattedBalance = (balance == null ? void 0 : balance.amountUI) ? formatTokenAmount(balance.amountUI,
|
|
4343
|
+
const balance = findBalance == null ? void 0 : findBalance(token);
|
|
4344
|
+
const priceUSD = Number(balance == null ? void 0 : balance.priceUSD) || token.priceInUSD || 0;
|
|
4345
|
+
const formattedBalance = (balance == null ? void 0 : balance.amountUI) ? formatTokenAmount(balance.amountUI, priceUSD, token.decimals) : "0";
|
|
4345
4346
|
return /* @__PURE__ */ jsxs(
|
|
4346
4347
|
ListItem,
|
|
4347
4348
|
{
|
|
@@ -4352,7 +4353,14 @@ var ChooseAnAssetSwapView = ({
|
|
|
4352
4353
|
"data-chain-id": token.chainId,
|
|
4353
4354
|
"data-symbol": token.symbol,
|
|
4354
4355
|
children: [
|
|
4355
|
-
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("
|
|
4356
|
+
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("div", { className: "relative w-10 h-10 flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
4357
|
+
"img",
|
|
4358
|
+
{
|
|
4359
|
+
src: token.logoURI || "",
|
|
4360
|
+
alt: token.name,
|
|
4361
|
+
className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]"
|
|
4362
|
+
}
|
|
4363
|
+
) }) }),
|
|
4356
4364
|
/* @__PURE__ */ jsxs(ListItemContent, { children: [
|
|
4357
4365
|
/* @__PURE__ */ jsx(TextBody, { children: token.name }),
|
|
4358
4366
|
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: token.symbol })
|
|
@@ -6232,7 +6240,11 @@ var ChooseANetworkView = ({
|
|
|
6232
6240
|
autoFocus = true,
|
|
6233
6241
|
chains,
|
|
6234
6242
|
pageSize = 10,
|
|
6235
|
-
onChainClick
|
|
6243
|
+
onChainClick,
|
|
6244
|
+
actionSheetId,
|
|
6245
|
+
isOpen,
|
|
6246
|
+
currentActionSheetId,
|
|
6247
|
+
onClose
|
|
6236
6248
|
}) => {
|
|
6237
6249
|
const [searchValue, setSearchValue] = useState("");
|
|
6238
6250
|
const [page, setPage] = useState(1);
|
|
@@ -6244,52 +6256,72 @@ var ChooseANetworkView = ({
|
|
|
6244
6256
|
);
|
|
6245
6257
|
const displayedChains = filteredChains.slice(0, page * pageSize);
|
|
6246
6258
|
const hasMore = filteredChains.length > page * pageSize;
|
|
6247
|
-
|
|
6248
|
-
/* @__PURE__ */
|
|
6249
|
-
|
|
6250
|
-
/* @__PURE__ */
|
|
6251
|
-
|
|
6252
|
-
|
|
6259
|
+
const content = /* @__PURE__ */ jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
|
|
6260
|
+
onClose && /* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton_default, { testId: `choose-a-network-close-${actionSheetId != null ? actionSheetId : "default"}`, onClick: onClose }) }),
|
|
6261
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full p-[var(--deframe-widget-size-padding-x-lg)] overflow-hidden", children: [
|
|
6262
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0", children: [
|
|
6263
|
+
/* @__PURE__ */ jsx(TextHeading, { children: labels.title }),
|
|
6264
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
6265
|
+
/* @__PURE__ */ jsx(
|
|
6266
|
+
SearchInput,
|
|
6267
|
+
{
|
|
6268
|
+
value: searchValue,
|
|
6269
|
+
onChange: setSearchValue,
|
|
6270
|
+
placeholder: labels.searchPlaceholder,
|
|
6271
|
+
autoFocus
|
|
6272
|
+
}
|
|
6273
|
+
)
|
|
6274
|
+
] }),
|
|
6275
|
+
/* @__PURE__ */ jsxs(
|
|
6276
|
+
"div",
|
|
6253
6277
|
{
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6278
|
+
"data-testid": "choose-a-network-list",
|
|
6279
|
+
className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)] w-full mt-[var(--deframe-widget-size-gap-md)] overflow-y-auto flex-1 min-h-0",
|
|
6280
|
+
children: [
|
|
6281
|
+
displayedChains.map((chain) => /* @__PURE__ */ jsxs(
|
|
6282
|
+
ListItem,
|
|
6283
|
+
{
|
|
6284
|
+
className: "w-full flex-shrink-0",
|
|
6285
|
+
onClick: () => onChainClick(chain.chainId),
|
|
6286
|
+
"data-testid": `choose-network-item-${chain.chainId}`,
|
|
6287
|
+
"data-chain-id": chain.chainId,
|
|
6288
|
+
children: [
|
|
6289
|
+
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx(
|
|
6290
|
+
"img",
|
|
6291
|
+
{
|
|
6292
|
+
src: chain.imageUrl,
|
|
6293
|
+
alt: chain.name,
|
|
6294
|
+
className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]"
|
|
6295
|
+
}
|
|
6296
|
+
) }),
|
|
6297
|
+
/* @__PURE__ */ jsx(ListItemContent, { children: /* @__PURE__ */ jsx(TextBody, { children: chain.name }) })
|
|
6298
|
+
]
|
|
6299
|
+
},
|
|
6300
|
+
`chain-${chain.chainId}`
|
|
6301
|
+
)),
|
|
6302
|
+
hasMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-[var(--deframe-widget-size-padding-y-md)] flex-shrink-0", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: () => setPage(page + 1), children: labels.loadMoreLabel }) })
|
|
6303
|
+
]
|
|
6258
6304
|
}
|
|
6259
6305
|
)
|
|
6260
|
-
] })
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
alt: chain.name,
|
|
6280
|
-
className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]"
|
|
6281
|
-
}
|
|
6282
|
-
) }),
|
|
6283
|
-
/* @__PURE__ */ jsx(ListItemContent, { children: /* @__PURE__ */ jsx(TextBody, { children: chain.name }) })
|
|
6284
|
-
]
|
|
6285
|
-
},
|
|
6286
|
-
`chain-${chain.chainId}`
|
|
6287
|
-
)),
|
|
6288
|
-
hasMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-[var(--deframe-widget-size-padding-y-md)] flex-shrink-0", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: () => setPage(page + 1), children: labels.loadMoreLabel }) })
|
|
6289
|
-
]
|
|
6290
|
-
}
|
|
6291
|
-
)
|
|
6292
|
-
] }) });
|
|
6306
|
+
] })
|
|
6307
|
+
] });
|
|
6308
|
+
if (!actionSheetId) {
|
|
6309
|
+
return content;
|
|
6310
|
+
}
|
|
6311
|
+
return /* @__PURE__ */ jsx("div", { className: "flex justify-center", "data-testid": `choose-a-network-wrapper-${actionSheetId}`, children: /* @__PURE__ */ jsx(
|
|
6312
|
+
ActionSheet,
|
|
6313
|
+
{
|
|
6314
|
+
id: actionSheetId,
|
|
6315
|
+
currentActionSheetId: currentActionSheetId != null ? currentActionSheetId : null,
|
|
6316
|
+
isOpen: isOpen != null ? isOpen : false,
|
|
6317
|
+
onClose: onClose != null ? onClose : (() => {
|
|
6318
|
+
}),
|
|
6319
|
+
position: "bottom",
|
|
6320
|
+
height: "full",
|
|
6321
|
+
contentClassName: "w-full max-w-[620px] mx-auto",
|
|
6322
|
+
children: content
|
|
6323
|
+
}
|
|
6324
|
+
) });
|
|
6293
6325
|
};
|
|
6294
6326
|
function useIsMobile(breakpoint = 640) {
|
|
6295
6327
|
const [isMobile, setIsMobile] = useState(
|
|
@@ -8254,6 +8286,7 @@ var EarnInvestmentDetailsView = (props) => {
|
|
|
8254
8286
|
var EarnTokenSelectorView = ({
|
|
8255
8287
|
selectedToken,
|
|
8256
8288
|
onTokenClick,
|
|
8289
|
+
onNetworkAndAssetClick,
|
|
8257
8290
|
onNetworkClick,
|
|
8258
8291
|
isLoading,
|
|
8259
8292
|
selectTokenLabel,
|
|
@@ -8268,7 +8301,7 @@ var EarnTokenSelectorView = ({
|
|
|
8268
8301
|
"button",
|
|
8269
8302
|
{
|
|
8270
8303
|
type: "button",
|
|
8271
|
-
onClick: onTokenClick,
|
|
8304
|
+
onClick: onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick,
|
|
8272
8305
|
className: "flex-1 h-[56px] border border-[var(--deframe-widget-color-border-primary)] rounded overflow-hidden hover:border-[var(--deframe-widget-color-border-primary)] transition-colors",
|
|
8273
8306
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center justify-between px-[var(--deframe-widget-size-padding-x-sm)] py-[6px]", children: [
|
|
8274
8307
|
/* @__PURE__ */ jsx("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: (selectedToken == null ? void 0 : selectedToken.logoURI) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -8286,7 +8319,7 @@ var EarnTokenSelectorView = ({
|
|
|
8286
8319
|
] })
|
|
8287
8320
|
}
|
|
8288
8321
|
) }),
|
|
8289
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
|
|
8322
|
+
!onNetworkAndAssetClick && /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
|
|
8290
8323
|
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: chainDirectionLabel }),
|
|
8291
8324
|
/* @__PURE__ */ jsxs(
|
|
8292
8325
|
"button",
|
|
@@ -8349,6 +8382,7 @@ var EarnPercentageButtonsView = ({
|
|
|
8349
8382
|
var EarnWithdrawTokenSelectorView = ({
|
|
8350
8383
|
selectedToken,
|
|
8351
8384
|
onTokenClick,
|
|
8385
|
+
onNetworkAndAssetClick,
|
|
8352
8386
|
onNetworkClick,
|
|
8353
8387
|
selectTokenLabel,
|
|
8354
8388
|
chainLabel,
|
|
@@ -8362,7 +8396,7 @@ var EarnWithdrawTokenSelectorView = ({
|
|
|
8362
8396
|
"button",
|
|
8363
8397
|
{
|
|
8364
8398
|
type: "button",
|
|
8365
|
-
onClick: onTokenClick,
|
|
8399
|
+
onClick: onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick,
|
|
8366
8400
|
className: "flex-1 h-[56px] border border-[var(--deframe-widget-color-border-primary)] rounded overflow-hidden hover:border-[var(--deframe-widget-color-border-primary)] transition-colors",
|
|
8367
8401
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center justify-between px-[var(--deframe-widget-size-padding-x-sm)] py-[6px]", children: [
|
|
8368
8402
|
/* @__PURE__ */ jsx("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: (selectedToken == null ? void 0 : selectedToken.symbol) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -8380,7 +8414,7 @@ var EarnWithdrawTokenSelectorView = ({
|
|
|
8380
8414
|
] })
|
|
8381
8415
|
}
|
|
8382
8416
|
) }),
|
|
8383
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
|
|
8417
|
+
!onNetworkAndAssetClick && /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
|
|
8384
8418
|
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: chainDirectionLabel }),
|
|
8385
8419
|
/* @__PURE__ */ jsxs(
|
|
8386
8420
|
"button",
|
|
@@ -8503,6 +8537,7 @@ var EarnDepositFormView = ({
|
|
|
8503
8537
|
// Token selector
|
|
8504
8538
|
selectedToken,
|
|
8505
8539
|
onTokenClick,
|
|
8540
|
+
onNetworkAndAssetClick,
|
|
8506
8541
|
isLoadingToken,
|
|
8507
8542
|
selectTokenLabel,
|
|
8508
8543
|
// Chain selector
|
|
@@ -8560,6 +8595,7 @@ var EarnDepositFormView = ({
|
|
|
8560
8595
|
{
|
|
8561
8596
|
selectedToken,
|
|
8562
8597
|
onTokenClick,
|
|
8598
|
+
onNetworkAndAssetClick,
|
|
8563
8599
|
isLoading: isLoadingToken,
|
|
8564
8600
|
selectTokenLabel,
|
|
8565
8601
|
chainLabel,
|
|
@@ -8634,14 +8670,14 @@ var EarnDepositFormView = ({
|
|
|
8634
8670
|
] });
|
|
8635
8671
|
var EarnTokenSelectorSimpleView = ({
|
|
8636
8672
|
selectedToken,
|
|
8637
|
-
|
|
8673
|
+
onNetworkAndAssetClick,
|
|
8638
8674
|
isLoading,
|
|
8639
8675
|
selectTokenLabel,
|
|
8640
8676
|
chainLabel,
|
|
8641
8677
|
chainImage
|
|
8642
8678
|
}) => {
|
|
8643
8679
|
const hasToken = selectedToken != null;
|
|
8644
|
-
const isInteractive = !!
|
|
8680
|
+
const isInteractive = !!onNetworkAndAssetClick;
|
|
8645
8681
|
const baseClasses = [
|
|
8646
8682
|
"inline-flex items-center gap-[10px]",
|
|
8647
8683
|
"h-[54px] px-[10px]",
|
|
@@ -8665,7 +8701,7 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
8665
8701
|
type: "button",
|
|
8666
8702
|
"data-slot": "token-selector-simple",
|
|
8667
8703
|
"data-test-id": "earn-token-selector-simple-view",
|
|
8668
|
-
onClick:
|
|
8704
|
+
onClick: onNetworkAndAssetClick,
|
|
8669
8705
|
disabled: !isInteractive,
|
|
8670
8706
|
"aria-label": hasToken ? `Select token \u2014 currently ${selectedToken.symbol} on ${chainLabel}` : selectTokenLabel,
|
|
8671
8707
|
className: selectorClasses,
|
|
@@ -8991,6 +9027,7 @@ var EarnDepositFormViewSimple = ({
|
|
|
8991
9027
|
// Token selector
|
|
8992
9028
|
selectedToken,
|
|
8993
9029
|
onTokenClick,
|
|
9030
|
+
onNetworkAndAssetClick,
|
|
8994
9031
|
isLoadingToken,
|
|
8995
9032
|
selectTokenLabel,
|
|
8996
9033
|
// Chain selector
|
|
@@ -9133,6 +9170,7 @@ var EarnDepositFormViewSimple = ({
|
|
|
9133
9170
|
{
|
|
9134
9171
|
selectedToken,
|
|
9135
9172
|
onTokenClick,
|
|
9173
|
+
onNetworkAndAssetClick,
|
|
9136
9174
|
isLoading: isLoadingToken,
|
|
9137
9175
|
selectTokenLabel,
|
|
9138
9176
|
chainLabel,
|
|
@@ -9315,6 +9353,7 @@ var EarnWithdrawFormView = ({
|
|
|
9315
9353
|
// Token selector
|
|
9316
9354
|
selectedToken,
|
|
9317
9355
|
onTokenClick,
|
|
9356
|
+
onNetworkAndAssetClick,
|
|
9318
9357
|
selectTokenLabel,
|
|
9319
9358
|
// Chain selector
|
|
9320
9359
|
chainLabel,
|
|
@@ -9375,6 +9414,7 @@ var EarnWithdrawFormView = ({
|
|
|
9375
9414
|
{
|
|
9376
9415
|
selectedToken,
|
|
9377
9416
|
onTokenClick,
|
|
9417
|
+
onNetworkAndAssetClick,
|
|
9378
9418
|
selectTokenLabel,
|
|
9379
9419
|
chainLabel,
|
|
9380
9420
|
chainImage,
|
|
@@ -9452,6 +9492,7 @@ var EarnWithdrawFormViewSimple = ({
|
|
|
9452
9492
|
// Token selector
|
|
9453
9493
|
selectedToken,
|
|
9454
9494
|
onTokenClick,
|
|
9495
|
+
onNetworkAndAssetClick,
|
|
9455
9496
|
selectTokenLabel,
|
|
9456
9497
|
// Chain selector
|
|
9457
9498
|
chainLabel,
|
|
@@ -9587,6 +9628,7 @@ var EarnWithdrawFormViewSimple = ({
|
|
|
9587
9628
|
{
|
|
9588
9629
|
selectedToken,
|
|
9589
9630
|
onTokenClick,
|
|
9631
|
+
onNetworkAndAssetClick,
|
|
9590
9632
|
isLoading: false,
|
|
9591
9633
|
selectTokenLabel,
|
|
9592
9634
|
chainLabel,
|
|
@@ -10828,6 +10870,1995 @@ var EarnWithdrawFailedSimpleView = ({
|
|
|
10828
10870
|
}
|
|
10829
10871
|
) });
|
|
10830
10872
|
};
|
|
10873
|
+
function OnchainDepositFormView({
|
|
10874
|
+
selectedToken,
|
|
10875
|
+
onTokenClick,
|
|
10876
|
+
chainCount,
|
|
10877
|
+
selectedChain,
|
|
10878
|
+
onNetworkClick,
|
|
10879
|
+
isGenerating,
|
|
10880
|
+
showContent,
|
|
10881
|
+
depositAddress,
|
|
10882
|
+
showInfoBanner,
|
|
10883
|
+
selectedTokenName,
|
|
10884
|
+
selectedChainName,
|
|
10885
|
+
isSubmitDisabled,
|
|
10886
|
+
onSubmit,
|
|
10887
|
+
submitLabel,
|
|
10888
|
+
onBack,
|
|
10889
|
+
labels,
|
|
10890
|
+
className
|
|
10891
|
+
}) {
|
|
10892
|
+
const hasAllData = !!(selectedToken && selectedChain);
|
|
10893
|
+
return /* @__PURE__ */ jsx(
|
|
10894
|
+
"div",
|
|
10895
|
+
{
|
|
10896
|
+
className: twMerge(
|
|
10897
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] text-[var(--deframe-widget-color-text-primary)] overflow-hidden mx-auto mt-[75px] rounded p-12",
|
|
10898
|
+
className
|
|
10899
|
+
),
|
|
10900
|
+
"data-test-id": "onchain-deposit-form-view",
|
|
10901
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full px-2 py-0.5 rounded gap-1", children: [
|
|
10902
|
+
/* @__PURE__ */ jsx(
|
|
10903
|
+
SecondaryButton,
|
|
10904
|
+
{
|
|
10905
|
+
onClick: onBack,
|
|
10906
|
+
className: "mb-4 !border-0 max-w-[84px]",
|
|
10907
|
+
"aria-label": labels.backLabel,
|
|
10908
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10909
|
+
/* @__PURE__ */ jsx(MdOutlineArrowBack, { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary)]" }),
|
|
10910
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: labels.backLabel })
|
|
10911
|
+
] })
|
|
10912
|
+
}
|
|
10913
|
+
),
|
|
10914
|
+
/* @__PURE__ */ jsx(TextHeading, { variant: "h2", children: labels.title }),
|
|
10915
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: labels.subtitle }),
|
|
10916
|
+
/* @__PURE__ */ jsxs(
|
|
10917
|
+
"div",
|
|
10918
|
+
{
|
|
10919
|
+
className: "my-4 p-8 w-full bg-[var(--deframe-widget-color-bg-secondary)] rounded lg:!bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
10920
|
+
"data-test-id": "onchain-deposit-token-card",
|
|
10921
|
+
children: [
|
|
10922
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(
|
|
10923
|
+
"button",
|
|
10924
|
+
{
|
|
10925
|
+
onClick: onTokenClick,
|
|
10926
|
+
className: "flex justify-between items-center border border-[var(--deframe-widget-color-border-secondary)] rounded p-4 w-full cursor-pointer",
|
|
10927
|
+
"data-test-id": "onchain-deposit-token-button",
|
|
10928
|
+
"aria-label": labels.tokenPlaceholder,
|
|
10929
|
+
children: [
|
|
10930
|
+
selectedToken ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10931
|
+
/* @__PURE__ */ jsx(
|
|
10932
|
+
"img",
|
|
10933
|
+
{
|
|
10934
|
+
src: selectedToken.logoURI || "",
|
|
10935
|
+
alt: selectedToken.symbol,
|
|
10936
|
+
className: "w-6 h-6 rounded-full object-cover"
|
|
10937
|
+
}
|
|
10938
|
+
),
|
|
10939
|
+
/* @__PURE__ */ jsxs("div", { className: "text-left", children: [
|
|
10940
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: selectedToken.symbol }),
|
|
10941
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedToken.name })
|
|
10942
|
+
] })
|
|
10943
|
+
] }) : /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.tokenPlaceholder }),
|
|
10944
|
+
/* @__PURE__ */ jsx(MdOutlineArrowDropDown, {})
|
|
10945
|
+
]
|
|
10946
|
+
}
|
|
10947
|
+
) }),
|
|
10948
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center mt-6", children: [
|
|
10949
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: labels.chainDirectionLabel }),
|
|
10950
|
+
/* @__PURE__ */ jsx("div", { className: "relative ml-4 flex-1", children: chainCount === 0 ? /* @__PURE__ */ jsxs(
|
|
10951
|
+
"div",
|
|
10952
|
+
{
|
|
10953
|
+
className: "flex items-center gap-1 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full px-2 py-0.5 text-[length:var(--deframe-widget-font-size-sm)] opacity-50 cursor-not-allowed w-fit",
|
|
10954
|
+
"data-test-id": "onchain-deposit-chain-disabled",
|
|
10955
|
+
children: [
|
|
10956
|
+
/* @__PURE__ */ jsx(TextAccent, { variant: "accent-small", className: "whitespace-nowrap", children: labels.chainPlaceholder }),
|
|
10957
|
+
/* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "flex-shrink-0" })
|
|
10958
|
+
]
|
|
10959
|
+
}
|
|
10960
|
+
) : chainCount > 1 ? /* @__PURE__ */ jsxs(
|
|
10961
|
+
"button",
|
|
10962
|
+
{
|
|
10963
|
+
onClick: onNetworkClick,
|
|
10964
|
+
className: "flex items-center gap-1 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full px-2 py-0.5 text-[length:var(--deframe-widget-font-size-sm)] font-medium cursor-pointer transition w-fit",
|
|
10965
|
+
"data-test-id": "onchain-deposit-chain-dropdown",
|
|
10966
|
+
"aria-label": labels.chainPlaceholder,
|
|
10967
|
+
children: [
|
|
10968
|
+
selectedChain ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10969
|
+
/* @__PURE__ */ jsx(
|
|
10970
|
+
"img",
|
|
10971
|
+
{
|
|
10972
|
+
src: selectedChain.iconUrl,
|
|
10973
|
+
alt: selectedChain.name,
|
|
10974
|
+
className: "w-4 h-4 rounded-full object-cover"
|
|
10975
|
+
}
|
|
10976
|
+
),
|
|
10977
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "whitespace-nowrap", children: selectedChain.name })
|
|
10978
|
+
] }) : /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "whitespace-nowrap", children: labels.chainPlaceholder }),
|
|
10979
|
+
/* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "flex-shrink-0" })
|
|
10980
|
+
]
|
|
10981
|
+
}
|
|
10982
|
+
) : selectedChain ? /* @__PURE__ */ jsxs(
|
|
10983
|
+
"div",
|
|
10984
|
+
{
|
|
10985
|
+
className: "ml-4 flex items-center gap-2 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full px-4 py-1 text-[length:var(--deframe-widget-font-size-sm)] font-medium max-w-[150px]",
|
|
10986
|
+
"data-test-id": "onchain-deposit-chain-static",
|
|
10987
|
+
children: [
|
|
10988
|
+
/* @__PURE__ */ jsx(
|
|
10989
|
+
"img",
|
|
10990
|
+
{
|
|
10991
|
+
src: selectedChain.iconUrl,
|
|
10992
|
+
alt: selectedChain.name,
|
|
10993
|
+
className: "w-5 h-5 rounded-full object-cover"
|
|
10994
|
+
}
|
|
10995
|
+
),
|
|
10996
|
+
/* @__PURE__ */ jsx("span", { children: selectedChain.name })
|
|
10997
|
+
]
|
|
10998
|
+
}
|
|
10999
|
+
) : null })
|
|
11000
|
+
] })
|
|
11001
|
+
]
|
|
11002
|
+
}
|
|
11003
|
+
),
|
|
11004
|
+
showInfoBanner && /* @__PURE__ */ jsx(BannerNotification, { message: labels.infoBanner, variant: "info" }),
|
|
11005
|
+
hasAllData && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11006
|
+
isGenerating && /* @__PURE__ */ jsx(
|
|
11007
|
+
"div",
|
|
11008
|
+
{
|
|
11009
|
+
className: "my-4 p-8 w-full bg-[var(--deframe-widget-color-bg-secondary)] rounded",
|
|
11010
|
+
"data-test-id": "onchain-deposit-skeleton",
|
|
11011
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 animate-pulse", children: [
|
|
11012
|
+
/* @__PURE__ */ jsx(Skeleton, { width: "60%", height: "1.3rem", variant: "text" }),
|
|
11013
|
+
/* @__PURE__ */ jsx(Skeleton, { width: "70%", height: "1.3rem", variant: "text" }),
|
|
11014
|
+
/* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "2rem", variant: "text" }),
|
|
11015
|
+
/* @__PURE__ */ jsx(Skeleton, { width: "15rem", height: "15rem", variant: "rect", className: "rounded" })
|
|
11016
|
+
] })
|
|
11017
|
+
}
|
|
11018
|
+
),
|
|
11019
|
+
showContent && selectedChain && depositAddress && /* @__PURE__ */ jsxs(
|
|
11020
|
+
"div",
|
|
11021
|
+
{
|
|
11022
|
+
className: "mt-4 mb-4 p-8 w-full bg-[var(--deframe-widget-color-bg-secondary)] rounded lg:!bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
11023
|
+
"data-test-id": "onchain-deposit-address-card",
|
|
11024
|
+
children: [
|
|
11025
|
+
/* @__PURE__ */ jsxs("p", { className: "text-center mb-6", children: [
|
|
11026
|
+
labels.depositInstructionPrefix,
|
|
11027
|
+
" ",
|
|
11028
|
+
/* @__PURE__ */ jsx("strong", { children: selectedChainName }),
|
|
11029
|
+
".",
|
|
11030
|
+
" ",
|
|
11031
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
11032
|
+
labels.depositInstructionSuffix
|
|
11033
|
+
] }),
|
|
11034
|
+
/* @__PURE__ */ jsx(AddressDisplay, { address: depositAddress, className: "mb-4", onCopy: () => {
|
|
11035
|
+
} }),
|
|
11036
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(
|
|
11037
|
+
QRCode,
|
|
11038
|
+
{
|
|
11039
|
+
size: 174,
|
|
11040
|
+
value: depositAddress,
|
|
11041
|
+
className: "border-12 border-[var(--deframe-widget-color-bg-tertiary)] rounded"
|
|
11042
|
+
}
|
|
11043
|
+
) })
|
|
11044
|
+
]
|
|
11045
|
+
}
|
|
11046
|
+
)
|
|
11047
|
+
] }),
|
|
11048
|
+
!hasAllData && /* @__PURE__ */ jsx("div", { className: "my-4 p-8 w-full", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-4 mb-4 min-h-[320px]" }) }),
|
|
11049
|
+
hasAllData && selectedTokenName && selectedChainName && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: labels.warnBannerTokenChain, variant: "warning" }) }),
|
|
11050
|
+
/* @__PURE__ */ jsx(
|
|
11051
|
+
PrimaryButton,
|
|
11052
|
+
{
|
|
11053
|
+
disabled: isSubmitDisabled,
|
|
11054
|
+
onClick: onSubmit,
|
|
11055
|
+
"data-test-id": "onchain-deposit-submit",
|
|
11056
|
+
children: submitLabel
|
|
11057
|
+
}
|
|
11058
|
+
)
|
|
11059
|
+
] })
|
|
11060
|
+
}
|
|
11061
|
+
);
|
|
11062
|
+
}
|
|
11063
|
+
var OnchainDepositFormSimpleView = ({
|
|
11064
|
+
// Token selector
|
|
11065
|
+
selectedToken,
|
|
11066
|
+
onTokenClick,
|
|
11067
|
+
selectedChain,
|
|
11068
|
+
// Address
|
|
11069
|
+
depositAddress,
|
|
11070
|
+
onAddressCopy,
|
|
11071
|
+
// Navigation
|
|
11072
|
+
onBack,
|
|
11073
|
+
onClose,
|
|
11074
|
+
// Labels
|
|
11075
|
+
labels,
|
|
11076
|
+
// Tab switcher
|
|
11077
|
+
activeTab,
|
|
11078
|
+
cryptoHref,
|
|
11079
|
+
pixHref
|
|
11080
|
+
}) => {
|
|
11081
|
+
var _a;
|
|
11082
|
+
const hasToken = selectedToken != null;
|
|
11083
|
+
const showAddressSection = hasToken && !!depositAddress;
|
|
11084
|
+
const panelBaseClasses = [
|
|
11085
|
+
"relative flex flex-col overflow-hidden w-[420px]",
|
|
11086
|
+
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
11087
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11088
|
+
"font-[var(--deframe-widget-font-family)]"
|
|
11089
|
+
].join(" ");
|
|
11090
|
+
const headerBaseClasses = [
|
|
11091
|
+
"flex items-center",
|
|
11092
|
+
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
11093
|
+
"py-[var(--deframe-widget-size-padding-y-md)]"
|
|
11094
|
+
].join(" ");
|
|
11095
|
+
const titleBaseClasses = [
|
|
11096
|
+
"flex-1",
|
|
11097
|
+
"text-[15px]",
|
|
11098
|
+
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
11099
|
+
"text-[color:var(--deframe-widget-color-text-primary)]"
|
|
11100
|
+
].join(" ");
|
|
11101
|
+
const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
|
|
11102
|
+
const bodyBaseClasses = [
|
|
11103
|
+
"flex flex-col",
|
|
11104
|
+
"gap-[var(--deframe-widget-size-gap-md)]",
|
|
11105
|
+
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
11106
|
+
"py-[var(--deframe-widget-size-padding-y-md)]"
|
|
11107
|
+
].join(" ");
|
|
11108
|
+
return /* @__PURE__ */ jsxs(
|
|
11109
|
+
"div",
|
|
11110
|
+
{
|
|
11111
|
+
"data-slot": "onchain-deposit-simple-panel",
|
|
11112
|
+
"data-test-id": "onchain-deposit-form-simple-view",
|
|
11113
|
+
className: panelBaseClasses,
|
|
11114
|
+
children: [
|
|
11115
|
+
/* @__PURE__ */ jsxs(
|
|
11116
|
+
"header",
|
|
11117
|
+
{
|
|
11118
|
+
"data-slot": "onchain-deposit-simple-header",
|
|
11119
|
+
"data-test-id": "onchain-deposit-form-simple-view-header",
|
|
11120
|
+
className: headerBaseClasses,
|
|
11121
|
+
children: [
|
|
11122
|
+
/* @__PURE__ */ jsx(
|
|
11123
|
+
"span",
|
|
11124
|
+
{
|
|
11125
|
+
"data-slot": "onchain-deposit-simple-title",
|
|
11126
|
+
"data-test-id": "onchain-deposit-form-simple-view-title",
|
|
11127
|
+
className: titleBaseClasses,
|
|
11128
|
+
children: labels.title
|
|
11129
|
+
}
|
|
11130
|
+
),
|
|
11131
|
+
onClose && /* @__PURE__ */ jsx(
|
|
11132
|
+
CloseButton_default,
|
|
11133
|
+
{
|
|
11134
|
+
onClick: onClose,
|
|
11135
|
+
ariaLabel: "Close deposit panel",
|
|
11136
|
+
testId: "onchain-deposit-form-simple-view-close"
|
|
11137
|
+
}
|
|
11138
|
+
)
|
|
11139
|
+
]
|
|
11140
|
+
}
|
|
11141
|
+
),
|
|
11142
|
+
/* @__PURE__ */ jsx(
|
|
11143
|
+
"div",
|
|
11144
|
+
{
|
|
11145
|
+
"data-slot": "onchain-deposit-simple-divider",
|
|
11146
|
+
"data-test-id": "onchain-deposit-form-simple-view-divider",
|
|
11147
|
+
className: dividerClasses
|
|
11148
|
+
}
|
|
11149
|
+
),
|
|
11150
|
+
/* @__PURE__ */ jsx(
|
|
11151
|
+
"nav",
|
|
11152
|
+
{
|
|
11153
|
+
"data-slot": "onchain-deposit-simple-tabs",
|
|
11154
|
+
"data-test-id": "onchain-deposit-form-simple-view-tabs",
|
|
11155
|
+
className: "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
|
|
11156
|
+
children: /* @__PURE__ */ jsxs(
|
|
11157
|
+
"div",
|
|
11158
|
+
{
|
|
11159
|
+
role: "tablist",
|
|
11160
|
+
"data-test-id": "onchain-deposit-form-simple-view-tablist",
|
|
11161
|
+
className: twMerge(
|
|
11162
|
+
"inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
|
|
11163
|
+
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
11164
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11165
|
+
"p-[3px] gap-[2px]"
|
|
11166
|
+
),
|
|
11167
|
+
children: [
|
|
11168
|
+
/* @__PURE__ */ jsx(
|
|
11169
|
+
"a",
|
|
11170
|
+
{
|
|
11171
|
+
href: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
|
|
11172
|
+
role: "tab",
|
|
11173
|
+
"aria-selected": activeTab === "crypto",
|
|
11174
|
+
"aria-current": activeTab === "crypto" ? "page" : void 0,
|
|
11175
|
+
"aria-label": "Cripto",
|
|
11176
|
+
"data-test-id": "onchain-deposit-form-simple-view-tab-crypto",
|
|
11177
|
+
className: twMerge(
|
|
11178
|
+
"inline-flex flex-1 items-center justify-center",
|
|
11179
|
+
"gap-[var(--deframe-widget-size-gap-xs)]",
|
|
11180
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11181
|
+
"border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
|
|
11182
|
+
"outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
|
|
11183
|
+
"font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
11184
|
+
"py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
|
|
11185
|
+
"[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
|
|
11186
|
+
activeTab === "crypto" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
|
|
11187
|
+
),
|
|
11188
|
+
children: "Cripto"
|
|
11189
|
+
}
|
|
11190
|
+
),
|
|
11191
|
+
/* @__PURE__ */ jsx(
|
|
11192
|
+
"a",
|
|
11193
|
+
{
|
|
11194
|
+
href: pixHref != null ? pixHref : "/dashboard/deposit/onramp",
|
|
11195
|
+
role: "tab",
|
|
11196
|
+
"aria-selected": activeTab === "pix",
|
|
11197
|
+
"aria-current": activeTab === "pix" ? "page" : void 0,
|
|
11198
|
+
"aria-label": "PIX",
|
|
11199
|
+
"data-test-id": "onchain-deposit-form-simple-view-tab-pix",
|
|
11200
|
+
className: twMerge(
|
|
11201
|
+
"inline-flex flex-1 items-center justify-center",
|
|
11202
|
+
"gap-[var(--deframe-widget-size-gap-xs)]",
|
|
11203
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11204
|
+
"border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
|
|
11205
|
+
"outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
|
|
11206
|
+
"font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
11207
|
+
"py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
|
|
11208
|
+
"[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
|
|
11209
|
+
activeTab === "pix" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
|
|
11210
|
+
),
|
|
11211
|
+
children: "PIX"
|
|
11212
|
+
}
|
|
11213
|
+
)
|
|
11214
|
+
]
|
|
11215
|
+
}
|
|
11216
|
+
)
|
|
11217
|
+
}
|
|
11218
|
+
),
|
|
11219
|
+
/* @__PURE__ */ jsx(
|
|
11220
|
+
"div",
|
|
11221
|
+
{
|
|
11222
|
+
"data-slot": "onchain-deposit-simple-divider-tabs",
|
|
11223
|
+
"data-test-id": "onchain-deposit-form-simple-view-divider-tabs",
|
|
11224
|
+
className: dividerClasses
|
|
11225
|
+
}
|
|
11226
|
+
),
|
|
11227
|
+
/* @__PURE__ */ jsxs(
|
|
11228
|
+
"div",
|
|
11229
|
+
{
|
|
11230
|
+
"data-slot": "onchain-deposit-simple-body",
|
|
11231
|
+
"data-test-id": "onchain-deposit-form-simple-view-body",
|
|
11232
|
+
className: bodyBaseClasses,
|
|
11233
|
+
children: [
|
|
11234
|
+
/* @__PURE__ */ jsxs(
|
|
11235
|
+
"div",
|
|
11236
|
+
{
|
|
11237
|
+
"data-slot": "onchain-deposit-simple-token-card",
|
|
11238
|
+
"data-test-id": "onchain-deposit-form-simple-view-token-card",
|
|
11239
|
+
className: twMerge(
|
|
11240
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11241
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11242
|
+
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
11243
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
|
|
11244
|
+
),
|
|
11245
|
+
children: [
|
|
11246
|
+
/* @__PURE__ */ jsx(
|
|
11247
|
+
EarnTokenSelectorSimpleView,
|
|
11248
|
+
{
|
|
11249
|
+
selectedToken,
|
|
11250
|
+
onTokenClick,
|
|
11251
|
+
onNetworkAndAssetClick: onTokenClick,
|
|
11252
|
+
isLoading: false,
|
|
11253
|
+
selectTokenLabel: "SELECIONE AQUI",
|
|
11254
|
+
chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
|
|
11255
|
+
chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
|
|
11256
|
+
}
|
|
11257
|
+
),
|
|
11258
|
+
!hasToken && /* @__PURE__ */ jsx(
|
|
11259
|
+
"p",
|
|
11260
|
+
{
|
|
11261
|
+
"data-slot": "onchain-deposit-simple-empty-hint",
|
|
11262
|
+
"data-test-id": "onchain-deposit-form-simple-view-empty-hint",
|
|
11263
|
+
className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
11264
|
+
children: labels.tokenPlaceholder
|
|
11265
|
+
}
|
|
11266
|
+
)
|
|
11267
|
+
]
|
|
11268
|
+
}
|
|
11269
|
+
),
|
|
11270
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: showAddressSection && /* @__PURE__ */ jsxs(
|
|
11271
|
+
motion.div,
|
|
11272
|
+
{
|
|
11273
|
+
"data-slot": "onchain-deposit-simple-address-section",
|
|
11274
|
+
"data-test-id": "onchain-deposit-form-simple-view-address-section",
|
|
11275
|
+
initial: { opacity: 0, height: 0 },
|
|
11276
|
+
animate: { opacity: 1, height: "auto" },
|
|
11277
|
+
exit: { opacity: 0, height: 0 },
|
|
11278
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
11279
|
+
style: { overflow: "hidden" },
|
|
11280
|
+
className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
|
|
11281
|
+
children: [
|
|
11282
|
+
/* @__PURE__ */ jsxs(
|
|
11283
|
+
"div",
|
|
11284
|
+
{
|
|
11285
|
+
"data-slot": "onchain-deposit-simple-address-card",
|
|
11286
|
+
"data-test-id": "onchain-deposit-form-simple-view-address-card",
|
|
11287
|
+
className: twMerge(
|
|
11288
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11289
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11290
|
+
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
11291
|
+
"px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)]"
|
|
11292
|
+
),
|
|
11293
|
+
children: [
|
|
11294
|
+
/* @__PURE__ */ jsx(
|
|
11295
|
+
"p",
|
|
11296
|
+
{
|
|
11297
|
+
"data-test-id": "onchain-deposit-form-simple-view-address-label",
|
|
11298
|
+
className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
11299
|
+
children: "Endere\xE7o de dep\xF3sito"
|
|
11300
|
+
}
|
|
11301
|
+
),
|
|
11302
|
+
/* @__PURE__ */ jsx(
|
|
11303
|
+
AddressDisplay,
|
|
11304
|
+
{
|
|
11305
|
+
address: depositAddress,
|
|
11306
|
+
onCopy: onAddressCopy
|
|
11307
|
+
}
|
|
11308
|
+
)
|
|
11309
|
+
]
|
|
11310
|
+
}
|
|
11311
|
+
),
|
|
11312
|
+
/* @__PURE__ */ jsx(
|
|
11313
|
+
EarnInlineNotificationSimpleView,
|
|
11314
|
+
{
|
|
11315
|
+
variant: "warning",
|
|
11316
|
+
message: labels.warnBannerTokenChain
|
|
11317
|
+
}
|
|
11318
|
+
)
|
|
11319
|
+
]
|
|
11320
|
+
}
|
|
11321
|
+
) })
|
|
11322
|
+
]
|
|
11323
|
+
}
|
|
11324
|
+
),
|
|
11325
|
+
/* @__PURE__ */ jsx(
|
|
11326
|
+
"footer",
|
|
11327
|
+
{
|
|
11328
|
+
"data-slot": "onchain-deposit-simple-footer",
|
|
11329
|
+
"data-test-id": "onchain-deposit-form-simple-view-footer",
|
|
11330
|
+
className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-md)]",
|
|
11331
|
+
children: /* @__PURE__ */ jsx(
|
|
11332
|
+
SecondaryButton,
|
|
11333
|
+
{
|
|
11334
|
+
type: "button",
|
|
11335
|
+
className: [
|
|
11336
|
+
"w-full h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11337
|
+
"text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
11338
|
+
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11339
|
+
"outline-none",
|
|
11340
|
+
"transition-[background,color,border-color] duration-150",
|
|
11341
|
+
"hover:opacity-100",
|
|
11342
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
|
|
11343
|
+
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
11344
|
+
].join(" "),
|
|
11345
|
+
onClick: onBack,
|
|
11346
|
+
"aria-label": labels.backLabel,
|
|
11347
|
+
"data-test-id": "onchain-deposit-form-simple-view-cancel",
|
|
11348
|
+
children: labels.backLabel
|
|
11349
|
+
}
|
|
11350
|
+
)
|
|
11351
|
+
}
|
|
11352
|
+
)
|
|
11353
|
+
]
|
|
11354
|
+
}
|
|
11355
|
+
);
|
|
11356
|
+
};
|
|
11357
|
+
|
|
11358
|
+
// src/utils/truncate-address.ts
|
|
11359
|
+
function truncateAddress(address, startChars = 6, endChars = 4) {
|
|
11360
|
+
if (!address) return "";
|
|
11361
|
+
if (address.length <= startChars + endChars) return address;
|
|
11362
|
+
return `${address.slice(0, startChars)}...${address.slice(-endChars)}`;
|
|
11363
|
+
}
|
|
11364
|
+
function DepositSuccessIcon() {
|
|
11365
|
+
return /* @__PURE__ */ jsx(
|
|
11366
|
+
"div",
|
|
11367
|
+
{
|
|
11368
|
+
className: "w-20 h-20 bg-[var(--deframe-widget-color-state-success)] rounded-full flex items-center justify-center",
|
|
11369
|
+
"data-test-id": "deposit-success-icon",
|
|
11370
|
+
children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
|
|
11371
|
+
"path",
|
|
11372
|
+
{
|
|
11373
|
+
d: "M10 5V15M10 15L6 11M10 15L14 11",
|
|
11374
|
+
stroke: "#121212",
|
|
11375
|
+
strokeWidth: "2",
|
|
11376
|
+
strokeLinecap: "round",
|
|
11377
|
+
strokeLinejoin: "round"
|
|
11378
|
+
}
|
|
11379
|
+
) })
|
|
11380
|
+
}
|
|
11381
|
+
);
|
|
11382
|
+
}
|
|
11383
|
+
function OnchainDepositSuccessView({
|
|
11384
|
+
tokenSymbol,
|
|
11385
|
+
chainName,
|
|
11386
|
+
formattedAmount,
|
|
11387
|
+
depositAddress,
|
|
11388
|
+
txHash,
|
|
11389
|
+
blockExplorerUrl,
|
|
11390
|
+
onViewHistory,
|
|
11391
|
+
onClose,
|
|
11392
|
+
labels,
|
|
11393
|
+
className,
|
|
11394
|
+
icon
|
|
11395
|
+
}) {
|
|
11396
|
+
const [showDetails, setShowDetails] = useState(true);
|
|
11397
|
+
const [copied, setCopied] = useState(false);
|
|
11398
|
+
const handleCopyAddress = async () => {
|
|
11399
|
+
try {
|
|
11400
|
+
await navigator.clipboard.writeText(depositAddress);
|
|
11401
|
+
setCopied(true);
|
|
11402
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
11403
|
+
} catch (e) {
|
|
11404
|
+
}
|
|
11405
|
+
};
|
|
11406
|
+
return /* @__PURE__ */ jsxs(
|
|
11407
|
+
"div",
|
|
11408
|
+
{
|
|
11409
|
+
className: twMerge(
|
|
11410
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded",
|
|
11411
|
+
className
|
|
11412
|
+
),
|
|
11413
|
+
"data-test-id": "onchain-deposit-success-view",
|
|
11414
|
+
children: [
|
|
11415
|
+
onClose && /* @__PURE__ */ jsx(
|
|
11416
|
+
"button",
|
|
11417
|
+
{
|
|
11418
|
+
onClick: onClose,
|
|
11419
|
+
className: "absolute top-4 right-4 flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
|
|
11420
|
+
"aria-label": labels.closeAriaLabel,
|
|
11421
|
+
"data-test-id": "onchain-deposit-success-close",
|
|
11422
|
+
children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
|
|
11423
|
+
}
|
|
11424
|
+
),
|
|
11425
|
+
/* @__PURE__ */ jsx("div", { className: "p-6 lg:!p-12", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full items-center", children: [
|
|
11426
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
11427
|
+
icon != null ? icon : /* @__PURE__ */ jsx(DepositSuccessIcon, {}),
|
|
11428
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] leading-tight mb-2", children: labels.title }),
|
|
11429
|
+
/* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center mt-[-8px]", children: labels.subtitle })
|
|
11430
|
+
] }),
|
|
11431
|
+
/* @__PURE__ */ jsxs(
|
|
11432
|
+
"div",
|
|
11433
|
+
{
|
|
11434
|
+
className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
11435
|
+
"data-test-id": "onchain-deposit-success-info",
|
|
11436
|
+
children: [
|
|
11437
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
11438
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.assetLabel }),
|
|
11439
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold", children: tokenSymbol })
|
|
11440
|
+
] }),
|
|
11441
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
11442
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.networkLabel }),
|
|
11443
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold", children: chainName })
|
|
11444
|
+
] }),
|
|
11445
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
11446
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.amountLabel }),
|
|
11447
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12px] font-semibold", children: [
|
|
11448
|
+
formattedAmount,
|
|
11449
|
+
" ",
|
|
11450
|
+
tokenSymbol
|
|
11451
|
+
] })
|
|
11452
|
+
] }),
|
|
11453
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
11454
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.addressLabel }),
|
|
11455
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11456
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold", children: truncateAddress(depositAddress) }),
|
|
11457
|
+
/* @__PURE__ */ jsx(
|
|
11458
|
+
"button",
|
|
11459
|
+
{
|
|
11460
|
+
onClick: handleCopyAddress,
|
|
11461
|
+
className: "text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
|
|
11462
|
+
"aria-label": labels.addressLabel,
|
|
11463
|
+
"data-test-id": "onchain-deposit-success-copy",
|
|
11464
|
+
children: /* @__PURE__ */ jsx(MdContentCopy, { className: "w-4 h-4" })
|
|
11465
|
+
}
|
|
11466
|
+
),
|
|
11467
|
+
copied && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-[color:var(--deframe-widget-color-state-success)]", children: labels.copiedLabel })
|
|
11468
|
+
] })
|
|
11469
|
+
] }),
|
|
11470
|
+
txHash && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
11471
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txIdLabel }),
|
|
11472
|
+
/* @__PURE__ */ jsx(
|
|
11473
|
+
"a",
|
|
11474
|
+
{
|
|
11475
|
+
href: `${blockExplorerUrl}/tx/${txHash}`,
|
|
11476
|
+
target: "_blank",
|
|
11477
|
+
rel: "noopener noreferrer",
|
|
11478
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-state-success)] hover:underline font-semibold",
|
|
11479
|
+
"data-test-id": "onchain-deposit-success-explorer",
|
|
11480
|
+
children: labels.viewExplorerLabel
|
|
11481
|
+
}
|
|
11482
|
+
)
|
|
11483
|
+
] })
|
|
11484
|
+
]
|
|
11485
|
+
}
|
|
11486
|
+
),
|
|
11487
|
+
/* @__PURE__ */ jsxs(
|
|
11488
|
+
"div",
|
|
11489
|
+
{
|
|
11490
|
+
className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
11491
|
+
"data-test-id": "onchain-deposit-success-details",
|
|
11492
|
+
children: [
|
|
11493
|
+
/* @__PURE__ */ jsxs(
|
|
11494
|
+
"button",
|
|
11495
|
+
{
|
|
11496
|
+
onClick: () => setShowDetails(!showDetails),
|
|
11497
|
+
className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
|
|
11498
|
+
"aria-label": labels.detailsTitle,
|
|
11499
|
+
"data-test-id": "onchain-deposit-success-details-toggle",
|
|
11500
|
+
children: [
|
|
11501
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold", children: labels.detailsTitle }),
|
|
11502
|
+
/* @__PURE__ */ jsx(
|
|
11503
|
+
MdOutlineExpandMore,
|
|
11504
|
+
{
|
|
11505
|
+
className: twMerge(
|
|
11506
|
+
"transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
11507
|
+
showDetails && "rotate-180"
|
|
11508
|
+
)
|
|
11509
|
+
}
|
|
11510
|
+
)
|
|
11511
|
+
]
|
|
11512
|
+
}
|
|
11513
|
+
),
|
|
11514
|
+
showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
|
|
11515
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
|
|
11516
|
+
/* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)] font-medium", children: labels.estimatedTimeLabel }),
|
|
11517
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.estimatedTimeValue })
|
|
11518
|
+
] }),
|
|
11519
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-col", children: labels.steps.map((step, index) => {
|
|
11520
|
+
var _a, _b;
|
|
11521
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
11522
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
11523
|
+
/* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoCheckmarkOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-success)]" }) }),
|
|
11524
|
+
index < labels.steps.length - 1 && /* @__PURE__ */ jsx("div", { className: "w-[2px] h-6 bg-[var(--deframe-widget-color-state-success)]" })
|
|
11525
|
+
] }),
|
|
11526
|
+
/* @__PURE__ */ jsxs("div", { className: twMerge("flex flex-col", index < labels.steps.length - 1 && "pb-2"), children: [
|
|
11527
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: step.label }),
|
|
11528
|
+
/* @__PURE__ */ jsx(
|
|
11529
|
+
"span",
|
|
11530
|
+
{
|
|
11531
|
+
className: twMerge(
|
|
11532
|
+
"text-[12px] font-semibold",
|
|
11533
|
+
step.statusText && "text-[color:var(--deframe-widget-color-state-success)]"
|
|
11534
|
+
),
|
|
11535
|
+
children: (_b = step.statusText) != null ? _b : (_a = labels.steps[index]) == null ? void 0 : _a.label
|
|
11536
|
+
}
|
|
11537
|
+
)
|
|
11538
|
+
] })
|
|
11539
|
+
] }, step.label);
|
|
11540
|
+
}) })
|
|
11541
|
+
] })
|
|
11542
|
+
]
|
|
11543
|
+
}
|
|
11544
|
+
),
|
|
11545
|
+
/* @__PURE__ */ jsx("div", { className: "w-full mt-8", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: onViewHistory, "data-test-id": "onchain-deposit-success-action", children: labels.viewHistoryLabel }) })
|
|
11546
|
+
] }) })
|
|
11547
|
+
]
|
|
11548
|
+
}
|
|
11549
|
+
);
|
|
11550
|
+
}
|
|
11551
|
+
var OnchainDepositSuccessSimpleView = ({
|
|
11552
|
+
onClose
|
|
11553
|
+
}) => {
|
|
11554
|
+
React6.useEffect(() => {
|
|
11555
|
+
if (!onClose) return;
|
|
11556
|
+
const timer = setTimeout(onClose, 5e3);
|
|
11557
|
+
return () => clearTimeout(timer);
|
|
11558
|
+
}, [onClose]);
|
|
11559
|
+
return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-deposit-success-simple-view", children: /* @__PURE__ */ jsx(
|
|
11560
|
+
EarnFeedbackOverlaySimpleView,
|
|
11561
|
+
{
|
|
11562
|
+
variant: "success",
|
|
11563
|
+
title: "Dep\xF3sito Confirmado!",
|
|
11564
|
+
subtitle: "Seu saldo foi atualizado."
|
|
11565
|
+
}
|
|
11566
|
+
) });
|
|
11567
|
+
};
|
|
11568
|
+
function OnchainWithdrawFormView({
|
|
11569
|
+
selectedToken,
|
|
11570
|
+
onTokenClick,
|
|
11571
|
+
isProcessing,
|
|
11572
|
+
chainCount,
|
|
11573
|
+
selectedChain,
|
|
11574
|
+
onNetworkClick,
|
|
11575
|
+
formattedBalance,
|
|
11576
|
+
amount,
|
|
11577
|
+
onAmountChange,
|
|
11578
|
+
isAmountInputDisabled,
|
|
11579
|
+
onMaxClick,
|
|
11580
|
+
showMaxButton,
|
|
11581
|
+
formattedAmountUsd,
|
|
11582
|
+
destinationNetwork,
|
|
11583
|
+
destinationAddress,
|
|
11584
|
+
onDestinationAddressChange,
|
|
11585
|
+
txDetails,
|
|
11586
|
+
isBelowMinAmount,
|
|
11587
|
+
walletError,
|
|
11588
|
+
transferError,
|
|
11589
|
+
showWarning,
|
|
11590
|
+
warningLabel,
|
|
11591
|
+
isSubmitDisabled,
|
|
11592
|
+
onSubmit,
|
|
11593
|
+
submitLabel,
|
|
11594
|
+
onBack,
|
|
11595
|
+
labels,
|
|
11596
|
+
className
|
|
11597
|
+
}) {
|
|
11598
|
+
const [showTxDetails, setShowTxDetails] = useState(false);
|
|
11599
|
+
return /* @__PURE__ */ jsx(
|
|
11600
|
+
"div",
|
|
11601
|
+
{
|
|
11602
|
+
className: twMerge(
|
|
11603
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded p-6 lg:p-12",
|
|
11604
|
+
className
|
|
11605
|
+
),
|
|
11606
|
+
"data-test-id": "onchain-withdraw-form-view",
|
|
11607
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full px-2 py-0.5 rounded gap-1", children: [
|
|
11608
|
+
/* @__PURE__ */ jsx(
|
|
11609
|
+
SecondaryButton,
|
|
11610
|
+
{
|
|
11611
|
+
onClick: onBack,
|
|
11612
|
+
className: "mb-4 !border-0 max-w-[84px]",
|
|
11613
|
+
"aria-label": labels.backLabel,
|
|
11614
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11615
|
+
/* @__PURE__ */ jsx(MdOutlineArrowBack, { className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-primary)]" }),
|
|
11616
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: labels.backLabel })
|
|
11617
|
+
] })
|
|
11618
|
+
}
|
|
11619
|
+
),
|
|
11620
|
+
/* @__PURE__ */ jsx(TextHeading, { variant: "h2", children: labels.title }),
|
|
11621
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", children: labels.subtitle }),
|
|
11622
|
+
/* @__PURE__ */ jsx(
|
|
11623
|
+
"div",
|
|
11624
|
+
{
|
|
11625
|
+
className: "my-4 p-[var(--deframe-widget-size-padding-x-md)] w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
11626
|
+
"data-test-id": "onchain-withdraw-token-card",
|
|
11627
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-[var(--deframe-widget-size-gap-md)] items-center", children: [
|
|
11628
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
|
|
11629
|
+
/* @__PURE__ */ jsxs(
|
|
11630
|
+
"button",
|
|
11631
|
+
{
|
|
11632
|
+
onClick: onTokenClick,
|
|
11633
|
+
disabled: isProcessing,
|
|
11634
|
+
className: "h-[56px] border border-[var(--deframe-widget-color-border-secondary)] rounded overflow-hidden transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
11635
|
+
"data-test-id": "onchain-withdraw-token-button",
|
|
11636
|
+
"aria-label": labels.tokenPlaceholder,
|
|
11637
|
+
children: [
|
|
11638
|
+
selectedToken ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: [
|
|
11639
|
+
/* @__PURE__ */ jsx(
|
|
11640
|
+
"img",
|
|
11641
|
+
{
|
|
11642
|
+
src: selectedToken.logoURI || "",
|
|
11643
|
+
alt: selectedToken.symbol,
|
|
11644
|
+
className: "w-6 h-6 rounded-full object-cover"
|
|
11645
|
+
}
|
|
11646
|
+
),
|
|
11647
|
+
/* @__PURE__ */ jsx("div", { className: "text-left", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: selectedToken.symbol }) })
|
|
11648
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.tokenPlaceholder }) }),
|
|
11649
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
|
|
11650
|
+
]
|
|
11651
|
+
}
|
|
11652
|
+
),
|
|
11653
|
+
/* @__PURE__ */ jsxs(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
|
|
11654
|
+
labels.balancePrefix,
|
|
11655
|
+
": ",
|
|
11656
|
+
formattedBalance
|
|
11657
|
+
] }),
|
|
11658
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
11659
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: labels.chainDirectionLabel }),
|
|
11660
|
+
chainCount === 0 || !selectedChain ? /* @__PURE__ */ jsxs(
|
|
11661
|
+
"button",
|
|
11662
|
+
{
|
|
11663
|
+
disabled: true,
|
|
11664
|
+
className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-50 cursor-not-allowed",
|
|
11665
|
+
"data-test-id": "onchain-withdraw-chain-disabled",
|
|
11666
|
+
children: [
|
|
11667
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.chainPlaceholder }),
|
|
11668
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
|
|
11669
|
+
]
|
|
11670
|
+
}
|
|
11671
|
+
) : chainCount > 1 ? /* @__PURE__ */ jsxs(
|
|
11672
|
+
"button",
|
|
11673
|
+
{
|
|
11674
|
+
onClick: onNetworkClick,
|
|
11675
|
+
className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-full flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] transition-colors cursor-pointer",
|
|
11676
|
+
"data-test-id": "onchain-withdraw-chain-dropdown",
|
|
11677
|
+
"aria-label": labels.chainPlaceholder,
|
|
11678
|
+
children: [
|
|
11679
|
+
/* @__PURE__ */ jsx(
|
|
11680
|
+
"img",
|
|
11681
|
+
{
|
|
11682
|
+
src: selectedChain.iconUrl,
|
|
11683
|
+
alt: selectedChain.name,
|
|
11684
|
+
className: "w-3 h-3 rounded-full object-cover"
|
|
11685
|
+
}
|
|
11686
|
+
),
|
|
11687
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name }),
|
|
11688
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(MdOutlineArrowDropDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
|
|
11689
|
+
]
|
|
11690
|
+
}
|
|
11691
|
+
) : /* @__PURE__ */ jsxs(
|
|
11692
|
+
"div",
|
|
11693
|
+
{
|
|
11694
|
+
className: "ml-6 bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-tertiary)] rounded-lg flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
|
|
11695
|
+
"data-test-id": "onchain-withdraw-chain-static",
|
|
11696
|
+
children: [
|
|
11697
|
+
/* @__PURE__ */ jsx(
|
|
11698
|
+
"img",
|
|
11699
|
+
{
|
|
11700
|
+
src: selectedChain.iconUrl,
|
|
11701
|
+
alt: selectedChain.name,
|
|
11702
|
+
className: "w-3 h-3 rounded-full object-cover"
|
|
11703
|
+
}
|
|
11704
|
+
),
|
|
11705
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: selectedChain.name })
|
|
11706
|
+
]
|
|
11707
|
+
}
|
|
11708
|
+
)
|
|
11709
|
+
] })
|
|
11710
|
+
] }),
|
|
11711
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-end justify-center gap-[var(--deframe-widget-size-gap-xs)] relative", children: [
|
|
11712
|
+
/* @__PURE__ */ jsx(
|
|
11713
|
+
Input2,
|
|
11714
|
+
{
|
|
11715
|
+
id: "withdraw-amount-input",
|
|
11716
|
+
placeholder: "0.00",
|
|
11717
|
+
inputMode: "decimal",
|
|
11718
|
+
autoComplete: "off",
|
|
11719
|
+
"aria-label": "Amount to withdraw",
|
|
11720
|
+
min: "0",
|
|
11721
|
+
step: "any",
|
|
11722
|
+
type: "number",
|
|
11723
|
+
value: amount,
|
|
11724
|
+
onChange: (e) => onAmountChange(e.target.value),
|
|
11725
|
+
onWheel: (event) => {
|
|
11726
|
+
event.currentTarget.blur();
|
|
11727
|
+
},
|
|
11728
|
+
disabled: isAmountInputDisabled,
|
|
11729
|
+
className: "text-h2-mobile font-extrabold bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-[color:var(--deframe-widget-color-placeholder-primary)] text-[color:var(--deframe-widget-color-text-primary)] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
11730
|
+
"data-test-id": "onchain-withdraw-amount-input"
|
|
11731
|
+
}
|
|
11732
|
+
),
|
|
11733
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: formattedAmountUsd }),
|
|
11734
|
+
showMaxButton && /* @__PURE__ */ jsx(
|
|
11735
|
+
"button",
|
|
11736
|
+
{
|
|
11737
|
+
onClick: onMaxClick,
|
|
11738
|
+
className: "absolute top-0 right-0 text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-brand-primary)] cursor-pointer -translate-y-6",
|
|
11739
|
+
"data-test-id": "onchain-withdraw-max-button",
|
|
11740
|
+
"aria-label": "Max",
|
|
11741
|
+
children: "Max"
|
|
11742
|
+
}
|
|
11743
|
+
)
|
|
11744
|
+
] })
|
|
11745
|
+
] })
|
|
11746
|
+
}
|
|
11747
|
+
),
|
|
11748
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-network", children: [
|
|
11749
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "mb-2", children: labels.destinationNetworkLabel }),
|
|
11750
|
+
/* @__PURE__ */ jsx(
|
|
11751
|
+
"div",
|
|
11752
|
+
{
|
|
11753
|
+
className: twMerge(
|
|
11754
|
+
"flex items-center gap-2 border border-[var(--deframe-widget-color-border-secondary)] rounded p-4 w-full",
|
|
11755
|
+
!destinationNetwork ? "opacity-50 cursor-not-allowed" : "bg-[var(--deframe-widget-color-bg-tertiary)]"
|
|
11756
|
+
),
|
|
11757
|
+
children: destinationNetwork ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11758
|
+
/* @__PURE__ */ jsx(
|
|
11759
|
+
"img",
|
|
11760
|
+
{
|
|
11761
|
+
src: destinationNetwork.iconUrl,
|
|
11762
|
+
alt: destinationNetwork.name,
|
|
11763
|
+
className: "w-5 h-5 rounded-full object-cover"
|
|
11764
|
+
}
|
|
11765
|
+
),
|
|
11766
|
+
/* @__PURE__ */ jsx("span", { children: destinationNetwork.name }),
|
|
11767
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkSameHint })
|
|
11768
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationNetworkEmpty })
|
|
11769
|
+
}
|
|
11770
|
+
)
|
|
11771
|
+
] }),
|
|
11772
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4", "data-test-id": "onchain-withdraw-destination-address", children: /* @__PURE__ */ jsx(
|
|
11773
|
+
Input2,
|
|
11774
|
+
{
|
|
11775
|
+
type: "text",
|
|
11776
|
+
label: labels.destinationAddressLabel,
|
|
11777
|
+
placeholder: labels.destinationAddressPlaceholder,
|
|
11778
|
+
value: destinationAddress,
|
|
11779
|
+
onChange: (e) => onDestinationAddressChange(e.target.value),
|
|
11780
|
+
disabled: isProcessing,
|
|
11781
|
+
className: "w-full px-4 py-3 bg-[var(--deframe-widget-color-bg-secondary)] border border-[var(--deframe-widget-color-border-secondary)] rounded outline-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
11782
|
+
}
|
|
11783
|
+
) }),
|
|
11784
|
+
/* @__PURE__ */ jsx(BannerNotification, { message: labels.infoBanner, variant: "info", className: "gap-3" }),
|
|
11785
|
+
isBelowMinAmount && /* @__PURE__ */ jsx(BannerNotification, { message: labels.minAmountWarning, variant: "warning", className: "gap-3" }),
|
|
11786
|
+
txDetails !== null && /* @__PURE__ */ jsxs(
|
|
11787
|
+
"div",
|
|
11788
|
+
{
|
|
11789
|
+
className: "my-4 p-6 w-full bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
11790
|
+
"data-test-id": "onchain-withdraw-tx-details",
|
|
11791
|
+
children: [
|
|
11792
|
+
/* @__PURE__ */ jsxs(
|
|
11793
|
+
"button",
|
|
11794
|
+
{
|
|
11795
|
+
onClick: () => setShowTxDetails((v) => !v),
|
|
11796
|
+
className: "flex justify-between items-center w-full text-left cursor-pointer",
|
|
11797
|
+
"aria-label": labels.txDetailsTitle,
|
|
11798
|
+
"data-test-id": "onchain-withdraw-tx-details-toggle",
|
|
11799
|
+
children: [
|
|
11800
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-semibold", children: labels.txDetailsTitle }),
|
|
11801
|
+
/* @__PURE__ */ jsx(MdOutlineExpandMore, { className: twMerge("transition-transform", showTxDetails && "rotate-180") })
|
|
11802
|
+
]
|
|
11803
|
+
}
|
|
11804
|
+
),
|
|
11805
|
+
showTxDetails && /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-3", children: [
|
|
11806
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
11807
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsAmountLabel }),
|
|
11808
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedAmount })
|
|
11809
|
+
] }),
|
|
11810
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
11811
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsFeeLabel }),
|
|
11812
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "font-semibold", children: txDetails.formattedFee })
|
|
11813
|
+
] }),
|
|
11814
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t border-[var(--deframe-widget-color-border-secondary)] pt-3 flex justify-between items-center", children: [
|
|
11815
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.txDetailsReceiveLabel }),
|
|
11816
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-bold", children: txDetails.formattedReceive })
|
|
11817
|
+
] })
|
|
11818
|
+
] })
|
|
11819
|
+
]
|
|
11820
|
+
}
|
|
11821
|
+
),
|
|
11822
|
+
walletError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: walletError, variant: "error" }) }),
|
|
11823
|
+
transferError && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: transferError, variant: "error", className: "gap-3" }) }),
|
|
11824
|
+
showWarning && /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsx(BannerNotification, { message: warningLabel, variant: "warning" }) }),
|
|
11825
|
+
/* @__PURE__ */ jsx(PrimaryButton, { disabled: isSubmitDisabled, onClick: onSubmit, "data-test-id": "onchain-withdraw-submit", children: isProcessing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11826
|
+
submitLabel,
|
|
11827
|
+
" ",
|
|
11828
|
+
/* @__PURE__ */ jsx(LoadingDots, {})
|
|
11829
|
+
] }) : submitLabel })
|
|
11830
|
+
] })
|
|
11831
|
+
}
|
|
11832
|
+
);
|
|
11833
|
+
}
|
|
11834
|
+
var OnchainWithdrawFormSimpleView = ({
|
|
11835
|
+
// Token selector
|
|
11836
|
+
selectedToken,
|
|
11837
|
+
onTokenClick,
|
|
11838
|
+
selectedChain,
|
|
11839
|
+
// Amount
|
|
11840
|
+
amount,
|
|
11841
|
+
onAmountChange,
|
|
11842
|
+
formattedAmountUsd,
|
|
11843
|
+
formattedBalance,
|
|
11844
|
+
// Percentage (new optional props)
|
|
11845
|
+
onPercentageClick,
|
|
11846
|
+
maxLabel,
|
|
11847
|
+
// Destination address
|
|
11848
|
+
destinationAddress,
|
|
11849
|
+
onDestinationAddressChange,
|
|
11850
|
+
// Errors
|
|
11851
|
+
isBelowMinAmount,
|
|
11852
|
+
walletError,
|
|
11853
|
+
transferError,
|
|
11854
|
+
// Submit
|
|
11855
|
+
isSubmitDisabled,
|
|
11856
|
+
isProcessing,
|
|
11857
|
+
onSubmit,
|
|
11858
|
+
submitLabel,
|
|
11859
|
+
// Navigation
|
|
11860
|
+
onBack,
|
|
11861
|
+
onClose,
|
|
11862
|
+
// Labels
|
|
11863
|
+
labels
|
|
11864
|
+
}) => {
|
|
11865
|
+
var _a;
|
|
11866
|
+
const hasToken = selectedToken != null;
|
|
11867
|
+
const hasAmountError = !!walletError || isBelowMinAmount;
|
|
11868
|
+
const hasAddressError = !!transferError;
|
|
11869
|
+
const isSubmitDisabledInternal = !hasToken || isSubmitDisabled || isProcessing || !amount || amount === "0" || amount === "" || !destinationAddress.trim();
|
|
11870
|
+
const [cardHovered, setCardHovered] = React6__default.useState(false);
|
|
11871
|
+
const hideTimerRef = React6__default.useRef(void 0);
|
|
11872
|
+
function handleHoverStart() {
|
|
11873
|
+
clearTimeout(hideTimerRef.current);
|
|
11874
|
+
setCardHovered(true);
|
|
11875
|
+
}
|
|
11876
|
+
function handleHoverEnd() {
|
|
11877
|
+
hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
|
|
11878
|
+
}
|
|
11879
|
+
React6__default.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
|
|
11880
|
+
const panelBaseClasses = [
|
|
11881
|
+
"relative flex flex-col overflow-hidden w-[420px]",
|
|
11882
|
+
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
11883
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11884
|
+
"font-[var(--deframe-widget-font-family)]"
|
|
11885
|
+
].join(" ");
|
|
11886
|
+
const headerBaseClasses = [
|
|
11887
|
+
"flex items-center",
|
|
11888
|
+
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
11889
|
+
"py-[var(--deframe-widget-size-padding-y-md)]"
|
|
11890
|
+
].join(" ");
|
|
11891
|
+
const titleBaseClasses = [
|
|
11892
|
+
"flex-1",
|
|
11893
|
+
"text-[15px]",
|
|
11894
|
+
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
11895
|
+
"text-[color:var(--deframe-widget-color-text-primary)]"
|
|
11896
|
+
].join(" ");
|
|
11897
|
+
const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
|
|
11898
|
+
const bodyBaseClasses = [
|
|
11899
|
+
"flex flex-col",
|
|
11900
|
+
"gap-[var(--deframe-widget-size-gap-md)]",
|
|
11901
|
+
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
11902
|
+
"py-[var(--deframe-widget-size-padding-y-md)]"
|
|
11903
|
+
].join(" ");
|
|
11904
|
+
const inputCardClasses = twMerge(
|
|
11905
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11906
|
+
"border",
|
|
11907
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
11908
|
+
"transition-[border-color,background] duration-200",
|
|
11909
|
+
hasAmountError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
|
|
11910
|
+
);
|
|
11911
|
+
const addressCardClasses = twMerge(
|
|
11912
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11913
|
+
"border",
|
|
11914
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
11915
|
+
"transition-[border-color,background] duration-200",
|
|
11916
|
+
hasAddressError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
|
|
11917
|
+
);
|
|
11918
|
+
const footerBaseClasses = [
|
|
11919
|
+
"flex gap-[var(--deframe-widget-size-gap-sm)]",
|
|
11920
|
+
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
11921
|
+
"pb-[var(--deframe-widget-size-padding-y-md)]"
|
|
11922
|
+
].join(" ");
|
|
11923
|
+
const cancelButtonClasses = [
|
|
11924
|
+
"flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11925
|
+
"text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
11926
|
+
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
11927
|
+
"outline-none",
|
|
11928
|
+
"transition-[background,color,border-color] duration-150",
|
|
11929
|
+
"hover:opacity-100",
|
|
11930
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
|
|
11931
|
+
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
11932
|
+
].join(" ");
|
|
11933
|
+
const submitButtonClasses = [
|
|
11934
|
+
"flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11935
|
+
"border-none",
|
|
11936
|
+
"text-[15px]",
|
|
11937
|
+
isSubmitDisabledInternal ? "text-[color:var(--deframe-widget-color-text-primary-disabled)]" : "text-[color:var(--deframe-widget-color-text-primary-dark)]",
|
|
11938
|
+
"outline-none",
|
|
11939
|
+
"transition-[background,color] duration-200"
|
|
11940
|
+
].join(" ");
|
|
11941
|
+
return /* @__PURE__ */ jsxs(
|
|
11942
|
+
"div",
|
|
11943
|
+
{
|
|
11944
|
+
"data-slot": "onchain-withdraw-simple-panel",
|
|
11945
|
+
"data-test-id": "onchain-withdraw-form-simple-view",
|
|
11946
|
+
className: panelBaseClasses,
|
|
11947
|
+
children: [
|
|
11948
|
+
/* @__PURE__ */ jsxs(
|
|
11949
|
+
"header",
|
|
11950
|
+
{
|
|
11951
|
+
"data-slot": "onchain-withdraw-simple-header",
|
|
11952
|
+
"data-test-id": "onchain-withdraw-form-simple-view-header",
|
|
11953
|
+
className: headerBaseClasses,
|
|
11954
|
+
children: [
|
|
11955
|
+
/* @__PURE__ */ jsx(
|
|
11956
|
+
"span",
|
|
11957
|
+
{
|
|
11958
|
+
"data-slot": "onchain-withdraw-simple-title",
|
|
11959
|
+
"data-test-id": "onchain-withdraw-form-simple-view-title",
|
|
11960
|
+
className: titleBaseClasses,
|
|
11961
|
+
children: labels.title
|
|
11962
|
+
}
|
|
11963
|
+
),
|
|
11964
|
+
onClose && /* @__PURE__ */ jsx(
|
|
11965
|
+
CloseButton_default,
|
|
11966
|
+
{
|
|
11967
|
+
onClick: onClose,
|
|
11968
|
+
ariaLabel: "Close withdrawal panel",
|
|
11969
|
+
testId: "onchain-withdraw-form-simple-view-close"
|
|
11970
|
+
}
|
|
11971
|
+
)
|
|
11972
|
+
]
|
|
11973
|
+
}
|
|
11974
|
+
),
|
|
11975
|
+
/* @__PURE__ */ jsx(
|
|
11976
|
+
"div",
|
|
11977
|
+
{
|
|
11978
|
+
"data-slot": "onchain-withdraw-simple-divider",
|
|
11979
|
+
"data-test-id": "onchain-withdraw-form-simple-view-divider",
|
|
11980
|
+
className: dividerClasses
|
|
11981
|
+
}
|
|
11982
|
+
),
|
|
11983
|
+
/* @__PURE__ */ jsxs(
|
|
11984
|
+
"div",
|
|
11985
|
+
{
|
|
11986
|
+
"data-slot": "onchain-withdraw-simple-body",
|
|
11987
|
+
"data-test-id": "onchain-withdraw-form-simple-view-body",
|
|
11988
|
+
className: bodyBaseClasses,
|
|
11989
|
+
children: [
|
|
11990
|
+
/* @__PURE__ */ jsxs(
|
|
11991
|
+
"div",
|
|
11992
|
+
{
|
|
11993
|
+
"data-slot": "onchain-withdraw-simple-input-card",
|
|
11994
|
+
"data-test-id": "onchain-withdraw-form-simple-view-input-card",
|
|
11995
|
+
onMouseEnter: hasToken ? handleHoverStart : void 0,
|
|
11996
|
+
onMouseLeave: hasToken ? handleHoverEnd : void 0,
|
|
11997
|
+
className: inputCardClasses,
|
|
11998
|
+
children: [
|
|
11999
|
+
/* @__PURE__ */ jsxs(
|
|
12000
|
+
"div",
|
|
12001
|
+
{
|
|
12002
|
+
"data-slot": "onchain-withdraw-simple-input-top-row",
|
|
12003
|
+
"data-test-id": "onchain-withdraw-form-simple-view-top-row",
|
|
12004
|
+
className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
12005
|
+
children: [
|
|
12006
|
+
/* @__PURE__ */ jsx(
|
|
12007
|
+
EarnTokenSelectorSimpleView,
|
|
12008
|
+
{
|
|
12009
|
+
selectedToken,
|
|
12010
|
+
onTokenClick,
|
|
12011
|
+
onNetworkAndAssetClick: onTokenClick,
|
|
12012
|
+
isLoading: false,
|
|
12013
|
+
selectTokenLabel: "SELECIONE AQUI",
|
|
12014
|
+
chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
|
|
12015
|
+
chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
|
|
12016
|
+
}
|
|
12017
|
+
),
|
|
12018
|
+
/* @__PURE__ */ jsx(
|
|
12019
|
+
"div",
|
|
12020
|
+
{
|
|
12021
|
+
"data-test-id": "onchain-withdraw-form-simple-view-input-divider",
|
|
12022
|
+
className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
|
|
12023
|
+
}
|
|
12024
|
+
),
|
|
12025
|
+
/* @__PURE__ */ jsx(
|
|
12026
|
+
EarnAmountInputSimpleView,
|
|
12027
|
+
{
|
|
12028
|
+
value: amount,
|
|
12029
|
+
onChange: (e) => onAmountChange(e.target.value),
|
|
12030
|
+
ariaLabel: "Amount to withdraw",
|
|
12031
|
+
dollarAmountFormatted: formattedAmountUsd
|
|
12032
|
+
}
|
|
12033
|
+
)
|
|
12034
|
+
]
|
|
12035
|
+
}
|
|
12036
|
+
),
|
|
12037
|
+
hasToken && formattedBalance && /* @__PURE__ */ jsx(
|
|
12038
|
+
"div",
|
|
12039
|
+
{
|
|
12040
|
+
"data-slot": "onchain-withdraw-simple-balance-row",
|
|
12041
|
+
"data-test-id": "onchain-withdraw-form-simple-view-balance-row",
|
|
12042
|
+
className: "mt-[var(--deframe-widget-size-gap-sm)]",
|
|
12043
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: /* @__PURE__ */ jsxs(
|
|
12044
|
+
"span",
|
|
12045
|
+
{
|
|
12046
|
+
className: hasAmountError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12047
|
+
children: [
|
|
12048
|
+
labels.balancePrefix,
|
|
12049
|
+
": ",
|
|
12050
|
+
formattedBalance
|
|
12051
|
+
]
|
|
12052
|
+
}
|
|
12053
|
+
) })
|
|
12054
|
+
}
|
|
12055
|
+
),
|
|
12056
|
+
!hasToken && /* @__PURE__ */ jsx(
|
|
12057
|
+
"p",
|
|
12058
|
+
{
|
|
12059
|
+
"data-slot": "onchain-withdraw-simple-empty-hint",
|
|
12060
|
+
"data-test-id": "onchain-withdraw-form-simple-view-empty-hint",
|
|
12061
|
+
className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
12062
|
+
children: labels.tokenPlaceholder
|
|
12063
|
+
}
|
|
12064
|
+
),
|
|
12065
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: hasToken && onPercentageClick && cardHovered && /* @__PURE__ */ jsx(
|
|
12066
|
+
motion.div,
|
|
12067
|
+
{
|
|
12068
|
+
"data-slot": "onchain-withdraw-simple-chips-row",
|
|
12069
|
+
"data-test-id": "onchain-withdraw-form-simple-view-chips-row",
|
|
12070
|
+
initial: { opacity: 0, height: 0, marginTop: 0 },
|
|
12071
|
+
animate: { opacity: 1, height: "auto", marginTop: "var(--deframe-widget-size-gap-sm)" },
|
|
12072
|
+
exit: { opacity: 0, height: 0, marginTop: 0 },
|
|
12073
|
+
transition: { duration: 0.15, ease: "easeOut" },
|
|
12074
|
+
style: { overflow: "hidden" },
|
|
12075
|
+
onMouseEnter: handleHoverStart,
|
|
12076
|
+
onMouseLeave: handleHoverEnd,
|
|
12077
|
+
children: /* @__PURE__ */ jsx(
|
|
12078
|
+
EarnPercentageButtonsSimpleView,
|
|
12079
|
+
{
|
|
12080
|
+
onPercentageClick,
|
|
12081
|
+
maxLabel: maxLabel != null ? maxLabel : "M\xE1x."
|
|
12082
|
+
}
|
|
12083
|
+
)
|
|
12084
|
+
}
|
|
12085
|
+
) }),
|
|
12086
|
+
(walletError || isBelowMinAmount) && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(
|
|
12087
|
+
EarnInlineNotificationSimpleView,
|
|
12088
|
+
{
|
|
12089
|
+
variant: "error",
|
|
12090
|
+
message: walletError != null ? walletError : labels.minAmountWarning
|
|
12091
|
+
}
|
|
12092
|
+
) })
|
|
12093
|
+
]
|
|
12094
|
+
}
|
|
12095
|
+
),
|
|
12096
|
+
/* @__PURE__ */ jsxs(
|
|
12097
|
+
"div",
|
|
12098
|
+
{
|
|
12099
|
+
"data-slot": "onchain-withdraw-simple-address-card",
|
|
12100
|
+
"data-test-id": "onchain-withdraw-form-simple-view-address-card",
|
|
12101
|
+
className: addressCardClasses,
|
|
12102
|
+
children: [
|
|
12103
|
+
/* @__PURE__ */ jsx(
|
|
12104
|
+
"p",
|
|
12105
|
+
{
|
|
12106
|
+
"data-slot": "onchain-withdraw-simple-address-label",
|
|
12107
|
+
"data-test-id": "onchain-withdraw-form-simple-view-address-label",
|
|
12108
|
+
className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
12109
|
+
children: labels.destinationAddressLabel
|
|
12110
|
+
}
|
|
12111
|
+
),
|
|
12112
|
+
/* @__PURE__ */ jsx(
|
|
12113
|
+
"input",
|
|
12114
|
+
{
|
|
12115
|
+
"data-slot": "onchain-withdraw-simple-address-input",
|
|
12116
|
+
"data-test-id": "onchain-withdraw-form-simple-view-address-input",
|
|
12117
|
+
type: "text",
|
|
12118
|
+
value: destinationAddress,
|
|
12119
|
+
onChange: (e) => onDestinationAddressChange(e.target.value),
|
|
12120
|
+
placeholder: labels.destinationAddressPlaceholder,
|
|
12121
|
+
disabled: isProcessing,
|
|
12122
|
+
"aria-label": labels.destinationAddressLabel,
|
|
12123
|
+
className: twMerge(
|
|
12124
|
+
"w-full bg-transparent outline-none",
|
|
12125
|
+
"text-[13px] [font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
12126
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
12127
|
+
"placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
|
|
12128
|
+
"text-[color:var(--deframe-widget-color-text-primary)]",
|
|
12129
|
+
'[font-feature-settings:"tnum"]',
|
|
12130
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
12131
|
+
),
|
|
12132
|
+
spellCheck: false,
|
|
12133
|
+
autoComplete: "off"
|
|
12134
|
+
}
|
|
12135
|
+
),
|
|
12136
|
+
transferError && /* @__PURE__ */ jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsx(EarnInlineNotificationSimpleView, { variant: "error", message: transferError }) })
|
|
12137
|
+
]
|
|
12138
|
+
}
|
|
12139
|
+
),
|
|
12140
|
+
/* @__PURE__ */ jsx(
|
|
12141
|
+
EarnInlineNotificationSimpleView,
|
|
12142
|
+
{
|
|
12143
|
+
variant: "warning",
|
|
12144
|
+
message: labels.infoBanner
|
|
12145
|
+
}
|
|
12146
|
+
)
|
|
12147
|
+
]
|
|
12148
|
+
}
|
|
12149
|
+
),
|
|
12150
|
+
/* @__PURE__ */ jsxs(
|
|
12151
|
+
"footer",
|
|
12152
|
+
{
|
|
12153
|
+
"data-slot": "onchain-withdraw-simple-footer",
|
|
12154
|
+
"data-test-id": "onchain-withdraw-form-simple-view-footer",
|
|
12155
|
+
className: footerBaseClasses,
|
|
12156
|
+
children: [
|
|
12157
|
+
onBack && /* @__PURE__ */ jsx(
|
|
12158
|
+
SecondaryButton,
|
|
12159
|
+
{
|
|
12160
|
+
type: "button",
|
|
12161
|
+
className: cancelButtonClasses,
|
|
12162
|
+
onClick: onBack,
|
|
12163
|
+
"aria-label": "Cancel withdrawal",
|
|
12164
|
+
"data-test-id": "onchain-withdraw-form-simple-view-cancel",
|
|
12165
|
+
children: labels.backLabel
|
|
12166
|
+
}
|
|
12167
|
+
),
|
|
12168
|
+
/* @__PURE__ */ jsx(
|
|
12169
|
+
PrimaryButton,
|
|
12170
|
+
{
|
|
12171
|
+
type: "button",
|
|
12172
|
+
className: submitButtonClasses,
|
|
12173
|
+
disabled: isSubmitDisabledInternal,
|
|
12174
|
+
onClick: onSubmit,
|
|
12175
|
+
"aria-label": submitLabel,
|
|
12176
|
+
"data-test-id": "onchain-withdraw-form-simple-view-submit",
|
|
12177
|
+
children: submitLabel
|
|
12178
|
+
}
|
|
12179
|
+
)
|
|
12180
|
+
]
|
|
12181
|
+
}
|
|
12182
|
+
)
|
|
12183
|
+
]
|
|
12184
|
+
}
|
|
12185
|
+
);
|
|
12186
|
+
};
|
|
12187
|
+
function OnchainWithdrawChainSelectorView({
|
|
12188
|
+
actionSheetId,
|
|
12189
|
+
isOpen,
|
|
12190
|
+
currentActionSheetId,
|
|
12191
|
+
onClose,
|
|
12192
|
+
chains,
|
|
12193
|
+
onChainClick,
|
|
12194
|
+
title,
|
|
12195
|
+
closeAriaLabel = "Close"
|
|
12196
|
+
}) {
|
|
12197
|
+
return /* @__PURE__ */ jsx(
|
|
12198
|
+
ActionSheet,
|
|
12199
|
+
{
|
|
12200
|
+
id: actionSheetId,
|
|
12201
|
+
isOpen,
|
|
12202
|
+
currentActionSheetId,
|
|
12203
|
+
onClose,
|
|
12204
|
+
height: "auto",
|
|
12205
|
+
position: "bottom",
|
|
12206
|
+
closeOnBackdropClick: true,
|
|
12207
|
+
children: /* @__PURE__ */ jsx(
|
|
12208
|
+
"div",
|
|
12209
|
+
{
|
|
12210
|
+
className: "relative w-full max-w-2xl mx-auto h-full bg-[var(--deframe-widget-color-bg-primary)] shadow-lg overflow-y-auto h-screen",
|
|
12211
|
+
"data-test-id": "onchain-withdraw-chain-selector",
|
|
12212
|
+
children: /* @__PURE__ */ jsxs("div", { className: "w-full h-full px-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-primary)] text-[var(--deframe-widget-color-text-primary)] flex flex-col relative min-h-0", children: [
|
|
12213
|
+
/* @__PURE__ */ jsx("div", { className: "w-full px-[var(--deframe-widget-size-padding-x-sm)] pr-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)] border-b items-center border-[var(--deframe-widget-color-border-tertiary)] flex", children: /* @__PURE__ */ jsx(
|
|
12214
|
+
"button",
|
|
12215
|
+
{
|
|
12216
|
+
onClick: onClose,
|
|
12217
|
+
className: "w-12 h-12 rounded-full flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-brand-primary)] transition-colors cursor-pointer",
|
|
12218
|
+
"aria-label": closeAriaLabel,
|
|
12219
|
+
"data-test-id": "onchain-withdraw-chain-selector-close",
|
|
12220
|
+
children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
|
|
12221
|
+
}
|
|
12222
|
+
) }),
|
|
12223
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col flex-1 min-h-0", children: [
|
|
12224
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-none p-6 pb-0", children: [
|
|
12225
|
+
/* @__PURE__ */ jsx(
|
|
12226
|
+
"div",
|
|
12227
|
+
{
|
|
12228
|
+
className: "text-h5 text-[color:var(--deframe-widget-color-text-secondary)] font-bold",
|
|
12229
|
+
"data-test-id": "onchain-withdraw-chain-selector-title",
|
|
12230
|
+
children: title
|
|
12231
|
+
}
|
|
12232
|
+
),
|
|
12233
|
+
/* @__PURE__ */ jsx("br", {})
|
|
12234
|
+
] }),
|
|
12235
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full px-6 pb-6 flex-1 min-h-0 overflow-y-auto", children: chains.map((chain) => /* @__PURE__ */ jsxs(
|
|
12236
|
+
ListItem,
|
|
12237
|
+
{
|
|
12238
|
+
onClick: () => onChainClick(chain.chainId),
|
|
12239
|
+
containerClassName: `border ${chain.isSelected ? "border-[var(--deframe-widget-color-brand-primary)] bg-[var(--deframe-widget-color-bg-secondary)]" : "border-[var(--deframe-widget-color-border-secondary)]"} hover:border-[var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)] transition-colors cursor-pointer`,
|
|
12240
|
+
"data-test-id": `onchain-withdraw-chain-${chain.chainId}`,
|
|
12241
|
+
children: [
|
|
12242
|
+
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx(
|
|
12243
|
+
"img",
|
|
12244
|
+
{
|
|
12245
|
+
src: chain.iconUrl,
|
|
12246
|
+
alt: chain.name,
|
|
12247
|
+
className: "w-8 h-8 rounded-full object-cover"
|
|
12248
|
+
}
|
|
12249
|
+
) }),
|
|
12250
|
+
/* @__PURE__ */ jsx(ListItemContent, { className: "ml-4", children: /* @__PURE__ */ jsx(TextBody, { variant: "text-large", className: "font-medium", children: chain.name }) }),
|
|
12251
|
+
/* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: chain.formattedBalance }) })
|
|
12252
|
+
]
|
|
12253
|
+
},
|
|
12254
|
+
chain.chainId
|
|
12255
|
+
)) })
|
|
12256
|
+
] })
|
|
12257
|
+
] })
|
|
12258
|
+
}
|
|
12259
|
+
)
|
|
12260
|
+
}
|
|
12261
|
+
);
|
|
12262
|
+
}
|
|
12263
|
+
function WithdrawSuccessIcon() {
|
|
12264
|
+
return /* @__PURE__ */ jsx(
|
|
12265
|
+
"div",
|
|
12266
|
+
{
|
|
12267
|
+
className: "w-20 h-20 bg-[var(--deframe-widget-color-state-success)] rounded-full flex items-center justify-center",
|
|
12268
|
+
"data-test-id": "withdraw-success-icon",
|
|
12269
|
+
children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
|
|
12270
|
+
"path",
|
|
12271
|
+
{
|
|
12272
|
+
d: "M10 15V5M10 5L6 9M10 5L14 9",
|
|
12273
|
+
stroke: "#121212",
|
|
12274
|
+
strokeWidth: "2",
|
|
12275
|
+
strokeLinecap: "round",
|
|
12276
|
+
strokeLinejoin: "round"
|
|
12277
|
+
}
|
|
12278
|
+
) })
|
|
12279
|
+
}
|
|
12280
|
+
);
|
|
12281
|
+
}
|
|
12282
|
+
function OnchainWithdrawSuccessView({
|
|
12283
|
+
tokenSymbol,
|
|
12284
|
+
tokenLogoURI,
|
|
12285
|
+
formattedAmount,
|
|
12286
|
+
chainName,
|
|
12287
|
+
chainIconUrl,
|
|
12288
|
+
destinationAddress,
|
|
12289
|
+
blockchainCost,
|
|
12290
|
+
txHash,
|
|
12291
|
+
blockExplorerUrl,
|
|
12292
|
+
onViewHistory,
|
|
12293
|
+
onClose,
|
|
12294
|
+
labels,
|
|
12295
|
+
className,
|
|
12296
|
+
icon
|
|
12297
|
+
}) {
|
|
12298
|
+
const [showDetails, setShowDetails] = useState(true);
|
|
12299
|
+
return /* @__PURE__ */ jsxs(
|
|
12300
|
+
"div",
|
|
12301
|
+
{
|
|
12302
|
+
className: twMerge(
|
|
12303
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded",
|
|
12304
|
+
className
|
|
12305
|
+
),
|
|
12306
|
+
"data-test-id": "onchain-withdraw-success-view",
|
|
12307
|
+
children: [
|
|
12308
|
+
onClose && /* @__PURE__ */ jsx(
|
|
12309
|
+
"button",
|
|
12310
|
+
{
|
|
12311
|
+
onClick: onClose,
|
|
12312
|
+
className: "absolute top-4 right-4 flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
|
|
12313
|
+
"aria-label": labels.closeAriaLabel,
|
|
12314
|
+
"data-test-id": "onchain-withdraw-success-close",
|
|
12315
|
+
children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
|
|
12316
|
+
}
|
|
12317
|
+
),
|
|
12318
|
+
/* @__PURE__ */ jsx("div", { className: "p-6 lg:p-12", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full items-center", children: [
|
|
12319
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
12320
|
+
icon != null ? icon : /* @__PURE__ */ jsx(WithdrawSuccessIcon, {}),
|
|
12321
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] leading-tight mb-2", children: labels.title }),
|
|
12322
|
+
/* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center", children: labels.subtitle })
|
|
12323
|
+
] }),
|
|
12324
|
+
/* @__PURE__ */ jsx(
|
|
12325
|
+
"div",
|
|
12326
|
+
{
|
|
12327
|
+
className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12328
|
+
"data-test-id": "onchain-withdraw-success-summary",
|
|
12329
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
|
|
12330
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0", children: [
|
|
12331
|
+
/* @__PURE__ */ jsx("div", { className: "w-[32px] h-[32px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden", children: tokenLogoURI ? /* @__PURE__ */ jsx("img", { src: tokenLogoURI, alt: tokenSymbol, className: "w-[32px] h-[32px] object-cover" }) : /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-bold", children: tokenSymbol.slice(0, 2).toUpperCase() }) }),
|
|
12332
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1", children: /* @__PURE__ */ jsx("img", { src: chainIconUrl, alt: chainName, className: "w-[16px] h-[16px] rounded-full object-cover" }) })
|
|
12333
|
+
] }),
|
|
12334
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
12335
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px]", children: [
|
|
12336
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.sendingLabel }),
|
|
12337
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[20px] font-semibold leading-tight", children: [
|
|
12338
|
+
formattedAmount,
|
|
12339
|
+
" ",
|
|
12340
|
+
tokenSymbol
|
|
12341
|
+
] })
|
|
12342
|
+
] }),
|
|
12343
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px] mt-4", children: [
|
|
12344
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationLabel }),
|
|
12345
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold break-all leading-snug", children: destinationAddress })
|
|
12346
|
+
] })
|
|
12347
|
+
] })
|
|
12348
|
+
] })
|
|
12349
|
+
}
|
|
12350
|
+
),
|
|
12351
|
+
/* @__PURE__ */ jsxs(
|
|
12352
|
+
"div",
|
|
12353
|
+
{
|
|
12354
|
+
className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12355
|
+
"data-test-id": "onchain-withdraw-success-details",
|
|
12356
|
+
children: [
|
|
12357
|
+
/* @__PURE__ */ jsxs(
|
|
12358
|
+
"button",
|
|
12359
|
+
{
|
|
12360
|
+
onClick: () => setShowDetails(!showDetails),
|
|
12361
|
+
className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
|
|
12362
|
+
"aria-label": labels.detailsTitle,
|
|
12363
|
+
"data-test-id": "onchain-withdraw-success-details-toggle",
|
|
12364
|
+
children: [
|
|
12365
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold", children: labels.detailsTitle }),
|
|
12366
|
+
/* @__PURE__ */ jsx(
|
|
12367
|
+
MdOutlineExpandMore,
|
|
12368
|
+
{
|
|
12369
|
+
className: twMerge(
|
|
12370
|
+
"transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12371
|
+
showDetails && "rotate-180"
|
|
12372
|
+
)
|
|
12373
|
+
}
|
|
12374
|
+
)
|
|
12375
|
+
]
|
|
12376
|
+
}
|
|
12377
|
+
),
|
|
12378
|
+
showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
|
|
12379
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
12380
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.withdrawAmountLabel }),
|
|
12381
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12px] font-semibold", children: [
|
|
12382
|
+
formattedAmount,
|
|
12383
|
+
" ",
|
|
12384
|
+
tokenSymbol
|
|
12385
|
+
] })
|
|
12386
|
+
] }),
|
|
12387
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
12388
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.blockchainCostLabel }),
|
|
12389
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold", children: blockchainCost })
|
|
12390
|
+
] }),
|
|
12391
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
12392
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.youReceiveLabel }),
|
|
12393
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12px] font-semibold", children: [
|
|
12394
|
+
formattedAmount,
|
|
12395
|
+
" ",
|
|
12396
|
+
tokenSymbol
|
|
12397
|
+
] })
|
|
12398
|
+
] }),
|
|
12399
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
12400
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.transactionLabel }),
|
|
12401
|
+
/* @__PURE__ */ jsx(
|
|
12402
|
+
"a",
|
|
12403
|
+
{
|
|
12404
|
+
href: `${blockExplorerUrl}/tx/${txHash}`,
|
|
12405
|
+
target: "_blank",
|
|
12406
|
+
rel: "noopener noreferrer",
|
|
12407
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-state-success)] hover:underline font-semibold",
|
|
12408
|
+
"data-test-id": "onchain-withdraw-success-explorer",
|
|
12409
|
+
children: labels.viewExplorerLabel
|
|
12410
|
+
}
|
|
12411
|
+
)
|
|
12412
|
+
] })
|
|
12413
|
+
] })
|
|
12414
|
+
]
|
|
12415
|
+
}
|
|
12416
|
+
),
|
|
12417
|
+
/* @__PURE__ */ jsx("div", { className: "w-full mt-8", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: onViewHistory, "data-test-id": "onchain-withdraw-success-action", children: labels.viewHistoryLabel }) })
|
|
12418
|
+
] }) })
|
|
12419
|
+
]
|
|
12420
|
+
}
|
|
12421
|
+
);
|
|
12422
|
+
}
|
|
12423
|
+
function WithdrawFailedIcon() {
|
|
12424
|
+
return /* @__PURE__ */ jsx(
|
|
12425
|
+
"div",
|
|
12426
|
+
{
|
|
12427
|
+
className: "w-20 h-20 rounded-full flex items-center justify-center bg-[var(--deframe-widget-color-state-error)]",
|
|
12428
|
+
"data-test-id": "withdraw-failed-icon",
|
|
12429
|
+
children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
12430
|
+
"path",
|
|
12431
|
+
{
|
|
12432
|
+
d: "M18 6L6 18M6 6L18 18",
|
|
12433
|
+
stroke: "#121212",
|
|
12434
|
+
strokeWidth: "2",
|
|
12435
|
+
strokeLinecap: "round",
|
|
12436
|
+
strokeLinejoin: "round"
|
|
12437
|
+
}
|
|
12438
|
+
) })
|
|
12439
|
+
}
|
|
12440
|
+
);
|
|
12441
|
+
}
|
|
12442
|
+
function OnchainWithdrawFailedView({
|
|
12443
|
+
tokenSymbol,
|
|
12444
|
+
tokenLogoURI,
|
|
12445
|
+
formattedAmount,
|
|
12446
|
+
chainName,
|
|
12447
|
+
chainIconUrl,
|
|
12448
|
+
destinationAddress,
|
|
12449
|
+
blockchainCost,
|
|
12450
|
+
errorMessage,
|
|
12451
|
+
onCancel,
|
|
12452
|
+
onTryAgain,
|
|
12453
|
+
labels,
|
|
12454
|
+
className,
|
|
12455
|
+
icon
|
|
12456
|
+
}) {
|
|
12457
|
+
const [showDetails, setShowDetails] = useState(true);
|
|
12458
|
+
return /* @__PURE__ */ jsxs(
|
|
12459
|
+
"div",
|
|
12460
|
+
{
|
|
12461
|
+
className: twMerge(
|
|
12462
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded",
|
|
12463
|
+
className
|
|
12464
|
+
),
|
|
12465
|
+
"data-test-id": "onchain-withdraw-failed-view",
|
|
12466
|
+
children: [
|
|
12467
|
+
/* @__PURE__ */ jsx(
|
|
12468
|
+
"button",
|
|
12469
|
+
{
|
|
12470
|
+
onClick: onCancel,
|
|
12471
|
+
className: "absolute top-4 right-4 flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
|
|
12472
|
+
"aria-label": labels.closeAriaLabel,
|
|
12473
|
+
"data-test-id": "onchain-withdraw-failed-close",
|
|
12474
|
+
children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
|
|
12475
|
+
}
|
|
12476
|
+
),
|
|
12477
|
+
/* @__PURE__ */ jsx("div", { className: "p-6 lg:p-12", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full items-center", children: [
|
|
12478
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
12479
|
+
icon != null ? icon : /* @__PURE__ */ jsx(WithdrawFailedIcon, {}),
|
|
12480
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[28px] font-extrabold text-[color:var(--deframe-widget-color-text-primary)] leading-tight mb-2", children: labels.title }),
|
|
12481
|
+
/* @__PURE__ */ jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center", children: errorMessage || labels.defaultErrorMessage })
|
|
12482
|
+
] }),
|
|
12483
|
+
/* @__PURE__ */ jsx(
|
|
12484
|
+
"div",
|
|
12485
|
+
{
|
|
12486
|
+
className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12487
|
+
"data-test-id": "onchain-withdraw-failed-summary",
|
|
12488
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
|
|
12489
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0", children: [
|
|
12490
|
+
/* @__PURE__ */ jsx("div", { className: "w-[32px] h-[32px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden", children: tokenLogoURI ? /* @__PURE__ */ jsx("img", { src: tokenLogoURI, alt: tokenSymbol, className: "w-[32px] h-[32px] object-cover" }) : /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-bold", children: tokenSymbol.slice(0, 2).toUpperCase() }) }),
|
|
12491
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1", children: /* @__PURE__ */ jsx("img", { src: chainIconUrl, alt: chainName, className: "w-[16px] h-[16px] rounded-full object-cover" }) })
|
|
12492
|
+
] }),
|
|
12493
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
12494
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px]", children: [
|
|
12495
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.sendingLabel }),
|
|
12496
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[20px] font-semibold leading-tight", children: [
|
|
12497
|
+
formattedAmount,
|
|
12498
|
+
" ",
|
|
12499
|
+
tokenSymbol
|
|
12500
|
+
] })
|
|
12501
|
+
] }),
|
|
12502
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px] mt-4", children: [
|
|
12503
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.destinationLabel }),
|
|
12504
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold break-all leading-snug", children: destinationAddress })
|
|
12505
|
+
] })
|
|
12506
|
+
] })
|
|
12507
|
+
] })
|
|
12508
|
+
}
|
|
12509
|
+
),
|
|
12510
|
+
/* @__PURE__ */ jsxs(
|
|
12511
|
+
"div",
|
|
12512
|
+
{
|
|
12513
|
+
className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12514
|
+
"data-test-id": "onchain-withdraw-failed-details",
|
|
12515
|
+
children: [
|
|
12516
|
+
/* @__PURE__ */ jsxs(
|
|
12517
|
+
"button",
|
|
12518
|
+
{
|
|
12519
|
+
onClick: () => setShowDetails(!showDetails),
|
|
12520
|
+
className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
|
|
12521
|
+
"aria-label": labels.detailsTitle,
|
|
12522
|
+
"data-test-id": "onchain-withdraw-failed-details-toggle",
|
|
12523
|
+
children: [
|
|
12524
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-semibold", children: labels.detailsTitle }),
|
|
12525
|
+
/* @__PURE__ */ jsx(
|
|
12526
|
+
MdOutlineExpandMore,
|
|
12527
|
+
{
|
|
12528
|
+
className: twMerge(
|
|
12529
|
+
"transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12530
|
+
showDetails && "rotate-180"
|
|
12531
|
+
)
|
|
12532
|
+
}
|
|
12533
|
+
)
|
|
12534
|
+
]
|
|
12535
|
+
}
|
|
12536
|
+
),
|
|
12537
|
+
showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
|
|
12538
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
12539
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.withdrawAmountLabel }),
|
|
12540
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12px] font-semibold", children: [
|
|
12541
|
+
formattedAmount,
|
|
12542
|
+
" ",
|
|
12543
|
+
tokenSymbol
|
|
12544
|
+
] })
|
|
12545
|
+
] }),
|
|
12546
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[var(--deframe-widget-color-border-secondary)]", children: [
|
|
12547
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.blockchainCostLabel }),
|
|
12548
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold", children: blockchainCost })
|
|
12549
|
+
] }),
|
|
12550
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
12551
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.youReceiveLabel }),
|
|
12552
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12px] font-semibold", children: [
|
|
12553
|
+
formattedAmount,
|
|
12554
|
+
" ",
|
|
12555
|
+
tokenSymbol
|
|
12556
|
+
] })
|
|
12557
|
+
] })
|
|
12558
|
+
] })
|
|
12559
|
+
]
|
|
12560
|
+
}
|
|
12561
|
+
),
|
|
12562
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full mt-8 flex flex-col gap-3", children: [
|
|
12563
|
+
/* @__PURE__ */ jsx(SecondaryButton, { onClick: onCancel, "data-test-id": "onchain-withdraw-failed-cancel", children: labels.cancelLabel }),
|
|
12564
|
+
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onTryAgain, "data-test-id": "onchain-withdraw-failed-retry", children: labels.tryAgainLabel })
|
|
12565
|
+
] })
|
|
12566
|
+
] }) })
|
|
12567
|
+
]
|
|
12568
|
+
}
|
|
12569
|
+
);
|
|
12570
|
+
}
|
|
12571
|
+
var OnchainWithdrawProcessingSimpleView = ({
|
|
12572
|
+
onClose: _onClose
|
|
12573
|
+
}) => {
|
|
12574
|
+
return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
12575
|
+
EarnFeedbackOverlaySimpleView,
|
|
12576
|
+
{
|
|
12577
|
+
variant: "loading",
|
|
12578
|
+
title: "PROCESSANDO SAQUE...",
|
|
12579
|
+
subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada."
|
|
12580
|
+
}
|
|
12581
|
+
) });
|
|
12582
|
+
};
|
|
12583
|
+
function WithdrawSignatureWarningIcon() {
|
|
12584
|
+
return /* @__PURE__ */ jsx(
|
|
12585
|
+
"div",
|
|
12586
|
+
{
|
|
12587
|
+
className: "w-20 h-20 rounded-full flex items-center justify-center",
|
|
12588
|
+
style: { background: "linear-gradient(180deg, #F6A700 0%, #F59E0B 100%)" },
|
|
12589
|
+
"data-test-id": "withdraw-signature-warning-icon",
|
|
12590
|
+
"data-slot": "withdraw-signature-warning-icon",
|
|
12591
|
+
children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
12592
|
+
"path",
|
|
12593
|
+
{
|
|
12594
|
+
d: "M12 9V13M12 17H12.01M10.29 3.86L1.82 18A2 2 0 003.54 21H20.46A2 2 0 0022.18 18L13.71 3.86A2 2 0 0010.29 3.86Z",
|
|
12595
|
+
stroke: "#121212",
|
|
12596
|
+
strokeWidth: "2",
|
|
12597
|
+
strokeLinecap: "round",
|
|
12598
|
+
strokeLinejoin: "round"
|
|
12599
|
+
}
|
|
12600
|
+
) })
|
|
12601
|
+
}
|
|
12602
|
+
);
|
|
12603
|
+
}
|
|
12604
|
+
function OnchainWithdrawSignatureWarningView({
|
|
12605
|
+
tokenSymbol,
|
|
12606
|
+
tokenLogoURI,
|
|
12607
|
+
formattedAmount,
|
|
12608
|
+
chainName,
|
|
12609
|
+
chainIconUrl,
|
|
12610
|
+
destinationAddress,
|
|
12611
|
+
blockchainCost,
|
|
12612
|
+
onCancel,
|
|
12613
|
+
onTryAgain,
|
|
12614
|
+
className
|
|
12615
|
+
}) {
|
|
12616
|
+
const [showDetails, setShowDetails] = useState(true);
|
|
12617
|
+
return /* @__PURE__ */ jsxs(
|
|
12618
|
+
"div",
|
|
12619
|
+
{
|
|
12620
|
+
className: twMerge(
|
|
12621
|
+
"w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded",
|
|
12622
|
+
className
|
|
12623
|
+
),
|
|
12624
|
+
"data-test-id": "onchain-withdraw-signature-warning-view",
|
|
12625
|
+
children: [
|
|
12626
|
+
/* @__PURE__ */ jsx(
|
|
12627
|
+
"button",
|
|
12628
|
+
{
|
|
12629
|
+
onClick: onCancel,
|
|
12630
|
+
className: "absolute top-4 right-4 flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
|
|
12631
|
+
"aria-label": "Fechar",
|
|
12632
|
+
"data-test-id": "onchain-withdraw-signature-warning-close",
|
|
12633
|
+
children: /* @__PURE__ */ jsx(MdOutlineClose, { className: "w-6 h-6" })
|
|
12634
|
+
}
|
|
12635
|
+
),
|
|
12636
|
+
/* @__PURE__ */ jsx("div", { className: "p-6 lg:p-12", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full items-center", children: [
|
|
12637
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
12638
|
+
/* @__PURE__ */ jsx(WithdrawSignatureWarningIcon, {}),
|
|
12639
|
+
/* @__PURE__ */ jsx(
|
|
12640
|
+
"h2",
|
|
12641
|
+
{
|
|
12642
|
+
className: "text-[28px] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-[color:var(--deframe-widget-color-text-primary)] leading-tight",
|
|
12643
|
+
"data-test-id": "onchain-withdraw-signature-warning-title",
|
|
12644
|
+
children: "Saque n\xE3o assinado"
|
|
12645
|
+
}
|
|
12646
|
+
),
|
|
12647
|
+
/* @__PURE__ */ jsx(
|
|
12648
|
+
"p",
|
|
12649
|
+
{
|
|
12650
|
+
className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center",
|
|
12651
|
+
"data-test-id": "onchain-withdraw-signature-warning-subtitle",
|
|
12652
|
+
children: "A assinatura da transa\xE7\xE3o foi cancelada. Nenhum valor foi enviado."
|
|
12653
|
+
}
|
|
12654
|
+
)
|
|
12655
|
+
] }),
|
|
12656
|
+
/* @__PURE__ */ jsx(
|
|
12657
|
+
"div",
|
|
12658
|
+
{
|
|
12659
|
+
className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12660
|
+
"data-test-id": "onchain-withdraw-signature-warning-summary",
|
|
12661
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
|
|
12662
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0", "data-test-id": "onchain-withdraw-signature-warning-token-icon", children: [
|
|
12663
|
+
/* @__PURE__ */ jsx("div", { className: "w-[32px] h-[32px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden", children: tokenLogoURI ? /* @__PURE__ */ jsx("img", { src: tokenLogoURI, alt: tokenSymbol, className: "w-[32px] h-[32px] object-cover" }) : /* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-bold)]", children: tokenSymbol.slice(0, 2).toUpperCase() }) }),
|
|
12664
|
+
chainIconUrl && /* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1", children: /* @__PURE__ */ jsx(
|
|
12665
|
+
"img",
|
|
12666
|
+
{
|
|
12667
|
+
src: chainIconUrl,
|
|
12668
|
+
alt: chainName,
|
|
12669
|
+
className: "w-[16px] h-[16px] rounded-full object-cover",
|
|
12670
|
+
"data-test-id": "onchain-withdraw-signature-warning-chain-icon"
|
|
12671
|
+
}
|
|
12672
|
+
) })
|
|
12673
|
+
] }),
|
|
12674
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
12675
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px]", children: [
|
|
12676
|
+
/* @__PURE__ */ jsx(
|
|
12677
|
+
"span",
|
|
12678
|
+
{
|
|
12679
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12680
|
+
"data-test-id": "onchain-withdraw-signature-warning-sending-label",
|
|
12681
|
+
children: "Voc\xEA est\xE1 enviando"
|
|
12682
|
+
}
|
|
12683
|
+
),
|
|
12684
|
+
/* @__PURE__ */ jsxs(
|
|
12685
|
+
"span",
|
|
12686
|
+
{
|
|
12687
|
+
className: "text-[20px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-tight",
|
|
12688
|
+
"data-test-id": "onchain-withdraw-signature-warning-amount",
|
|
12689
|
+
children: [
|
|
12690
|
+
formattedAmount,
|
|
12691
|
+
" ",
|
|
12692
|
+
tokenSymbol
|
|
12693
|
+
]
|
|
12694
|
+
}
|
|
12695
|
+
)
|
|
12696
|
+
] }),
|
|
12697
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[4px] mt-4", children: [
|
|
12698
|
+
/* @__PURE__ */ jsx(
|
|
12699
|
+
"span",
|
|
12700
|
+
{
|
|
12701
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12702
|
+
"data-test-id": "onchain-withdraw-signature-warning-destination-label",
|
|
12703
|
+
children: "Para o endere\xE7o"
|
|
12704
|
+
}
|
|
12705
|
+
),
|
|
12706
|
+
/* @__PURE__ */ jsx(
|
|
12707
|
+
"span",
|
|
12708
|
+
{
|
|
12709
|
+
className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] break-all leading-snug",
|
|
12710
|
+
"data-test-id": "onchain-withdraw-signature-warning-destination-address",
|
|
12711
|
+
children: destinationAddress
|
|
12712
|
+
}
|
|
12713
|
+
)
|
|
12714
|
+
] })
|
|
12715
|
+
] })
|
|
12716
|
+
] })
|
|
12717
|
+
}
|
|
12718
|
+
),
|
|
12719
|
+
/* @__PURE__ */ jsxs(
|
|
12720
|
+
"div",
|
|
12721
|
+
{
|
|
12722
|
+
className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
|
|
12723
|
+
"data-test-id": "onchain-withdraw-signature-warning-details",
|
|
12724
|
+
children: [
|
|
12725
|
+
/* @__PURE__ */ jsxs(
|
|
12726
|
+
"button",
|
|
12727
|
+
{
|
|
12728
|
+
onClick: () => setShowDetails(!showDetails),
|
|
12729
|
+
className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
|
|
12730
|
+
"aria-label": "Detalhes da transa\xE7\xE3o",
|
|
12731
|
+
"data-test-id": "onchain-withdraw-signature-warning-details-toggle",
|
|
12732
|
+
children: [
|
|
12733
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: "Detalhes da transa\xE7\xE3o" }),
|
|
12734
|
+
/* @__PURE__ */ jsx(
|
|
12735
|
+
MdOutlineExpandMore,
|
|
12736
|
+
{
|
|
12737
|
+
className: twMerge(
|
|
12738
|
+
"transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12739
|
+
showDetails && "rotate-180"
|
|
12740
|
+
)
|
|
12741
|
+
}
|
|
12742
|
+
)
|
|
12743
|
+
]
|
|
12744
|
+
}
|
|
12745
|
+
),
|
|
12746
|
+
showDetails && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", "data-test-id": "onchain-withdraw-signature-warning-details-content", children: [
|
|
12747
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
|
|
12748
|
+
/* @__PURE__ */ jsx(
|
|
12749
|
+
"span",
|
|
12750
|
+
{
|
|
12751
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12752
|
+
"data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-label",
|
|
12753
|
+
children: "Valor de retirada"
|
|
12754
|
+
}
|
|
12755
|
+
),
|
|
12756
|
+
/* @__PURE__ */ jsxs(
|
|
12757
|
+
"span",
|
|
12758
|
+
{
|
|
12759
|
+
className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
12760
|
+
"data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-value",
|
|
12761
|
+
children: [
|
|
12762
|
+
formattedAmount,
|
|
12763
|
+
" ",
|
|
12764
|
+
tokenSymbol
|
|
12765
|
+
]
|
|
12766
|
+
}
|
|
12767
|
+
)
|
|
12768
|
+
] }),
|
|
12769
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
|
|
12770
|
+
/* @__PURE__ */ jsx(
|
|
12771
|
+
"span",
|
|
12772
|
+
{
|
|
12773
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12774
|
+
"data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-label",
|
|
12775
|
+
children: "Custo da blockchain"
|
|
12776
|
+
}
|
|
12777
|
+
),
|
|
12778
|
+
/* @__PURE__ */ jsx(
|
|
12779
|
+
"span",
|
|
12780
|
+
{
|
|
12781
|
+
className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
12782
|
+
"data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-value",
|
|
12783
|
+
children: blockchainCost
|
|
12784
|
+
}
|
|
12785
|
+
)
|
|
12786
|
+
] }),
|
|
12787
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
12788
|
+
/* @__PURE__ */ jsx(
|
|
12789
|
+
"span",
|
|
12790
|
+
{
|
|
12791
|
+
className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12792
|
+
"data-test-id": "onchain-withdraw-signature-warning-receive-label",
|
|
12793
|
+
children: "Voc\xEA receber\xE1"
|
|
12794
|
+
}
|
|
12795
|
+
),
|
|
12796
|
+
/* @__PURE__ */ jsxs(
|
|
12797
|
+
"span",
|
|
12798
|
+
{
|
|
12799
|
+
className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
12800
|
+
"data-test-id": "onchain-withdraw-signature-warning-receive-value",
|
|
12801
|
+
children: [
|
|
12802
|
+
formattedAmount,
|
|
12803
|
+
" ",
|
|
12804
|
+
tokenSymbol
|
|
12805
|
+
]
|
|
12806
|
+
}
|
|
12807
|
+
)
|
|
12808
|
+
] })
|
|
12809
|
+
] })
|
|
12810
|
+
]
|
|
12811
|
+
}
|
|
12812
|
+
),
|
|
12813
|
+
/* @__PURE__ */ jsxs(
|
|
12814
|
+
"div",
|
|
12815
|
+
{
|
|
12816
|
+
className: "w-full mt-8 flex gap-3",
|
|
12817
|
+
"data-test-id": "onchain-withdraw-signature-warning-actions",
|
|
12818
|
+
children: [
|
|
12819
|
+
/* @__PURE__ */ jsx(
|
|
12820
|
+
SecondaryButton,
|
|
12821
|
+
{
|
|
12822
|
+
className: "flex-1",
|
|
12823
|
+
onClick: onCancel,
|
|
12824
|
+
"data-test-id": "onchain-withdraw-signature-warning-cancel",
|
|
12825
|
+
children: "Cancelar"
|
|
12826
|
+
}
|
|
12827
|
+
),
|
|
12828
|
+
/* @__PURE__ */ jsx(
|
|
12829
|
+
PrimaryButton,
|
|
12830
|
+
{
|
|
12831
|
+
className: "flex-1",
|
|
12832
|
+
onClick: onTryAgain,
|
|
12833
|
+
"data-test-id": "onchain-withdraw-signature-warning-retry",
|
|
12834
|
+
children: "Tente novamente"
|
|
12835
|
+
}
|
|
12836
|
+
)
|
|
12837
|
+
]
|
|
12838
|
+
}
|
|
12839
|
+
)
|
|
12840
|
+
] }) })
|
|
12841
|
+
]
|
|
12842
|
+
}
|
|
12843
|
+
);
|
|
12844
|
+
}
|
|
12845
|
+
var OnchainWithdrawSignatureWarningSimpleView = ({
|
|
12846
|
+
onCancel
|
|
12847
|
+
}) => {
|
|
12848
|
+
React6.useEffect(() => {
|
|
12849
|
+
if (!onCancel) return;
|
|
12850
|
+
const timer = setTimeout(onCancel, 5e3);
|
|
12851
|
+
return () => clearTimeout(timer);
|
|
12852
|
+
}, [onCancel]);
|
|
12853
|
+
return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-withdraw-signature-warning-simple-view", children: /* @__PURE__ */ jsx(
|
|
12854
|
+
EarnFeedbackOverlaySimpleView,
|
|
12855
|
+
{
|
|
12856
|
+
variant: "warning",
|
|
12857
|
+
title: "Saque n\xE3o assinado",
|
|
12858
|
+
subtitle: "A assinatura da transa\xE7\xE3o foi cancelada."
|
|
12859
|
+
}
|
|
12860
|
+
) });
|
|
12861
|
+
};
|
|
10831
12862
|
var DashboardCard = ({ children, className }) => {
|
|
10832
12863
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "dashboard-card", className: twMerge("bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children });
|
|
10833
12864
|
};
|
|
@@ -12113,6 +14144,6 @@ var DashboardViewSimple = ({
|
|
|
12113
14144
|
);
|
|
12114
14145
|
};
|
|
12115
14146
|
|
|
12116
|
-
export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, ChooseANetworkView, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, ChooseNetworkAndAssetViewSimple, CloseButton_default as CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConfirmSwapButtonViewSimple, ConnectWalletList, Currency, DashboardBalancesBreakdown, DashboardCard, DashboardInvestmentOpportunitiesView, DashboardPortfolioView, DashboardPortfolioViewSimple, DashboardRecentTransactionsView, DashboardRecentTransactionsViewSimple, DashboardStrategiesListView, DashboardTokenListView, DashboardTokensView, DashboardTokensViewSimple, DashboardTransactionsPlaceholder, DashboardView, DashboardViewSimple, DeframeComponentsProvider, DetailsHeader, EarnAmountInputView, EarnBalanceCard, EarnBytecodeErrorView, EarnDepositFailedSimpleView, EarnDepositFailedView, EarnDepositFormView, EarnDepositFormViewSimple, EarnDepositProcessingSimpleView, EarnDepositProcessingView, EarnDepositSuccessSimpleView, EarnDepositSuccessView, EarnDepositWarningSimpleView, EarnDepositWarningView, EarnDesktopView, EarnExploreGridView, EarnFlowSkeletonSimple, EarnInvestedSectionView, EarnInvestmentDetailsView, EarnInvestmentSummaryView, EarnNoBalanceNotificationView, EarnOverviewView, EarnPercentageButtonsView, EarnPositionCardView, EarnRecentTransactionsView, EarnTokenSelectorView, EarnTxStatusCardView, EarnWithdrawFailedSimpleView, EarnWithdrawFailedView, EarnWithdrawFormView, EarnWithdrawFormViewSimple, EarnWithdrawProcessingSimpleView, EarnWithdrawProcessingView, EarnWithdrawSuccessSimpleView, EarnWithdrawSuccessView, EarnWithdrawTokenSelectorView, EarnWithdrawWarningSimpleView, EarnWithdrawWarningView, Currency as Fiat, FlexCol, FlexRow, GroupedStrategyListView, HighRiskBadge, HistoryDepositDetailsView, HistoryListSkeleton, HistoryListView, HistorySwapDetailsView, HistoryTabEmpty, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, InvestmentCrossChainProcessingView, Label, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, PercentageButton, PrimaryButton, ProcessingBadge, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, StrategyGridCard, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFormViewSimple, SwapFromCardView, SwapFromCardViewSimple, SwapHistoryView, SwapProcessingView, SwapProcessingViewSimple, SwapQuoteDetailsView, SwapSignatureWarningView, SwapSignatureWarningViewSimple, SwapSuccessView, SwapSuccessViewSimple, SwapToCardView, SwapToCardViewSimple, SwapTransactionFailedView, SwapTransactionFailedViewSimple, SwapWidgetFallbackView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletBalances, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer, isDustValue };
|
|
14147
|
+
export { ActionButton, ActionSheet, AddressDisplay, ApyRange, BackButton, BackgroundContainer, BannerNotification, Chip, ChipGroup, ChooseANetworkView, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, ChooseNetworkAndAssetViewSimple, CloseButton_default as CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConfirmSwapButtonViewSimple, ConnectWalletList, Currency, DashboardBalancesBreakdown, DashboardCard, DashboardInvestmentOpportunitiesView, DashboardPortfolioView, DashboardPortfolioViewSimple, DashboardRecentTransactionsView, DashboardRecentTransactionsViewSimple, DashboardStrategiesListView, DashboardTokenListView, DashboardTokensView, DashboardTokensViewSimple, DashboardTransactionsPlaceholder, DashboardView, DashboardViewSimple, DeframeComponentsProvider, DepositSuccessIcon, DetailsHeader, EarnAmountInputView, EarnBalanceCard, EarnBytecodeErrorView, EarnDepositFailedSimpleView, EarnDepositFailedView, EarnDepositFormView, EarnDepositFormViewSimple, EarnDepositProcessingSimpleView, EarnDepositProcessingView, EarnDepositSuccessSimpleView, EarnDepositSuccessView, EarnDepositWarningSimpleView, EarnDepositWarningView, EarnDesktopView, EarnExploreGridView, EarnFlowSkeletonSimple, EarnInvestedSectionView, EarnInvestmentDetailsView, EarnInvestmentSummaryView, EarnNoBalanceNotificationView, EarnOverviewView, EarnPercentageButtonsView, EarnPositionCardView, EarnRecentTransactionsView, EarnTokenSelectorView, EarnTxStatusCardView, EarnWithdrawFailedSimpleView, EarnWithdrawFailedView, EarnWithdrawFormView, EarnWithdrawFormViewSimple, EarnWithdrawProcessingSimpleView, EarnWithdrawProcessingView, EarnWithdrawSuccessSimpleView, EarnWithdrawSuccessView, EarnWithdrawTokenSelectorView, EarnWithdrawWarningSimpleView, EarnWithdrawWarningView, Currency as Fiat, FlexCol, FlexRow, GroupedStrategyListView, HighRiskBadge, HistoryDepositDetailsView, HistoryListSkeleton, HistoryListView, HistorySwapDetailsView, HistoryTabEmpty, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, InvestmentCrossChainProcessingView, Label, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, OnchainDepositFormSimpleView, OnchainDepositFormView, OnchainDepositSuccessSimpleView, OnchainDepositSuccessView, OnchainWithdrawChainSelectorView, OnchainWithdrawFailedView, OnchainWithdrawFormSimpleView, OnchainWithdrawFormView, OnchainWithdrawProcessingSimpleView, OnchainWithdrawSignatureWarningSimpleView, OnchainWithdrawSignatureWarningView, OnchainWithdrawSuccessView, PercentageButton, PrimaryButton, ProcessingBadge, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, StrategyGridCard, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFormViewSimple, SwapFromCardView, SwapFromCardViewSimple, SwapHistoryView, SwapProcessingView, SwapProcessingViewSimple, SwapQuoteDetailsView, SwapSignatureWarningView, SwapSignatureWarningViewSimple, SwapSuccessView, SwapSuccessViewSimple, SwapToCardView, SwapToCardViewSimple, SwapTransactionFailedView, SwapTransactionFailedViewSimple, SwapWidgetFallbackView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletBalances, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer, WithdrawFailedIcon, WithdrawSuccessIcon, isDustValue, truncateAddress };
|
|
12117
14148
|
//# sourceMappingURL=index.mjs.map
|
|
12118
14149
|
//# sourceMappingURL=index.mjs.map
|