@deframe-sdk/components 0.1.70 → 0.1.72
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 +57 -4
- package/dist/index.d.ts +57 -4
- package/dist/index.js +201 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -25
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { HiXMark, HiChevronUp, HiChevronDown, HiChevronLeft, HiOutlineClock, HiA
|
|
|
4
4
|
import * as React6 from 'react';
|
|
5
5
|
import React6__default, { useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
6
6
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
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';
|
|
7
|
+
import { MdClose, MdOutlineSearch, MdOutlineSearchOff, MdOutlineSwapHoriz, MdHistory, MdOutlineSwapVert, MdArrowRight, MdArrowDropDown, MdOutlineArrowBack, MdOutlineArrowDropDown, MdOutlineClose, MdContentCopy, MdOutlineExpandMore, MdQrCodeScanner, MdOutlineArrowUpward, MdOutlineArrowDownward, MdCheckCircleOutline, MdErrorOutline, MdWarningAmber, MdInfoOutline, MdAccessTime, 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
10
|
import QRCode from 'react-qr-code';
|
|
@@ -4822,6 +4822,28 @@ function SkeletonCard({ testId, symbol, network, amount, usd, balance }) {
|
|
|
4822
4822
|
}
|
|
4823
4823
|
);
|
|
4824
4824
|
}
|
|
4825
|
+
function useBackgroundConfirmationTransition({
|
|
4826
|
+
enabled,
|
|
4827
|
+
started,
|
|
4828
|
+
slowAfterMs = 5e3,
|
|
4829
|
+
dismissAfterSlowMs = 3e3,
|
|
4830
|
+
onDismiss
|
|
4831
|
+
}) {
|
|
4832
|
+
const [phase, setPhase] = useState("initial");
|
|
4833
|
+
useEffect(() => {
|
|
4834
|
+
if (!enabled || !started) return;
|
|
4835
|
+
if (phase !== "initial") return;
|
|
4836
|
+
const id = window.setTimeout(() => setPhase("background-confirmation"), slowAfterMs);
|
|
4837
|
+
return () => window.clearTimeout(id);
|
|
4838
|
+
}, [enabled, started, phase, slowAfterMs]);
|
|
4839
|
+
useEffect(() => {
|
|
4840
|
+
if (phase !== "background-confirmation") return;
|
|
4841
|
+
if (!onDismiss) return;
|
|
4842
|
+
const id = window.setTimeout(() => onDismiss(), dismissAfterSlowMs);
|
|
4843
|
+
return () => window.clearTimeout(id);
|
|
4844
|
+
}, [phase, dismissAfterSlowMs, onDismiss]);
|
|
4845
|
+
return { phase };
|
|
4846
|
+
}
|
|
4825
4847
|
function LoadingIcon() {
|
|
4826
4848
|
const green = "var(--deframe-widget-color-brand-primary)";
|
|
4827
4849
|
const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
|
|
@@ -4882,10 +4904,42 @@ function LoadingIcon() {
|
|
|
4882
4904
|
}
|
|
4883
4905
|
);
|
|
4884
4906
|
}
|
|
4907
|
+
function SlowIcon() {
|
|
4908
|
+
return /* @__PURE__ */ jsx(
|
|
4909
|
+
motion.div,
|
|
4910
|
+
{
|
|
4911
|
+
"data-test-id": "swap-processing-simple-background-confirmation-icon",
|
|
4912
|
+
initial: { scale: 0.7, opacity: 0 },
|
|
4913
|
+
animate: { scale: 1, opacity: 1 },
|
|
4914
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
4915
|
+
className: "flex items-center justify-center shrink-0 w-[56px] h-[56px]",
|
|
4916
|
+
"aria-hidden": "true",
|
|
4917
|
+
children: /* @__PURE__ */ jsx(
|
|
4918
|
+
MdAccessTime,
|
|
4919
|
+
{
|
|
4920
|
+
size: 56,
|
|
4921
|
+
color: "var(--deframe-widget-color-brand-primary)"
|
|
4922
|
+
}
|
|
4923
|
+
)
|
|
4924
|
+
}
|
|
4925
|
+
);
|
|
4926
|
+
}
|
|
4885
4927
|
var SwapProcessingViewSimple = ({
|
|
4886
4928
|
titleText,
|
|
4887
|
-
descriptionPrefix
|
|
4929
|
+
descriptionPrefix,
|
|
4930
|
+
allowBackgroundConfirmation = false,
|
|
4931
|
+
backgroundConfirmationStarted = false,
|
|
4932
|
+
backgroundConfirmationLabels,
|
|
4933
|
+
onBackgroundConfirmationDismiss
|
|
4888
4934
|
}) => {
|
|
4935
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
4936
|
+
enabled: allowBackgroundConfirmation,
|
|
4937
|
+
started: backgroundConfirmationStarted,
|
|
4938
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
4939
|
+
});
|
|
4940
|
+
const isBackgroundConfirmation = phase === "background-confirmation" && backgroundConfirmationLabels !== void 0;
|
|
4941
|
+
const renderedTitle = isBackgroundConfirmation ? backgroundConfirmationLabels.title : titleText;
|
|
4942
|
+
const renderedSubtitle = isBackgroundConfirmation ? backgroundConfirmationLabels.subtitle : descriptionPrefix;
|
|
4889
4943
|
return /* @__PURE__ */ jsxs(
|
|
4890
4944
|
"div",
|
|
4891
4945
|
{
|
|
@@ -4915,7 +4969,7 @@ var SwapProcessingViewSimple = ({
|
|
|
4915
4969
|
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
4916
4970
|
),
|
|
4917
4971
|
children: [
|
|
4918
|
-
/* @__PURE__ */ jsx(LoadingIcon, {}),
|
|
4972
|
+
isBackgroundConfirmation ? /* @__PURE__ */ jsx(SlowIcon, {}) : /* @__PURE__ */ jsx(LoadingIcon, {}),
|
|
4919
4973
|
/* @__PURE__ */ jsxs(
|
|
4920
4974
|
"div",
|
|
4921
4975
|
{
|
|
@@ -4925,20 +4979,20 @@ var SwapProcessingViewSimple = ({
|
|
|
4925
4979
|
/* @__PURE__ */ jsx(
|
|
4926
4980
|
"span",
|
|
4927
4981
|
{
|
|
4928
|
-
"data-test-id": "swap-processing-simple-title",
|
|
4982
|
+
"data-test-id": isBackgroundConfirmation ? "swap-processing-simple-background-confirmation-title" : "swap-processing-simple-title",
|
|
4929
4983
|
className: twMerge(
|
|
4930
4984
|
"[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase",
|
|
4931
4985
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
4932
4986
|
"font-[var(--deframe-widget-font-family)]",
|
|
4933
4987
|
"text-[color:var(--deframe-widget-color-brand-primary)]"
|
|
4934
4988
|
),
|
|
4935
|
-
children:
|
|
4989
|
+
children: renderedTitle
|
|
4936
4990
|
}
|
|
4937
4991
|
),
|
|
4938
4992
|
/* @__PURE__ */ jsx(
|
|
4939
4993
|
"span",
|
|
4940
4994
|
{
|
|
4941
|
-
"data-test-id": "swap-processing-simple-subtitle",
|
|
4995
|
+
"data-test-id": isBackgroundConfirmation ? "swap-processing-simple-background-confirmation-subtitle" : "swap-processing-simple-subtitle",
|
|
4942
4996
|
className: twMerge(
|
|
4943
4997
|
"[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
|
|
4944
4998
|
"[font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
@@ -4946,7 +5000,7 @@ var SwapProcessingViewSimple = ({
|
|
|
4946
5000
|
"text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
4947
5001
|
"max-w-[260px]"
|
|
4948
5002
|
),
|
|
4949
|
-
children:
|
|
5003
|
+
children: renderedSubtitle
|
|
4950
5004
|
}
|
|
4951
5005
|
)
|
|
4952
5006
|
]
|
|
@@ -5062,12 +5116,20 @@ var SwapCrossChainProcessingView = ({
|
|
|
5062
5116
|
};
|
|
5063
5117
|
var SwapCrossChainProcessingViewSimple = ({
|
|
5064
5118
|
title,
|
|
5065
|
-
description
|
|
5119
|
+
description,
|
|
5120
|
+
allowBackgroundConfirmation,
|
|
5121
|
+
backgroundConfirmationStarted,
|
|
5122
|
+
backgroundConfirmationLabels,
|
|
5123
|
+
onBackgroundConfirmationDismiss
|
|
5066
5124
|
}) => /* @__PURE__ */ jsx(
|
|
5067
5125
|
SwapProcessingViewSimple,
|
|
5068
5126
|
{
|
|
5069
5127
|
titleText: title,
|
|
5070
|
-
descriptionPrefix: description
|
|
5128
|
+
descriptionPrefix: description,
|
|
5129
|
+
allowBackgroundConfirmation,
|
|
5130
|
+
backgroundConfirmationStarted,
|
|
5131
|
+
backgroundConfirmationLabels,
|
|
5132
|
+
onBackgroundConfirmationDismiss
|
|
5071
5133
|
}
|
|
5072
5134
|
);
|
|
5073
5135
|
var InvestmentCrossChainProcessingView = ({
|
|
@@ -5260,9 +5322,14 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5260
5322
|
variant,
|
|
5261
5323
|
title,
|
|
5262
5324
|
subtitle,
|
|
5263
|
-
formData
|
|
5325
|
+
formData,
|
|
5326
|
+
phase = "initial",
|
|
5327
|
+
backgroundConfirmationLabels
|
|
5264
5328
|
}) {
|
|
5265
|
-
const
|
|
5329
|
+
const isBackgroundConfirmation = phase === "background-confirmation" && variant === "loading" && backgroundConfirmationLabels !== void 0;
|
|
5330
|
+
const renderedTitle = isBackgroundConfirmation ? backgroundConfirmationLabels.title : title;
|
|
5331
|
+
const renderedSubtitle = isBackgroundConfirmation ? backgroundConfirmationLabels.subtitle : subtitle;
|
|
5332
|
+
const isLoading = variant === "loading" && !isBackgroundConfirmation;
|
|
5266
5333
|
const wrapperClasses = twMerge(
|
|
5267
5334
|
"relative flex flex-col overflow-hidden w-[420px]",
|
|
5268
5335
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -5283,7 +5350,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5283
5350
|
"gap-[var(--deframe-widget-size-gap-sm)] text-center"
|
|
5284
5351
|
);
|
|
5285
5352
|
const titleClasses2 = twMerge(
|
|
5286
|
-
isLoading ? "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[22px] font-bold text-[color:var(--deframe-widget-color-text-primary)] leading-[1.25]"
|
|
5353
|
+
isLoading || isBackgroundConfirmation ? "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[22px] font-bold text-[color:var(--deframe-widget-color-text-primary)] leading-[1.25]"
|
|
5287
5354
|
);
|
|
5288
5355
|
const subtitleClasses = twMerge(
|
|
5289
5356
|
"[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
|
|
@@ -5311,6 +5378,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5311
5378
|
transition: { duration: 0.2 },
|
|
5312
5379
|
className: overlayClasses,
|
|
5313
5380
|
children: [
|
|
5381
|
+
isBackgroundConfirmation && /* @__PURE__ */ jsx(SlowIcon2, {}),
|
|
5314
5382
|
isLoading && /* @__PURE__ */ jsx(LoadingIcon2, {}),
|
|
5315
5383
|
variant === "success" && /* @__PURE__ */ jsx(SuccessIcon, {}),
|
|
5316
5384
|
variant === "warning" && /* @__PURE__ */ jsx(WarningIcon, {}),
|
|
@@ -5325,19 +5393,19 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5325
5393
|
/* @__PURE__ */ jsx(
|
|
5326
5394
|
"span",
|
|
5327
5395
|
{
|
|
5328
|
-
"data-test-id": "earn-feedback-title",
|
|
5396
|
+
"data-test-id": isBackgroundConfirmation ? "earn-feedback-background-confirmation-title" : "earn-feedback-title",
|
|
5329
5397
|
"data-slot": "earn-feedback-title",
|
|
5330
5398
|
className: titleClasses2,
|
|
5331
|
-
children:
|
|
5399
|
+
children: renderedTitle
|
|
5332
5400
|
}
|
|
5333
5401
|
),
|
|
5334
|
-
|
|
5402
|
+
renderedSubtitle && /* @__PURE__ */ jsx(
|
|
5335
5403
|
"span",
|
|
5336
5404
|
{
|
|
5337
|
-
"data-test-id": "earn-feedback-subtitle",
|
|
5405
|
+
"data-test-id": isBackgroundConfirmation ? "earn-feedback-background-confirmation-subtitle" : "earn-feedback-subtitle",
|
|
5338
5406
|
"data-slot": "earn-feedback-subtitle",
|
|
5339
5407
|
className: subtitleClasses,
|
|
5340
|
-
children:
|
|
5408
|
+
children: renderedSubtitle
|
|
5341
5409
|
}
|
|
5342
5410
|
)
|
|
5343
5411
|
]
|
|
@@ -5351,6 +5419,27 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5351
5419
|
}
|
|
5352
5420
|
);
|
|
5353
5421
|
}
|
|
5422
|
+
function SlowIcon2() {
|
|
5423
|
+
return /* @__PURE__ */ jsx(
|
|
5424
|
+
motion.div,
|
|
5425
|
+
{
|
|
5426
|
+
"data-test-id": "earn-feedback-background-confirmation-icon",
|
|
5427
|
+
"data-slot": "earn-feedback-background-confirmation-icon",
|
|
5428
|
+
initial: { scale: 0.7, opacity: 0 },
|
|
5429
|
+
animate: { scale: 1, opacity: 1 },
|
|
5430
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
5431
|
+
className: "flex items-center justify-center shrink-0 w-[56px] h-[56px]",
|
|
5432
|
+
"aria-hidden": "true",
|
|
5433
|
+
children: /* @__PURE__ */ jsx(
|
|
5434
|
+
MdAccessTime,
|
|
5435
|
+
{
|
|
5436
|
+
size: 56,
|
|
5437
|
+
color: "var(--deframe-widget-color-brand-primary)"
|
|
5438
|
+
}
|
|
5439
|
+
)
|
|
5440
|
+
}
|
|
5441
|
+
);
|
|
5442
|
+
}
|
|
5354
5443
|
function LoadingIcon2() {
|
|
5355
5444
|
const green = "var(--deframe-widget-color-brand-primary)";
|
|
5356
5445
|
const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
|
|
@@ -5589,14 +5678,25 @@ var InvestmentCrossChainProcessingSimpleView = ({
|
|
|
5589
5678
|
strategyName,
|
|
5590
5679
|
strategyIcon,
|
|
5591
5680
|
amountToken,
|
|
5592
|
-
amountUSD
|
|
5681
|
+
amountUSD,
|
|
5682
|
+
allowBackgroundConfirmation = false,
|
|
5683
|
+
backgroundConfirmationStarted = false,
|
|
5684
|
+
backgroundConfirmationLabels,
|
|
5685
|
+
onBackgroundConfirmationDismiss
|
|
5593
5686
|
}) => {
|
|
5687
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
5688
|
+
enabled: allowBackgroundConfirmation,
|
|
5689
|
+
started: backgroundConfirmationStarted,
|
|
5690
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
5691
|
+
});
|
|
5594
5692
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "investment-crosschain-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
5595
5693
|
EarnFeedbackOverlaySimpleView,
|
|
5596
5694
|
{
|
|
5597
5695
|
variant: "loading",
|
|
5598
5696
|
title,
|
|
5599
5697
|
subtitle: description,
|
|
5698
|
+
phase,
|
|
5699
|
+
backgroundConfirmationLabels,
|
|
5600
5700
|
formData: {
|
|
5601
5701
|
headerTitle: title,
|
|
5602
5702
|
tokenSymbol: strategyName,
|
|
@@ -9692,6 +9792,32 @@ function StatusBadge2({ status, labels, className }) {
|
|
|
9692
9792
|
}
|
|
9693
9793
|
);
|
|
9694
9794
|
}
|
|
9795
|
+
var explorerLinkClass = "text-[color:var(--deframe-widget-color-brand-primary)] underline text-[12px] leading-none [font-weight:var(--deframe-widget-font-weight-semibold)]";
|
|
9796
|
+
function renderExplorerLink(tx) {
|
|
9797
|
+
return /* @__PURE__ */ jsx(
|
|
9798
|
+
"a",
|
|
9799
|
+
{
|
|
9800
|
+
"data-test-id": "history-list-item-simple-explorer",
|
|
9801
|
+
href: tx.explorerUrl,
|
|
9802
|
+
target: "_blank",
|
|
9803
|
+
rel: "noopener noreferrer",
|
|
9804
|
+
className: explorerLinkClass,
|
|
9805
|
+
children: tx.label
|
|
9806
|
+
}
|
|
9807
|
+
);
|
|
9808
|
+
}
|
|
9809
|
+
function renderExplorerLinks(transactions) {
|
|
9810
|
+
if (!(transactions == null ? void 0 : transactions.length)) return null;
|
|
9811
|
+
if (transactions.length === 1) return renderExplorerLink(transactions[0]);
|
|
9812
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)] flex-wrap", children: transactions.map((tx, i) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
9813
|
+
i > 0 && /* @__PURE__ */ jsx("span", { className: "text-[color:var(--deframe-widget-color-text-tertiary)] text-[12px]", children: "\u2192" }),
|
|
9814
|
+
tx.prefix && /* @__PURE__ */ jsxs("span", { className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[12px]", children: [
|
|
9815
|
+
tx.prefix,
|
|
9816
|
+
":"
|
|
9817
|
+
] }),
|
|
9818
|
+
renderExplorerLink(tx)
|
|
9819
|
+
] }, tx.explorerUrl)) });
|
|
9820
|
+
}
|
|
9695
9821
|
var HistoryListItemSimple = ({ item, labels, locale }) => {
|
|
9696
9822
|
const label = historyResolveLabel(item, labels);
|
|
9697
9823
|
const { primary, secondary } = historyResolveAmounts(item);
|
|
@@ -9754,7 +9880,8 @@ var HistoryListItemSimple = ({ item, labels, locale }) => {
|
|
|
9754
9880
|
}
|
|
9755
9881
|
)
|
|
9756
9882
|
] })
|
|
9757
|
-
] })
|
|
9883
|
+
] }),
|
|
9884
|
+
renderExplorerLinks(item.transactions)
|
|
9758
9885
|
]
|
|
9759
9886
|
}
|
|
9760
9887
|
);
|
|
@@ -11250,7 +11377,12 @@ function formatEarnPositions(positions, { currency, locale, formatCurrency }) {
|
|
|
11250
11377
|
const principalUSD = p.spotPosition.underlyingBalanceUSD - p.spotPosition.profitInUSD;
|
|
11251
11378
|
const investedFormatted = isBrlPegged && p.spotPosition.principal ? formatHistoryAssetAmount({ amountHumanized: p.spotPosition.principal.humanized, symbol, currency, locale, formatCurrency }) : formatCurrency(principalUSD);
|
|
11252
11379
|
const totalBrla = isBrlPegged && principalHumanized > 0 && principalUSD > 0 ? p.spotPosition.underlyingBalanceUSD * principalHumanized / principalUSD : null;
|
|
11253
|
-
const totalValueFormatted =
|
|
11380
|
+
const totalValueFormatted = (() => {
|
|
11381
|
+
if (totalBrla !== null) {
|
|
11382
|
+
return totalBrla < 0.01 ? investedFormatted : formatHistoryAssetAmount({ amountHumanized: String(totalBrla), symbol, currency, locale, formatCurrency });
|
|
11383
|
+
}
|
|
11384
|
+
return p.spotPosition.underlyingBalanceUSD < 0.01 ? investedFormatted : formatCurrency(p.spotPosition.underlyingBalanceUSD);
|
|
11385
|
+
})();
|
|
11254
11386
|
return __spreadProps(__spreadValues({}, p), { spotPosition: __spreadProps(__spreadValues({}, p.spotPosition), { investedFormatted, totalValueFormatted }) });
|
|
11255
11387
|
})
|
|
11256
11388
|
});
|
|
@@ -13600,14 +13732,25 @@ var EarnDepositProcessingSimpleView = ({
|
|
|
13600
13732
|
amountToken,
|
|
13601
13733
|
amountUSD,
|
|
13602
13734
|
iconSrc,
|
|
13603
|
-
strategyName
|
|
13735
|
+
strategyName,
|
|
13736
|
+
allowBackgroundConfirmation = false,
|
|
13737
|
+
backgroundConfirmationStarted = false,
|
|
13738
|
+
backgroundConfirmationLabels,
|
|
13739
|
+
onBackgroundConfirmationDismiss
|
|
13604
13740
|
}) => {
|
|
13741
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
13742
|
+
enabled: allowBackgroundConfirmation,
|
|
13743
|
+
started: backgroundConfirmationStarted,
|
|
13744
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
13745
|
+
});
|
|
13605
13746
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "earn-deposit-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
13606
13747
|
EarnFeedbackOverlaySimpleView,
|
|
13607
13748
|
{
|
|
13608
13749
|
variant: "loading",
|
|
13609
13750
|
title,
|
|
13610
13751
|
subtitle: descriptionPrefix,
|
|
13752
|
+
phase,
|
|
13753
|
+
backgroundConfirmationLabels,
|
|
13611
13754
|
formData: {
|
|
13612
13755
|
headerTitle: title,
|
|
13613
13756
|
tokenSymbol: strategyName,
|
|
@@ -13975,14 +14118,25 @@ var EarnWithdrawProcessingSimpleView = ({
|
|
|
13975
14118
|
amountToken,
|
|
13976
14119
|
amountUSD,
|
|
13977
14120
|
iconSrc,
|
|
13978
|
-
strategyName
|
|
14121
|
+
strategyName,
|
|
14122
|
+
allowBackgroundConfirmation = false,
|
|
14123
|
+
backgroundConfirmationStarted = false,
|
|
14124
|
+
backgroundConfirmationLabels,
|
|
14125
|
+
onBackgroundConfirmationDismiss
|
|
13979
14126
|
}) => {
|
|
14127
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
14128
|
+
enabled: allowBackgroundConfirmation,
|
|
14129
|
+
started: backgroundConfirmationStarted,
|
|
14130
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
14131
|
+
});
|
|
13980
14132
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "earn-withdraw-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
13981
14133
|
EarnFeedbackOverlaySimpleView,
|
|
13982
14134
|
{
|
|
13983
14135
|
variant: "loading",
|
|
13984
14136
|
title,
|
|
13985
14137
|
subtitle: descriptionPrefix,
|
|
14138
|
+
phase,
|
|
14139
|
+
backgroundConfirmationLabels,
|
|
13986
14140
|
formData: {
|
|
13987
14141
|
headerTitle: title,
|
|
13988
14142
|
tokenSymbol: strategyName,
|
|
@@ -16059,14 +16213,25 @@ var OnchainWithdrawFailedSimpleView = ({
|
|
|
16059
16213
|
) });
|
|
16060
16214
|
var OnchainWithdrawProcessingSimpleView = ({
|
|
16061
16215
|
onClose: _onClose,
|
|
16062
|
-
formData
|
|
16216
|
+
formData,
|
|
16217
|
+
allowBackgroundConfirmation = false,
|
|
16218
|
+
backgroundConfirmationStarted = false,
|
|
16219
|
+
backgroundConfirmationLabels,
|
|
16220
|
+
onBackgroundConfirmationDismiss
|
|
16063
16221
|
}) => {
|
|
16222
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
16223
|
+
enabled: allowBackgroundConfirmation,
|
|
16224
|
+
started: backgroundConfirmationStarted,
|
|
16225
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
16226
|
+
});
|
|
16064
16227
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
16065
16228
|
EarnFeedbackOverlaySimpleView,
|
|
16066
16229
|
{
|
|
16067
16230
|
variant: "loading",
|
|
16068
16231
|
title: "PROCESSANDO SAQUE...",
|
|
16069
16232
|
subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada.",
|
|
16233
|
+
phase,
|
|
16234
|
+
backgroundConfirmationLabels,
|
|
16070
16235
|
formData
|
|
16071
16236
|
}
|
|
16072
16237
|
) });
|
|
@@ -18150,13 +18315,25 @@ function OfframpProcessingView({
|
|
|
18150
18315
|
}
|
|
18151
18316
|
);
|
|
18152
18317
|
}
|
|
18153
|
-
var OfframpProcessingSimpleView = (
|
|
18318
|
+
var OfframpProcessingSimpleView = ({
|
|
18319
|
+
allowBackgroundConfirmation = false,
|
|
18320
|
+
backgroundConfirmationStarted = false,
|
|
18321
|
+
backgroundConfirmationLabels,
|
|
18322
|
+
onBackgroundConfirmationDismiss
|
|
18323
|
+
}) => {
|
|
18324
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
18325
|
+
enabled: allowBackgroundConfirmation,
|
|
18326
|
+
started: backgroundConfirmationStarted,
|
|
18327
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
18328
|
+
});
|
|
18154
18329
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "offramp-processing-simple-view", children: /* @__PURE__ */ jsx(
|
|
18155
18330
|
EarnFeedbackOverlaySimpleView,
|
|
18156
18331
|
{
|
|
18157
18332
|
variant: "loading",
|
|
18158
18333
|
title: "PROCESSANDO SAQUE...",
|
|
18159
|
-
subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes."
|
|
18334
|
+
subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes.",
|
|
18335
|
+
phase,
|
|
18336
|
+
backgroundConfirmationLabels
|
|
18160
18337
|
}
|
|
18161
18338
|
) });
|
|
18162
18339
|
};
|