@rabbitio/ui-kit 1.0.0-beta.83 → 1.0.0-beta.84
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/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +15674 -0
- package/coverage/coverage-final.json +112 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +986 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/rabbit-ui-kit/index.html +116 -0
- package/coverage/rabbit-ui-kit/index.js.html +88 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +148 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +199 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/axiosAdapter.js.html +190 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/qrUtils.js.html +139 -0
- package/coverage/rabbit-ui-kit/src/common-apis/amountUtils.js.html +1162 -0
- package/coverage/rabbit-ui-kit/src/common-apis/errorUtils.js.html +211 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/apiGroups.js.html +250 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/external-apis/ipAddressProviders.js.html +352 -0
- package/coverage/rabbit-ui-kit/src/common-apis/fiatCurrenciesService.js.html +544 -0
- package/coverage/rabbit-ui-kit/src/common-apis/globalConstants.jsx.html +94 -0
- package/coverage/rabbit-ui-kit/src/common-apis/index.html +161 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/blockchain.js.html +115 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/coin.js.html +544 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/common-apis/models/protocol.js.html +100 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/cache.js.html +811 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/emailAPI.js.html +133 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/index.html +161 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/logger.js.html +208 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/logging/logsStorage.js.html +268 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/postponeExecution.js.html +118 -0
- package/coverage/rabbit-ui-kit/src/common-apis/utils/safeStringify.js.html +235 -0
- package/coverage/rabbit-ui-kit/src/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/index.js.html +358 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +1570 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +526 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/cancelProcessing.js.html +172 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +310 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/externalApiProvider.js.html +553 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/externalServicesStatsCollector.js.html +319 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/index.html +206 -0
- package/coverage/rabbit-ui-kit/src/robust-api-caller/robustExternalAPICallerService.js.html +997 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +1543 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/swapProvider.js.html +1705 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +1801 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/baseSwapCreationInfo.js.html +223 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/existingSwap.js.html +304 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/existingSwapWithFiatData.js.html +469 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/index.html +176 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/partner.js.html +106 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +193 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/services/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/services/publicSwapService.js.html +2161 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/utils/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/swaps-lib/utils/swapUtils.js.html +670 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +124 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +127 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +127 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +106 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +439 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/index.html +281 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +133 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +346 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +247 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +163 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +268 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +151 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +256 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetIcon/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +289 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/AssetSelection/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +187 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/BackgroundTitle/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +238 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/InformationMessage/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Input/Input.jsx.html +634 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Input/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +196 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/LoadingDots/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +277 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/NoticeIcon/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +217 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/QrCode/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +175 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/RateSelector/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +217 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/SupportChat/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +529 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Textarea/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +508 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TitleBox/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +316 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Tooltip/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +313 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Validation/Validation.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/Validation/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +712 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Button/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +259 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/Close/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +421 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +415 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +1087 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/AmountInput/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +1474 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/CoinPicker/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +211 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/ColoredNotice/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +190 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LineWithIconLink/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +196 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/LogoCarousel/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +496 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +181 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +283 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +1567 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +481 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +1747 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/Dialog/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +4168 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/SwapForm/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +559 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +316 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/index.html +146 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useCallHandlingErrors.js.html +151 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useIsHydrated.js.html +121 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/hooks/useReferredState.js.html +157 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/index.html +161 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/inputValueProviders.js.html +235 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/textUtils.js.html +139 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/uiUtils.js.html +121 -0
- package/coverage/rabbit-ui-kit/src/ui-kit/utils/urlQueryUtils.js.html +271 -0
- package/coverage/rabbit-ui-kit/stories/atoms/BackgroundTitle.stories.jsx.html +202 -0
- package/coverage/rabbit-ui-kit/stories/atoms/LinesOfText.stories.jsx.html +283 -0
- package/coverage/rabbit-ui-kit/stories/atoms/LoadingDots.stories.jsx.html +226 -0
- package/coverage/rabbit-ui-kit/stories/atoms/QrCode.stories.jsx.html +175 -0
- package/coverage/rabbit-ui-kit/stories/atoms/RateSelector.stories.jsx.html +136 -0
- package/coverage/rabbit-ui-kit/stories/atoms/Validation.stories.jsx.html +178 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/Button.stories.jsx.html +883 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/Close.stories.jsx.html +211 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/LinkButton.stories.jsx.html +301 -0
- package/coverage/rabbit-ui-kit/stories/atoms/buttons/index.html +146 -0
- package/coverage/rabbit-ui-kit/stories/atoms/index.html +191 -0
- package/coverage/rabbit-ui-kit/stories/molecules/CoinPicker.stories.jsx.html +271 -0
- package/coverage/rabbit-ui-kit/stories/molecules/ColoredNotice.stories.jsx.html +178 -0
- package/coverage/rabbit-ui-kit/stories/molecules/LineWithIconLink.stories.jsx.html +154 -0
- package/coverage/rabbit-ui-kit/stories/molecules/LogoCarousel.stories.jsx.html +160 -0
- package/coverage/rabbit-ui-kit/stories/molecules/TitledLineWithIconLink.stories.jsx.html +160 -0
- package/coverage/rabbit-ui-kit/stories/molecules/index.html +176 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/Dialog.stories.jsx.html +523 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +328 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogButtons/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +337 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/DialogStep/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/Dialog/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/organisms/WaitlistSubscription.stories.jsx.html +151 -0
- package/coverage/rabbit-ui-kit/stories/organisms/index.html +116 -0
- package/coverage/rabbit-ui-kit/stories/stubs/coins.jsx.html +6880 -0
- package/coverage/rabbit-ui-kit/stories/stubs/exampleContent.jsx.html +145 -0
- package/coverage/rabbit-ui-kit/stories/stubs/index.html +131 -0
- package/coverage/rabbit-ui-kit/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +190 -0
- package/coverage/rabbit-ui-kit/stories/templates/index.html +116 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/dist/global.css.map +1 -1
- package/dist/index.cjs +1107 -494
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +93 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +926 -418
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1104 -495
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1107 -494
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +11 -0
- package/src/swaps-lib/external-apis/swapProvider.js +8 -0
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +20 -1
- package/src/swaps-lib/models/partner.js +7 -0
- package/src/swaps-lib/services/publicSwapService.js +17 -0
- package/src/ui-kit/assets/styles/global.scss +4 -7
- package/src/ui-kit/assets/wrappedImages/messageIcon.jsx +87 -0
- package/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx +61 -0
- package/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx +2 -2
- package/src/ui-kit/components/atoms/Validation/Validation.jsx +7 -9
- package/src/ui-kit/components/atoms/Validation/validation.module.scss +4 -0
- package/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx +57 -48
- package/src/ui-kit/components/molecules/AmountInput/amount-input.module.scss +33 -0
- package/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx +84 -132
- package/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx +42 -0
- package/src/ui-kit/components/molecules/ColoredNotice/colored-notice.module.scss +20 -0
- package/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx +37 -0
- package/src/ui-kit/components/molecules/LogoCarousel/logo-carousel.module.scss +64 -0
- package/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx +137 -0
- package/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx +10 -0
- package/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx +16 -0
- package/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx +35 -12
- package/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx +158 -0
package/dist/index.umd.js
CHANGED
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
locale: "en"
|
|
1460
1460
|
};
|
|
1461
1461
|
|
|
1462
|
-
var s$
|
|
1462
|
+
var s$o = {"asset-icon":"_0RwWA","small":"_QL4L6","asset-icon-primary":"_ltTJa","asset-icon-secondary":"_3rtPy"};
|
|
1463
1463
|
|
|
1464
1464
|
/**
|
|
1465
1465
|
* AssetIcon component to display an icon for an asset.
|
|
@@ -1484,16 +1484,16 @@
|
|
|
1484
1484
|
e.target.src = fallbackSrc;
|
|
1485
1485
|
};
|
|
1486
1486
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1487
|
-
className: s$
|
|
1487
|
+
className: s$o["asset-icon"] + (small ? " " + s$o["small"] : "")
|
|
1488
1488
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1489
1489
|
src: assetIconSrc,
|
|
1490
|
-
className: s$
|
|
1490
|
+
className: s$o["asset-icon-primary"] + (small ? " " + s$o["small"] : ""),
|
|
1491
1491
|
alt: " ",
|
|
1492
1492
|
onError: handleFailedLoad,
|
|
1493
1493
|
loading: "lazy"
|
|
1494
1494
|
}), assetIconProtocolSrc ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1495
1495
|
src: assetIconProtocolSrc,
|
|
1496
|
-
className: s$
|
|
1496
|
+
className: s$o["asset-icon-secondary"] + (small ? " " + s$o["small"] : ""),
|
|
1497
1497
|
alt: " ",
|
|
1498
1498
|
onError: handleFailedLoad,
|
|
1499
1499
|
loading: "lazy"
|
|
@@ -1649,7 +1649,7 @@
|
|
|
1649
1649
|
return Logger;
|
|
1650
1650
|
}();
|
|
1651
1651
|
|
|
1652
|
-
function _catch$
|
|
1652
|
+
function _catch$g(body, recover) {
|
|
1653
1653
|
try {
|
|
1654
1654
|
var result = body();
|
|
1655
1655
|
} catch (e) {
|
|
@@ -1665,7 +1665,7 @@
|
|
|
1665
1665
|
setState = _useState[1];
|
|
1666
1666
|
return React.useCallback(function (functionToBeCalled, event) {
|
|
1667
1667
|
try {
|
|
1668
|
-
var _temp = _catch$
|
|
1668
|
+
var _temp = _catch$g(function () {
|
|
1669
1669
|
return Promise.resolve(functionToBeCalled(event)).then(function () {});
|
|
1670
1670
|
}, function (error) {
|
|
1671
1671
|
Logger.logError(error, (functionToBeCalled == null ? void 0 : functionToBeCalled.name) || "errorBoundaryTrigger", "Caught by ErrorBoundary");
|
|
@@ -1681,7 +1681,7 @@
|
|
|
1681
1681
|
}, []);
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
1684
|
-
var s$
|
|
1684
|
+
var s$n = {"link-button-text":"_1Qn04","link-button":"_UDMz-","disabled":"_UtHO6","icon-rotate-90deg":"_v0g-W","icon-rotate-180deg":"_oxet9","icon-rotate-270deg":"_0aAbG","colored":"_UlsXW"};
|
|
1685
1685
|
|
|
1686
1686
|
var ICON_ROTATE_OPTIONS = {
|
|
1687
1687
|
rotate0: "0deg",
|
|
@@ -1750,14 +1750,14 @@
|
|
|
1750
1750
|
return isLoading ? /*#__PURE__*/React__default["default"].createElement(LoadingDots, {
|
|
1751
1751
|
isColored: true
|
|
1752
1752
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1753
|
-
className: s$
|
|
1753
|
+
className: s$n["link-button"] + (" " + (processedIconRotation && processedIconRotation !== ICON_ROTATE_OPTIONS.rotate0 ? " " + s$n["icon-rotate-" + processedIconRotation] : "") + " " + (isDisabled ? " " + s$n["disabled"] : "")),
|
|
1754
1754
|
onClick: handleClick
|
|
1755
1755
|
}, icon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1756
1756
|
src: icon,
|
|
1757
1757
|
alt: "link button alt",
|
|
1758
1758
|
loading: "lazy"
|
|
1759
1759
|
}) : null, IconComponent ? /*#__PURE__*/React__default["default"].createElement(IconComponent, null) : null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1760
|
-
className: s$
|
|
1760
|
+
className: s$n["link-button-text"] + (" " + (isColored ? s$n["colored"] : "") + " " + (isDisabled ? s$n["disabled"] : ""))
|
|
1761
1761
|
}, content));
|
|
1762
1762
|
};
|
|
1763
1763
|
LinkButton.propTypes = {
|
|
@@ -1780,7 +1780,7 @@
|
|
|
1780
1780
|
iconRotate: ICON_ROTATE_OPTIONS.rotate0
|
|
1781
1781
|
};
|
|
1782
1782
|
|
|
1783
|
-
var s$
|
|
1783
|
+
var s$m = {"dialog-buttons":"_UtFG3","hide-on-mobiles":"_fVQUd","space-between-layout":"_zVTkC"};
|
|
1784
1784
|
|
|
1785
1785
|
/**
|
|
1786
1786
|
* Renders a dialog component with configurable primary and secondary buttons.
|
|
@@ -1791,11 +1791,13 @@
|
|
|
1791
1791
|
* @param {Object} props - Props for configuring the DialogButtons.
|
|
1792
1792
|
* @param {string} [props.primaryButtonTitle] - The text to display on the primary button.
|
|
1793
1793
|
* @param {Function} props.primaryButtonOnClick - Function to call when the primary button is clicked.
|
|
1794
|
+
* @param {boolean} props.primaryButtonEnabled - Determines whether the secondary button is enabled.
|
|
1794
1795
|
* @param {boolean} [props.primaryButtonLoader=false] - Whether to show a loader on the primary button.
|
|
1795
1796
|
* @param {string} [props.primaryButtonTo] - The URL or route the primary button should navigate to.
|
|
1796
1797
|
* @param {Function} [props.primaryButtonSetClickTrigger] - Additional click handling logic for the primary button.
|
|
1797
1798
|
* @param {string} [props.secondaryButtonTitle] - The text to display on the secondary button.
|
|
1798
1799
|
* @param {Function} props.secondaryButtonOnClick - Function to call when the secondary button is clicked.
|
|
1800
|
+
* @param {boolean} props.secondaryButtonEnabled - Determines whether the primary button is enabled.
|
|
1799
1801
|
* @param {string} [props.secondaryButtonTo] - The URL or route the secondary button should navigate to.
|
|
1800
1802
|
* @param {boolean} [props.secondaryButtonBig=false] - Makes the secondary button larger for visual emphasis.
|
|
1801
1803
|
* @param {boolean} [props.withBackgroundImage=false] - Indicates if the button should adjust its styling for background images.
|
|
@@ -1805,12 +1807,14 @@
|
|
|
1805
1807
|
var DialogButtons = function DialogButtons(_ref) {
|
|
1806
1808
|
var primaryButtonTitle = _ref.primaryButtonTitle,
|
|
1807
1809
|
primaryButtonOnClick = _ref.primaryButtonOnClick,
|
|
1810
|
+
primaryButtonEnabled = _ref.primaryButtonEnabled,
|
|
1808
1811
|
_ref$primaryButtonLoa = _ref.primaryButtonLoader,
|
|
1809
1812
|
primaryButtonLoader = _ref$primaryButtonLoa === void 0 ? false : _ref$primaryButtonLoa,
|
|
1810
1813
|
primaryButtonTo = _ref.primaryButtonTo,
|
|
1811
1814
|
primaryButtonSetClickTrigger = _ref.primaryButtonSetClickTrigger,
|
|
1812
1815
|
secondaryButtonTitle = _ref.secondaryButtonTitle,
|
|
1813
1816
|
secondaryButtonOnClick = _ref.secondaryButtonOnClick,
|
|
1817
|
+
secondaryButtonEnabled = _ref.secondaryButtonEnabled,
|
|
1814
1818
|
secondaryButtonTo = _ref.secondaryButtonTo,
|
|
1815
1819
|
_ref$secondaryButtonB = _ref.secondaryButtonBig,
|
|
1816
1820
|
secondaryButtonBig = _ref$secondaryButtonB === void 0 ? false : _ref$secondaryButtonB,
|
|
@@ -1820,7 +1824,7 @@
|
|
|
1820
1824
|
hideOnMobiles = _ref$hideOnMobiles === void 0 ? false : _ref$hideOnMobiles;
|
|
1821
1825
|
var callHandlingErrors = useCallHandlingErrors();
|
|
1822
1826
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1823
|
-
className: s$
|
|
1827
|
+
className: s$m["dialog-buttons"] + (hideOnMobiles ? " " + s$m["hide-on-mobiles"] : "") + (secondaryButtonBig ? " " + s$m["space-between-layout"] : "")
|
|
1824
1828
|
}, secondaryButtonTitle ? secondaryButtonTo ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1825
1829
|
mode: "primary-transparent",
|
|
1826
1830
|
to: secondaryButtonTo,
|
|
@@ -1829,7 +1833,8 @@
|
|
|
1829
1833
|
fullWidthOnMobiles: true,
|
|
1830
1834
|
content: secondaryButtonTitle,
|
|
1831
1835
|
onClick: secondaryButtonOnClick,
|
|
1832
|
-
handleError: callHandlingErrors
|
|
1836
|
+
handleError: callHandlingErrors,
|
|
1837
|
+
isDisabled: !secondaryButtonEnabled
|
|
1833
1838
|
}) : secondaryButtonBig ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1834
1839
|
mode: "transparent",
|
|
1835
1840
|
size: "lg",
|
|
@@ -1837,11 +1842,13 @@
|
|
|
1837
1842
|
fullWidthOnMobiles: true,
|
|
1838
1843
|
content: secondaryButtonTitle,
|
|
1839
1844
|
onClick: secondaryButtonOnClick,
|
|
1840
|
-
handleError: callHandlingErrors
|
|
1845
|
+
handleError: callHandlingErrors,
|
|
1846
|
+
isDisabled: !secondaryButtonEnabled
|
|
1841
1847
|
}) : /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
1842
1848
|
onClick: secondaryButtonOnClick,
|
|
1843
1849
|
content: secondaryButtonTitle,
|
|
1844
|
-
isColored: !withBackgroundImage
|
|
1850
|
+
isColored: !withBackgroundImage,
|
|
1851
|
+
isDisabled: !secondaryButtonEnabled
|
|
1845
1852
|
}) : null, primaryButtonTitle ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1846
1853
|
mode: "primary",
|
|
1847
1854
|
size: "lg",
|
|
@@ -1851,17 +1858,20 @@
|
|
|
1851
1858
|
fullWidthOnMobiles: true,
|
|
1852
1859
|
content: primaryButtonTitle,
|
|
1853
1860
|
setClickTrigger: primaryButtonSetClickTrigger,
|
|
1854
|
-
handleError: callHandlingErrors
|
|
1861
|
+
handleError: callHandlingErrors,
|
|
1862
|
+
isDisabled: !primaryButtonEnabled
|
|
1855
1863
|
}) : null));
|
|
1856
1864
|
};
|
|
1857
1865
|
DialogButtons.propTypes = {
|
|
1858
1866
|
primaryButtonTitle: PropTypes.string,
|
|
1859
1867
|
primaryButtonOnClick: PropTypes.func,
|
|
1868
|
+
primaryButtonEnabled: PropTypes.bool,
|
|
1860
1869
|
primaryButtonLoader: PropTypes.bool,
|
|
1861
1870
|
primaryButtonTo: PropTypes.string,
|
|
1862
1871
|
primaryButtonSetClickTrigger: PropTypes.func,
|
|
1863
1872
|
secondaryButtonTitle: PropTypes.string,
|
|
1864
1873
|
secondaryButtonOnClick: PropTypes.func,
|
|
1874
|
+
secondaryButtonEnabled: PropTypes.bool,
|
|
1865
1875
|
secondaryButtonTo: PropTypes.string,
|
|
1866
1876
|
secondaryButtonBig: PropTypes.bool,
|
|
1867
1877
|
withBackgroundImage: PropTypes.bool,
|
|
@@ -1874,7 +1884,7 @@
|
|
|
1874
1884
|
hideOnMobiles: false
|
|
1875
1885
|
};
|
|
1876
1886
|
|
|
1877
|
-
var s$
|
|
1887
|
+
var s$l = {"background-title":"_Gzho7","background-title-wrapper":"_Rvcyg","small-margins":"_WjuWI","background-title-wrapper-text":"_cAVcA"};
|
|
1878
1888
|
|
|
1879
1889
|
/**
|
|
1880
1890
|
* Component for displaying a title with a fancy background text, which
|
|
@@ -1890,11 +1900,11 @@
|
|
|
1890
1900
|
_ref$smallMargins = _ref.smallMargins,
|
|
1891
1901
|
smallMargins = _ref$smallMargins === void 0 ? false : _ref$smallMargins;
|
|
1892
1902
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1893
|
-
className: s$
|
|
1903
|
+
className: s$l["background-title"]
|
|
1894
1904
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1895
|
-
className: s$
|
|
1905
|
+
className: s$l["background-title-wrapper"] + (smallMargins ? " " + s$l["small-margins"] : "")
|
|
1896
1906
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1897
|
-
className: s$
|
|
1907
|
+
className: s$l["background-title-wrapper-text"] + (smallMargins ? " " + s$l["small-margins"] : "")
|
|
1898
1908
|
}, text)));
|
|
1899
1909
|
};
|
|
1900
1910
|
BackgroundTitle.propTypes = {
|
|
@@ -1905,7 +1915,7 @@
|
|
|
1905
1915
|
smallMargins: false
|
|
1906
1916
|
};
|
|
1907
1917
|
|
|
1908
|
-
var s$
|
|
1918
|
+
var s$k = {"close":"_yMoDc","large":"_clOG2","white":"_145xN","dark-invert":"_-CvSS","dark":"_tTNnu"};
|
|
1909
1919
|
|
|
1910
1920
|
var CLOSE_COLORS = {
|
|
1911
1921
|
WHITE: "white",
|
|
@@ -1933,7 +1943,7 @@
|
|
|
1933
1943
|
large = _ref$large === void 0 ? false : _ref$large;
|
|
1934
1944
|
var callHandlingErrors = useCallHandlingErrors();
|
|
1935
1945
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1936
|
-
className: s$
|
|
1946
|
+
className: s$k["close"] + " " + s$k[color] + (large ? " " + s$k["large"] : ""),
|
|
1937
1947
|
onClick: function onClick(e) {
|
|
1938
1948
|
return callHandlingErrors(_onClick, e);
|
|
1939
1949
|
},
|
|
@@ -1959,7 +1969,7 @@
|
|
|
1959
1969
|
large: false
|
|
1960
1970
|
};
|
|
1961
1971
|
|
|
1962
|
-
var s$
|
|
1972
|
+
var s$j = {"validation-text":"_VIr-M","validation":"_L3OdW"};
|
|
1963
1973
|
|
|
1964
1974
|
var SuccessfulValidationIcon = (function () {
|
|
1965
1975
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -2057,15 +2067,15 @@
|
|
|
2057
2067
|
text = _ref$text === void 0 ? "" : _ref$text,
|
|
2058
2068
|
isSuccessAlert = _ref.isSuccessAlert;
|
|
2059
2069
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2060
|
-
className: s$
|
|
2061
|
-
},
|
|
2070
|
+
className: s$j["validation"]
|
|
2071
|
+
}, isSuccessAlert ?
|
|
2062
2072
|
/*#__PURE__*/
|
|
2063
2073
|
// <img src={successfulValidationIcon} alt="validation icon" />
|
|
2064
2074
|
React__default["default"].createElement(SuccessfulValidationIcon, null) :
|
|
2065
2075
|
/*#__PURE__*/
|
|
2066
2076
|
// <img src={failedValidationIcon} alt="validation icon" />
|
|
2067
|
-
React__default["default"].createElement(FailedValidationIcon, null)
|
|
2068
|
-
className: s$
|
|
2077
|
+
React__default["default"].createElement(FailedValidationIcon, null), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2078
|
+
className: s$j["validation-text"]
|
|
2069
2079
|
}, text));
|
|
2070
2080
|
};
|
|
2071
2081
|
Validation.propTypes = {
|
|
@@ -2197,7 +2207,7 @@
|
|
|
2197
2207
|
}
|
|
2198
2208
|
}
|
|
2199
2209
|
|
|
2200
|
-
var s$
|
|
2210
|
+
var s$i = {"dialog":"_AyHwj","hidden":"_hX4Lf","vertical-overflow-disabled":"_gRENy","inline":"_Da-tZ","dialog-transition-enter":"_0YlL9","scrollable":"_LaCqO","dialog-transition-enter-active":"_j35L1","dialog-transition-exit":"_lGJtS","dialog-transition-exit-active":"_Vg6Z2","fixed-buttons-container":"_ZNfnj","fixed-buttons-container-enter":"_vi-ug","fixed-buttons-container-enter-active":"_rIo-s","fixed-buttons-container-enter-done":"_5aNZC","fixed-buttons-container-exit":"_3ImpU","fixed-buttons-container-exit-active":"_dk-DE","fixed-buttons-container-exit-done":"_h9qrO","dialog-wrapper":"_HhhGp","animation-disabled":"_f8vf5","wide":"_hVh9o","dialog-wrapper-rah-content":"_ioVHo","dialog-wrapper-controls-top-padding":"_1bNLu","dialog-wrapper-close":"_nCuuj"};
|
|
2201
2211
|
|
|
2202
2212
|
var DIALOG_SIZES = {
|
|
2203
2213
|
small: {
|
|
@@ -2579,10 +2589,10 @@
|
|
|
2579
2589
|
"in": showDialogProcessed,
|
|
2580
2590
|
timeout: DIALOG_TRANSITION_STEP_DURATION,
|
|
2581
2591
|
classNames: inline ? undefined : {
|
|
2582
|
-
enter: s$
|
|
2583
|
-
enterActive: s$
|
|
2584
|
-
exit: s$
|
|
2585
|
-
exitActive: s$
|
|
2592
|
+
enter: s$i["dialog-transition-enter"],
|
|
2593
|
+
enterActive: s$i["dialog-transition-enter-active"],
|
|
2594
|
+
exit: s$i["dialog-transition-exit"],
|
|
2595
|
+
exitActive: s$i["dialog-transition-exit-active"]
|
|
2586
2596
|
},
|
|
2587
2597
|
unmountOnExit: true,
|
|
2588
2598
|
onExited: function onExited() {
|
|
@@ -2601,13 +2611,13 @@
|
|
|
2601
2611
|
bodyScrollLock.disableBodyScroll(dialogRef.current);
|
|
2602
2612
|
}
|
|
2603
2613
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2604
|
-
className: s$
|
|
2614
|
+
className: s$i["dialog"] + " " + (dialogVerticalHeight > 1 || !isMultiStep ? "" : " " + s$i["hidden"]) + (animationConfiguration.dialogContainerOverflowDisabled ? " " + s$i["vertical-overflow-disabled"] : "") + (inline ? " " + s$i["inline"] : ""),
|
|
2605
2615
|
ref: dialogRef
|
|
2606
2616
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2607
|
-
className: s$
|
|
2617
|
+
className: s$i["scrollable"] + (inline ? " " + s$i["inline"] : ""),
|
|
2608
2618
|
ref: scrollableRef
|
|
2609
2619
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2610
|
-
className: s$
|
|
2620
|
+
className: s$i["dialog-wrapper"] + (animationConfiguration.wrapperWidthAnimationEnabled ? "" : " " + s$i["animation-disabled"]) + (inline ? " " + s$i["inline"] : ""),
|
|
2611
2621
|
ref: dialogWrapperRef,
|
|
2612
2622
|
style: dialogConfiguration.customWidth !== "" ? {
|
|
2613
2623
|
maxWidth: dialogConfiguration.customWidth
|
|
@@ -2618,9 +2628,9 @@
|
|
|
2618
2628
|
duration: animationConfiguration.animateHeightTransitionEnabled ? animationConfiguration.animateHeightTransitionSpeed : 0,
|
|
2619
2629
|
delay: animationConfiguration.animateHeightTransitionEnabled ? animationConfiguration.animateHeightDelay : 0,
|
|
2620
2630
|
height: isMultiStep ? dialogVerticalHeight : "auto",
|
|
2621
|
-
contentClassName: s$
|
|
2631
|
+
contentClassName: s$i["dialog-wrapper-rah-content"]
|
|
2622
2632
|
}, inline ? "" : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2623
|
-
className: s$
|
|
2633
|
+
className: s$i["dialog-wrapper-close"]
|
|
2624
2634
|
}, /*#__PURE__*/React__default["default"].createElement(Close, {
|
|
2625
2635
|
color: "dark",
|
|
2626
2636
|
onClick: function onClick(e) {
|
|
@@ -2633,16 +2643,16 @@
|
|
|
2633
2643
|
// classNames={s["fixed-buttons-container"]}
|
|
2634
2644
|
,
|
|
2635
2645
|
classNames: {
|
|
2636
|
-
enter: s$
|
|
2637
|
-
enterActive: s$
|
|
2638
|
-
enterDone: s$
|
|
2639
|
-
exit: s$
|
|
2640
|
-
exitActive: s$
|
|
2641
|
-
exitDone: s$
|
|
2646
|
+
enter: s$i["fixed-buttons-container-enter"],
|
|
2647
|
+
enterActive: s$i["fixed-buttons-container-enter-active"],
|
|
2648
|
+
enterDone: s$i["fixed-buttons-container-enter-done"],
|
|
2649
|
+
exit: s$i["fixed-buttons-container-exit"],
|
|
2650
|
+
exitActive: s$i["fixed-buttons-container-exit-active"],
|
|
2651
|
+
exitDone: s$i["fixed-buttons-container-exit-done"]
|
|
2642
2652
|
},
|
|
2643
2653
|
unmountOnExit: true
|
|
2644
2654
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2645
|
-
className: s$
|
|
2655
|
+
className: s$i["fixed-buttons-container"]
|
|
2646
2656
|
}, /*#__PURE__*/React__default["default"].createElement(DialogButtons, buttonsConfiguration)))));
|
|
2647
2657
|
};
|
|
2648
2658
|
Dialog.propTypes = {
|
|
@@ -2699,7 +2709,7 @@
|
|
|
2699
2709
|
}));
|
|
2700
2710
|
});
|
|
2701
2711
|
|
|
2702
|
-
var s$
|
|
2712
|
+
var s$h = {"dialog-step":"_0e-Qk","dialog":"_hKHTW","hidden":"_OT1zR","vertical-overflow-disabled":"_r1zu9","inline":"_Fl90j","dialog-transition-enter":"_I2XgD","scrollable":"_bzLMI","dialog-transition-enter-active":"_oVr8Y","dialog-transition-exit":"_Z16VM","dialog-transition-exit-active":"_n15oq","fixed-buttons-container":"_wROD2","fixed-buttons-container-enter":"_sjNeR","fixed-buttons-container-enter-active":"_ClXNv","fixed-buttons-container-enter-done":"_RFDsV","fixed-buttons-container-exit":"_biF1s","fixed-buttons-container-exit-active":"_rnsbL","fixed-buttons-container-exit-done":"_fq5hb","dialog-wrapper":"_f3-0r","animation-disabled":"_WC3TT","wide":"_KzekW","dialog-wrapper-rah-content":"_RQkF-","dialog-wrapper-controls-top-padding":"_4IXJZ","dialog-wrapper-close":"_ursQ7","single-step":"_uhIvi","current":"_cf5Kv","with-background":"_50qat","prev":"_XwrWV","next":"_rWauR","dialog-step-background-image":"_BGO3z","dialog-step-background-image-desktop":"_JHVKU","dialog-step-background-image-mobile":"_XCWwZ","primary":"_CZCMe","dialog-step-wrapper":"_abWKW","slideToLeft":"_gUTFZ","slideToRight":"_IvqZI","appear-from-left":"_kCimd","slideFromLeft":"_Qn75y","appear-from-right":"_IJNy-","slideFromRight":"_-pa-6","dialog-step-wrapper-back-button":"_RtjTj","dialog-step-wrapper-header":"_-n02U","text-left":"_KgtZY","with-background-image":"_Lvz6f","dialog-step-wrapper-header-logo":"_ICMMd","dialog-step-wrapper-header-title":"_Sit8v","without-logo":"_GuW8x","close-button-padding":"_ovES2","no-close-button-padding":"_sFNQz","dialog-step-wrapper-header-title-icon":"_Ygqlx","dialog-step-wrapper-header-title-coin-icon":"_wQKfR","dialog-step-wrapper-header-title-loading":"_pR41Y","dialog-step-wrapper-header-title-text-content":"_-kVUI","white":"_JShTb","dialog-step-wrapper-header-text":"_a7sff","break-words":"_I16HH","small-margin":"_w6f6j","no-margin":"_RF8u-","dialog-step-wrapper-content":"_dgGiX","align-left":"_9c1qs","align-center":"_z0o-e","align-right":"_-6p5j","dialog-step-wrapper-buttons":"_uuxmx","big-margin":"_U-vR6"};
|
|
2703
2713
|
|
|
2704
2714
|
var DIALOG_STEP_CLASS = "dialog-step";
|
|
2705
2715
|
|
|
@@ -2720,9 +2730,11 @@
|
|
|
2720
2730
|
* @param {string} props.subtitle - Step subtitle.
|
|
2721
2731
|
* @param {string} props.backButtonText - Secondary button title.
|
|
2722
2732
|
* @param {function} props.backButtonClick - Secondary button click handler.
|
|
2733
|
+
* @param {boolean} props.backButtonEnabled - Determines whether the secondary button is enabled.
|
|
2723
2734
|
* @param {string} props.backButtonTo - Secondary button link.
|
|
2724
2735
|
* @param {string} props.confirmButtonText - Primary button title.
|
|
2725
2736
|
* @param {function} props.confirmButtonClick - Primary button click handler.
|
|
2737
|
+
* @param {boolean} props.confirmButtonEnabled - Determines whether the primary button is enabled.
|
|
2726
2738
|
* @param {string} props.confirmButtonLink - Primary button link.
|
|
2727
2739
|
* @param {boolean} props.primaryButtonLoader - Enable loader for the primary button.
|
|
2728
2740
|
* @param {boolean} props.fixedButtons - Enable fixed buttons in the bottom for mobile devices.
|
|
@@ -2769,12 +2781,16 @@
|
|
|
2769
2781
|
backButtonText = _ref$backButtonText === void 0 ? "" : _ref$backButtonText,
|
|
2770
2782
|
_ref$backButtonClick = _ref.backButtonClick,
|
|
2771
2783
|
backButtonClick = _ref$backButtonClick === void 0 ? function () {} : _ref$backButtonClick,
|
|
2784
|
+
_ref$backButtonEnable = _ref.backButtonEnabled,
|
|
2785
|
+
backButtonEnabled = _ref$backButtonEnable === void 0 ? true : _ref$backButtonEnable,
|
|
2772
2786
|
_ref$backButtonTo = _ref.backButtonTo,
|
|
2773
2787
|
backButtonTo = _ref$backButtonTo === void 0 ? "" : _ref$backButtonTo,
|
|
2774
2788
|
_ref$confirmButtonTex = _ref.confirmButtonText,
|
|
2775
2789
|
confirmButtonText = _ref$confirmButtonTex === void 0 ? "" : _ref$confirmButtonTex,
|
|
2776
2790
|
_ref$confirmButtonCli = _ref.confirmButtonClick,
|
|
2777
2791
|
confirmButtonClick = _ref$confirmButtonCli === void 0 ? function () {} : _ref$confirmButtonCli,
|
|
2792
|
+
_ref$confirmButtonEna = _ref.confirmButtonEnabled,
|
|
2793
|
+
confirmButtonEnabled = _ref$confirmButtonEna === void 0 ? true : _ref$confirmButtonEna,
|
|
2778
2794
|
_ref$confirmButtonLin = _ref.confirmButtonLink,
|
|
2779
2795
|
confirmButtonLink = _ref$confirmButtonLin === void 0 ? "" : _ref$confirmButtonLin,
|
|
2780
2796
|
_ref$primaryButtonLoa = _ref.primaryButtonLoader,
|
|
@@ -2867,10 +2883,10 @@
|
|
|
2867
2883
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2868
2884
|
}, []);
|
|
2869
2885
|
var handleTransitionEnd = function handleTransitionEnd(event) {
|
|
2870
|
-
if (isMultiStep && isCurrentStep(stepName) && event.propertyName === "opacity" && event.target.classList[0] === s$
|
|
2886
|
+
if (isMultiStep && isCurrentStep(stepName) && event.propertyName === "opacity" && event.target.classList[0] === s$h[DIALOG_STEP_CLASS]) {
|
|
2871
2887
|
disableAnimation(animationConfiguration.animateHeightTransitionEnabled);
|
|
2872
2888
|
}
|
|
2873
|
-
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === s$
|
|
2889
|
+
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === s$h[DIALOG_STEP_CLASS]) {
|
|
2874
2890
|
clearButtonsConfiguration();
|
|
2875
2891
|
scrollDialogToTop();
|
|
2876
2892
|
setStepMounted(false);
|
|
@@ -2907,11 +2923,13 @@
|
|
|
2907
2923
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
2908
2924
|
return confirmButtonClick(resetButtonLoader);
|
|
2909
2925
|
},
|
|
2926
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
2910
2927
|
primaryButtonLoader: primaryButtonLoader,
|
|
2911
2928
|
primaryButtonTo: confirmButtonLink,
|
|
2912
2929
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
2913
2930
|
secondaryButtonTitle: backButtonText,
|
|
2914
2931
|
secondaryButtonOnClick: backButtonClick,
|
|
2932
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
2915
2933
|
secondaryButtonTo: backButtonTo,
|
|
2916
2934
|
fixedButtonsEnabled: fixedButtons
|
|
2917
2935
|
}, stepName);
|
|
@@ -2938,44 +2956,46 @@
|
|
|
2938
2956
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
2939
2957
|
return confirmButtonClick(resetButtonLoader);
|
|
2940
2958
|
},
|
|
2959
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
2941
2960
|
primaryButtonLoader: primaryButtonLoader,
|
|
2942
2961
|
primaryButtonTo: confirmButtonLink,
|
|
2943
2962
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
2944
2963
|
secondaryButtonTitle: backButtonText,
|
|
2945
2964
|
secondaryButtonOnClick: backButtonClick,
|
|
2965
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
2946
2966
|
secondaryButtonTo: backButtonTo,
|
|
2947
2967
|
fixedButtonsEnabled: fixedButtons
|
|
2948
2968
|
}, stepName);
|
|
2949
2969
|
}
|
|
2950
2970
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2951
|
-
}, [confirmButtonText, confirmButtonClick, primaryButtonLoader, confirmButtonLink, setClickTrigger, backButtonText, backButtonClick, backButtonTo, currentStep]);
|
|
2971
|
+
}, [confirmButtonText, confirmButtonClick, confirmButtonEnabled, primaryButtonLoader, confirmButtonLink, setClickTrigger, backButtonText, backButtonClick, backButtonEnabled, backButtonTo, currentStep]);
|
|
2952
2972
|
var _ref2 = titleIconCoin && coinToIconPaths ? coinToIconPaths(titleIconCoin) : {},
|
|
2953
2973
|
assetIconSrc = _ref2.assetIconSrc,
|
|
2954
2974
|
assetIconProtocolSrc = _ref2.assetIconProtocolSrc,
|
|
2955
2975
|
fallbackSrc = _ref2.fallbackSrc;
|
|
2956
2976
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2957
|
-
className: s$
|
|
2977
|
+
className: s$h[DIALOG_STEP_CLASS] + " " + s$h[stepClass] + (!isMultiStep || !(animationConfiguration != null && animationConfiguration.currentStepAnimationEnabled) ? " " + s$h["animation-disabled"] : "") + (!isMultiStep ? " " + s$h["single-step"] : "") + (backgroundImage || backgroundImageMobile ? " " + s$h["with-background"] : "") + (inline ? " " + s$h["inline"] : ""),
|
|
2958
2978
|
ref: currentStepRef,
|
|
2959
2979
|
onTransitionEnd: handleTransitionEnd,
|
|
2960
2980
|
style: height ? {
|
|
2961
2981
|
height: height
|
|
2962
2982
|
} : null
|
|
2963
2983
|
}, stepMounted ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, backgroundImage || backgroundImageMobile ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2964
|
-
className: s$
|
|
2984
|
+
className: s$h["dialog-step-background-image"] + " " + s$h[stepClass]
|
|
2965
2985
|
}, backgroundImage ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2966
2986
|
src: backgroundImage,
|
|
2967
|
-
className: s$
|
|
2987
|
+
className: s$h["dialog-step-background-image-desktop"] + " " + stepClass + (!backgroundImageMobile ? " " + s$h["primary"] : ""),
|
|
2968
2988
|
alt: "dialog step background",
|
|
2969
2989
|
loading: "lazy"
|
|
2970
2990
|
}) : null, backgroundImageMobile ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2971
2991
|
src: backgroundImageMobile,
|
|
2972
|
-
className: s$
|
|
2992
|
+
className: s$h["dialog-step-background-image-mobile"] + " " + stepClass + (!backgroundImage ? " " + s$h["primary"] : ""),
|
|
2973
2993
|
alt: "dialog step background",
|
|
2974
2994
|
loading: "lazy"
|
|
2975
2995
|
}) : null) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2976
|
-
className: s$
|
|
2996
|
+
className: s$h["dialog-step-wrapper"] + " " + s$h[stepClass] + " " + s$h[wrapperDirectionSubclass] + (inline ? " " + s$h["inline"] : "")
|
|
2977
2997
|
}, isMultiStep && showCornerButtonForStep(stepName, showCornerBackButton) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2978
|
-
className: s$
|
|
2998
|
+
className: s$h["dialog-step-wrapper-back-button"]
|
|
2979
2999
|
}, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
2980
3000
|
onClick: cornerBackButtonClick ? cornerBackButtonClick : previousStep,
|
|
2981
3001
|
content: cornerBackButtonTitle ? cornerBackButtonTitle :
|
|
@@ -2985,54 +3005,56 @@
|
|
|
2985
3005
|
iconRotate: ICON_ROTATE_OPTIONS.rotate90,
|
|
2986
3006
|
isColored: backgroundImage || backgroundImageMobile ? false : undefined
|
|
2987
3007
|
})) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2988
|
-
className: s$
|
|
3008
|
+
className: s$h["dialog-step-wrapper-header"] + (headerTitleLeft ? " " + s$h["text-left"] : "") + (backgroundImage || backgroundImageMobile ? " " + s$h["with-background-image"] : "")
|
|
2989
3009
|
}, image ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2990
3010
|
src: image,
|
|
2991
3011
|
alt: "dialog popup logo",
|
|
2992
|
-
className: s$
|
|
3012
|
+
className: s$h["dialog-step-wrapper-header-logo"],
|
|
2993
3013
|
loading: "lazy"
|
|
2994
3014
|
}) : ImageRaw ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2995
|
-
className: s$
|
|
3015
|
+
className: s$h["dialog-step-wrapper-header-logo"]
|
|
2996
3016
|
}, /*#__PURE__*/React__default["default"].createElement(ImageRaw, null)) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2997
|
-
className: s$
|
|
3017
|
+
className: s$h["dialog-step-wrapper-header-title"] + (!isTopImagePassed ? " " + s$h["without-logo"] : "") + (!isTopImagePassed && headerTitleLeft ? " " + s$h["close-button-padding"] : "") + (inline ? " " + s$h["no-close-button-padding"] : "")
|
|
2998
3018
|
}, titleIconCoin ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2999
|
-
className: s$
|
|
3019
|
+
className: s$h["dialog-step-wrapper-header-title-coin-icon"]
|
|
3000
3020
|
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
3001
3021
|
assetIconSrc: assetIconSrc,
|
|
3002
3022
|
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
3003
3023
|
fallbackSrc: fallbackSrc
|
|
3004
3024
|
})) : titleIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3005
|
-
className: s$
|
|
3025
|
+
className: s$h["dialog-step-wrapper-header-title-icon"]
|
|
3006
3026
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3007
3027
|
src: titleIcon,
|
|
3008
3028
|
alt: "coin icon to send",
|
|
3009
3029
|
loading: "lazy"
|
|
3010
3030
|
})) : null, titleLoadingDots ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3011
|
-
className: s$
|
|
3031
|
+
className: s$h["dialog-step-wrapper-header-title-loading"]
|
|
3012
3032
|
}, /*#__PURE__*/React__default["default"].createElement(LoadingDots, {
|
|
3013
3033
|
isColored: true
|
|
3014
3034
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3015
|
-
className: s$
|
|
3035
|
+
className: s$h["dialog-step-wrapper-header-title-text"]
|
|
3016
3036
|
}, !isTopImagePassed && showBackgroundTitle ? /*#__PURE__*/React__default["default"].createElement(BackgroundTitle, {
|
|
3017
3037
|
text: title
|
|
3018
3038
|
}) : null, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
3019
|
-
className: s$
|
|
3039
|
+
className: s$h["dialog-step-wrapper-header-title-text-content"] + (!isTopImagePassed ? " " + s$h["without-logo"] : "") + (backgroundImage || backgroundImageMobile ? " " + s$h["white"] : "")
|
|
3020
3040
|
}, title))), subtitle ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3021
|
-
className: s$
|
|
3041
|
+
className: s$h["dialog-step-wrapper-header-text"] + (" " + (!isTopImagePassed ? s$h["without-logo"] : "") + " " + (subtitleSmallMargin ? s$h["small-margin"] : "") + (subtitleNoMargin ? s$h["no-margin"] : "") + " " + (headerTitleLeft ? s$h["text-left"] : "") + " " + (breakSubtitleWords ? s$h["break-words"] : "") + " " + (backgroundImage || backgroundImageMobile ? s$h["white"] : ""))
|
|
3022
3042
|
}, subtitle) : null), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3023
|
-
className: s$
|
|
3043
|
+
className: s$h["dialog-step-wrapper-content"] + " " + s$h["align-" + contentAlign]
|
|
3024
3044
|
}, children), backButtonText || confirmButtonText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3025
|
-
className: s$
|
|
3045
|
+
className: s$h["dialog-step-wrapper-buttons"] + (" " + (bigButtonMargins ? s$h["big-margin"] : "") + " " + (noButtonMargins ? s$h["no-margin"] : "") + " " + (isSecondaryButtonBig ? s$h["space-between-layout"] : ""))
|
|
3026
3046
|
}, /*#__PURE__*/React__default["default"].createElement(DialogButtons, {
|
|
3027
3047
|
primaryButtonTitle: confirmButtonText,
|
|
3028
3048
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
3029
3049
|
return confirmButtonClick(resetButtonLoader);
|
|
3030
3050
|
},
|
|
3051
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
3031
3052
|
primaryButtonLoader: primaryButtonLoader,
|
|
3032
3053
|
primaryButtonTo: confirmButtonLink,
|
|
3033
3054
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
3034
3055
|
secondaryButtonTitle: backButtonText,
|
|
3035
3056
|
secondaryButtonOnClick: backButtonClick,
|
|
3057
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
3036
3058
|
secondaryButtonTo: backButtonTo,
|
|
3037
3059
|
secondaryButtonBig: isSecondaryButtonBig,
|
|
3038
3060
|
withBackgroundImage: !!backgroundImage || !!backgroundImageMobile,
|
|
@@ -3052,9 +3074,11 @@
|
|
|
3052
3074
|
subtitle: PropTypes.string,
|
|
3053
3075
|
backButtonText: PropTypes.string,
|
|
3054
3076
|
backButtonClick: PropTypes.func,
|
|
3077
|
+
backButtonEnabled: PropTypes.bool,
|
|
3055
3078
|
backButtonTo: PropTypes.string,
|
|
3056
3079
|
confirmButtonText: PropTypes.string,
|
|
3057
3080
|
confirmButtonClick: PropTypes.func,
|
|
3081
|
+
confirmButtonEnabled: PropTypes.bool,
|
|
3058
3082
|
confirmButtonLink: PropTypes.string,
|
|
3059
3083
|
primaryButtonLoader: PropTypes.bool,
|
|
3060
3084
|
fixedButtons: PropTypes.bool,
|
|
@@ -3090,9 +3114,11 @@
|
|
|
3090
3114
|
subtitle: "",
|
|
3091
3115
|
backButtonText: "",
|
|
3092
3116
|
backButtonClick: function backButtonClick() {},
|
|
3117
|
+
backButtonEnabled: true,
|
|
3093
3118
|
backButtonTo: "",
|
|
3094
3119
|
confirmButtonText: "",
|
|
3095
3120
|
confirmButtonClick: function confirmButtonClick() {},
|
|
3121
|
+
confirmButtonEnabled: true,
|
|
3096
3122
|
confirmButtonLink: "",
|
|
3097
3123
|
primaryButtonLoader: false,
|
|
3098
3124
|
fixedButtons: false,
|
|
@@ -3115,7 +3141,7 @@
|
|
|
3115
3141
|
isSecondaryButtonBig: false
|
|
3116
3142
|
};
|
|
3117
3143
|
|
|
3118
|
-
var s$
|
|
3144
|
+
var s$g = {"asset-selection":"_xevLY","disabled":"_DZRfD","active":"_oBw9O","asset-selection-protocol-wrapper":"_ixAiH","asset-selection-icon-wrapper":"_gJ5LN","arrow":"_W8Ibq"};
|
|
3119
3145
|
|
|
3120
3146
|
var ArrowIcon = (function () {
|
|
3121
3147
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -3157,21 +3183,21 @@
|
|
|
3157
3183
|
fallbackSrc = _ref.fallbackSrc;
|
|
3158
3184
|
var handleError = useCallHandlingErrors();
|
|
3159
3185
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3160
|
-
className: s$
|
|
3186
|
+
className: s$g["asset-selection"] + " " + (disabled ? s$g["disabled"] : ""),
|
|
3161
3187
|
onClick: disabled ? function () {} : function (e) {
|
|
3162
3188
|
return handleError(handleClick, e);
|
|
3163
3189
|
}
|
|
3164
3190
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3165
|
-
className: s$
|
|
3191
|
+
className: s$g["asset-selection-icon-wrapper"]
|
|
3166
3192
|
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
3167
3193
|
small: true,
|
|
3168
3194
|
assetIconSrc: assetIconSrc,
|
|
3169
3195
|
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
3170
3196
|
fallbackSrc: fallbackSrc
|
|
3171
3197
|
})), protocolName ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3172
|
-
className: s$
|
|
3198
|
+
className: s$g["asset-selection-protocol-wrapper"]
|
|
3173
3199
|
}, protocolName) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3174
|
-
className: s$
|
|
3200
|
+
className: s$g["arrow"]
|
|
3175
3201
|
}, /*#__PURE__*/React__default["default"].createElement(ArrowIcon, null)));
|
|
3176
3202
|
};
|
|
3177
3203
|
AssetSelection.propTypes = {
|
|
@@ -3188,7 +3214,7 @@
|
|
|
3188
3214
|
assetIconProtocolSrc: null
|
|
3189
3215
|
};
|
|
3190
3216
|
|
|
3191
|
-
var s$
|
|
3217
|
+
var s$f = {"tooltip":"_8eyAx","enter":"_RpNdl","enter-active":"_BJddw","exit":"_BTWC-","exit-active":"_nxU2j","top-left":"_pPuyF","enter-done":"_UTN4U","top-right":"_2ppAB","left":"_--VUv","bottom":"_a1OJb","right":"_KNVu3","wide":"_s17pG","ignore-pointer":"_RCyas","tooltip-enter":"_3372j","tooltip-enter-active":"_-RNGY","tooltip-enter-done":"_90MOt","tooltip-exit":"_QT297","tooltip-exit-active":"_a0CNW"};
|
|
3192
3218
|
|
|
3193
3219
|
var DarkRectangle = (function () {
|
|
3194
3220
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -3247,7 +3273,7 @@
|
|
|
3247
3273
|
timeout: 400,
|
|
3248
3274
|
unmountOnExit: true
|
|
3249
3275
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3250
|
-
className: s$
|
|
3276
|
+
className: s$f["tooltip"] + " " + (wide ? s$f["wide"] : "") + " " + s$f[position] + " " + (ignorePointerEvents ? s$f["ignore-pointer"] : ""),
|
|
3251
3277
|
onClick: function onClick(e) {
|
|
3252
3278
|
return handleError(_onClick, e);
|
|
3253
3279
|
},
|
|
@@ -3273,7 +3299,7 @@
|
|
|
3273
3299
|
ignorePointerEvents: false
|
|
3274
3300
|
};
|
|
3275
3301
|
|
|
3276
|
-
var s$
|
|
3302
|
+
var s$e = {"notice-icon-image":"_MdvCj","notice-icon":"_lFNkE","notice-icon-tooltip":"_l38uS"};
|
|
3277
3303
|
|
|
3278
3304
|
var handleClickOutside = function handleClickOutside(exceptionsRefs, callback) {
|
|
3279
3305
|
function handleClick(event) {
|
|
@@ -3379,7 +3405,7 @@
|
|
|
3379
3405
|
}, []);
|
|
3380
3406
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3381
3407
|
ref: noticeRef,
|
|
3382
|
-
className: s$
|
|
3408
|
+
className: s$e["notice-icon"]
|
|
3383
3409
|
}, titleNoticeIcon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3384
3410
|
src: titleNoticeIcon,
|
|
3385
3411
|
alt: "title icon",
|
|
@@ -3388,17 +3414,17 @@
|
|
|
3388
3414
|
return !prev;
|
|
3389
3415
|
});
|
|
3390
3416
|
},
|
|
3391
|
-
className: s$
|
|
3417
|
+
className: s$e["notice-icon-image"],
|
|
3392
3418
|
loading: "lazy"
|
|
3393
3419
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3394
|
-
className: s$
|
|
3420
|
+
className: s$e["notice-icon-image"],
|
|
3395
3421
|
onClick: function onClick() {
|
|
3396
3422
|
return setShowTooltip(function (prev) {
|
|
3397
3423
|
return !prev;
|
|
3398
3424
|
});
|
|
3399
3425
|
}
|
|
3400
3426
|
}, /*#__PURE__*/React__default["default"].createElement(NoticeQuestionIcon, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3401
|
-
className: s$
|
|
3427
|
+
className: s$e["notice-icon-tooltip"]
|
|
3402
3428
|
}, /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
3403
3429
|
showTooltip: showTooltip,
|
|
3404
3430
|
handleClick: function handleClick() {
|
|
@@ -3418,7 +3444,7 @@
|
|
|
3418
3444
|
tooltipPosition: TOOLTIP_POSITIONS.TOP
|
|
3419
3445
|
};
|
|
3420
3446
|
|
|
3421
|
-
var s$
|
|
3447
|
+
var s$d = {"title-box":"_2Kb-x","full-width":"_-5MIw","title-box-wrapper":"_f8RmO","title-box-wrapper-title":"_Oxg7u","transparent-title":"_NwGqA","title-box-wrapper-link-button":"_f-4ZL"};
|
|
3422
3448
|
|
|
3423
3449
|
/**
|
|
3424
3450
|
* Copies given text to clipboard inside browser.
|
|
@@ -3482,7 +3508,7 @@
|
|
|
3482
3508
|
copyButtonContent = _ref.copyButtonContent,
|
|
3483
3509
|
copyButtonTooltipContent = _ref.copyButtonTooltipContent;
|
|
3484
3510
|
var handleError = useCallHandlingErrors();
|
|
3485
|
-
var transparentTitleClass = transparentTitle ? s$
|
|
3511
|
+
var transparentTitleClass = transparentTitle ? s$d["transparent-title"] : "";
|
|
3486
3512
|
var _useState = React.useState(false),
|
|
3487
3513
|
showCopyNotice = _useState[0],
|
|
3488
3514
|
setShowCopyNotice = _useState[1];
|
|
@@ -3496,19 +3522,19 @@
|
|
|
3496
3522
|
}, e);
|
|
3497
3523
|
};
|
|
3498
3524
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3499
|
-
className: s$
|
|
3525
|
+
className: s$d["title-box"] + " " + (fullWidth ? s$d["full-width"] : "")
|
|
3500
3526
|
}, title || titleNoticeText || linkText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3501
|
-
className: s$
|
|
3527
|
+
className: s$d["title-box-wrapper"]
|
|
3502
3528
|
}, bigTitle ? /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
3503
|
-
className: s$
|
|
3529
|
+
className: s$d["title-box-wrapper-title"] + " " + transparentTitleClass
|
|
3504
3530
|
}, title) : /*#__PURE__*/React__default["default"].createElement("h6", {
|
|
3505
|
-
className: s$
|
|
3531
|
+
className: s$d["title-box-wrapper-title"] + " " + transparentTitleClass
|
|
3506
3532
|
}, title), titleNoticeText ? /*#__PURE__*/React__default["default"].createElement(NoticeIcon, {
|
|
3507
3533
|
noticeText: titleNoticeText,
|
|
3508
3534
|
titleNoticeIcon: titleNoticeIcon,
|
|
3509
3535
|
tooltipPosition: titleNoticePosition
|
|
3510
3536
|
}) : null, copyButtonContent && copyButtonText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3511
|
-
className: s$
|
|
3537
|
+
className: s$d["title-box-wrapper-link-button"]
|
|
3512
3538
|
}, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
3513
3539
|
content: copyButtonText,
|
|
3514
3540
|
onClick: handleCopyButton,
|
|
@@ -3518,7 +3544,7 @@
|
|
|
3518
3544
|
position: TOOLTIP_POSITIONS.TOP_LEFT,
|
|
3519
3545
|
showTooltip: showCopyNotice
|
|
3520
3546
|
}, copyButtonTooltipContent)) : linkText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3521
|
-
className: s$
|
|
3547
|
+
className: s$d["title-box-wrapper-link-button"]
|
|
3522
3548
|
}, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
3523
3549
|
content: linkText,
|
|
3524
3550
|
onClick: linkButtonClick,
|
|
@@ -3556,7 +3582,7 @@
|
|
|
3556
3582
|
transparentTitle: false
|
|
3557
3583
|
};
|
|
3558
3584
|
|
|
3559
|
-
var s$
|
|
3585
|
+
var s$c = {"amount-input-container-input-wrapper":"_OQ-ym","requested-amount-fiat-skeleton-content":"_zck4j","requested-amount-coin-skeleton-content":"_rZsYH","amount-input-container":"_AQaqi","upper-form-position":"_FjX1X","lower-form-position":"_g5zUv","error-encountered":"_XjaEm","focus":"_-jHS0","disabled":"_3y8Yo","bottom-margin":"_3RoIe","asset-balance":"_Z9fcv","red":"_EXTAF","requested-amount-coin":"_AV4qa","requested-amount-coin-currency":"_OGQ9l","requested-amount-coin-input":"_KY6tO","requested-amount-coin-skeleton":"_gIBI7","requested-amount-fiat":"_gwWcz","requested-amount-fiat-enter":"_Q3eUh","requested-amount-fiat-enter-active":"_ijYoP","requested-amount-fiat-exit":"_czDtf","requested-amount-fiat-exit-active":"_Hav2r","requested-amount-fiat-currency":"_RACoB","requested-amount-fiat-input":"_L5lVd","requested-amount-fiat-placeholder":"_HV2XM","requested-amount-fiat-skeleton":"_63hUZ"};
|
|
3560
3586
|
|
|
3561
3587
|
var WalletIcon = (function () {
|
|
3562
3588
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -4225,15 +4251,15 @@
|
|
|
4225
4251
|
linkText: isSendAll !== null ? isSendAll ? linkButtonActiveText : linkButtonInactiveText : null,
|
|
4226
4252
|
linkButtonClick: handleSendAllClick
|
|
4227
4253
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4228
|
-
className: [s$
|
|
4254
|
+
className: [s$c["amount-input-container"], isInFocus ? s$c["focus"] : "", errorEncountered || highlightInput ? s$c["error-encountered"] : "", upperFormPosition ? s$c["upper-form-position"] : "", lowerFormPosition ? s$c["lower-form-position"] : ""].join(" ")
|
|
4229
4255
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4230
|
-
className: s$
|
|
4256
|
+
className: s$c["amount-input-container-input-wrapper"] + " " + (disabled ? s$c["disabled"] : "") + "\n " + (children ? s$c["bottom-margin"] : "")
|
|
4231
4257
|
}, showBalance ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4232
|
-
className: s$
|
|
4258
|
+
className: s$c["asset-balance"] + " " + (highlightBalance ? s$c["red"] : "")
|
|
4233
4259
|
}, /*#__PURE__*/React__default["default"].createElement(WalletIcon, null), /*#__PURE__*/React__default["default"].createElement("p", null, (assetBalance == null ? void 0 : assetBalance.assetAmount) != null && (assetBalance == null ? void 0 : assetBalance.fiatAmount) != null && ticker && fiatCurrencyCode ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, AmountUtils.cryptoFull(assetBalance.assetAmount, tickerPrintable, assetDecimalPlaces), /*#__PURE__*/React__default["default"].createElement("span", null, " ~ " + AmountUtils.fiat(assetBalance.fiatAmount, fiatCurrencyCode))) : balanceLoaderText)) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4234
|
-
className: s$
|
|
4260
|
+
className: s$c["requested-amount-coin"]
|
|
4235
4261
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4236
|
-
className: s$
|
|
4262
|
+
className: s$c["requested-amount-coin-currency"]
|
|
4237
4263
|
}, tickerPrintable ? (estimateAmount ? "~ " : "") + tickerPrintable : ""), !isLoading ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4238
4264
|
type: "text",
|
|
4239
4265
|
inputMode: "decimal",
|
|
@@ -4242,7 +4268,7 @@
|
|
|
4242
4268
|
return handleChangeAmount(e.target.value);
|
|
4243
4269
|
},
|
|
4244
4270
|
placeholder: coinAmountPlaceholder,
|
|
4245
|
-
className: s$
|
|
4271
|
+
className: s$c["requested-amount-coin-input"],
|
|
4246
4272
|
disabled: disabled || locked,
|
|
4247
4273
|
onFocus: function onFocus(e) {
|
|
4248
4274
|
return callHandlingErrors(function () {
|
|
@@ -4255,17 +4281,27 @@
|
|
|
4255
4281
|
}, e);
|
|
4256
4282
|
}
|
|
4257
4283
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4258
|
-
className: s$
|
|
4284
|
+
className: s$c["requested-amount-coin-skeleton"]
|
|
4259
4285
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4260
|
-
className: s$
|
|
4261
|
-
}))),
|
|
4262
|
-
|
|
4286
|
+
className: s$c["requested-amount-coin-skeleton-content"] + " " + "skeleton-dark"
|
|
4287
|
+
}))), /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, {
|
|
4288
|
+
"in": fiatCurrencyCode !== null,
|
|
4289
|
+
timeout: 200,
|
|
4290
|
+
classNames: {
|
|
4291
|
+
enter: s$c["requested-amount-fiat-enter"],
|
|
4292
|
+
enterActive: s$c["requested-amount-fiat-enter-active"],
|
|
4293
|
+
exit: s$c["requested-amount-fiat-exit"],
|
|
4294
|
+
exitActive: s$c["requested-amount-fiat-exit-active"]
|
|
4295
|
+
},
|
|
4296
|
+
unmountOnExit: true
|
|
4297
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4298
|
+
className: s$c["requested-amount-fiat"] + (interactedWith ? " " + s$c["interacted"] : "")
|
|
4263
4299
|
}, interactedWith ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4264
|
-
className: s$
|
|
4300
|
+
className: s$c["requested-amount-fiat-currency"]
|
|
4265
4301
|
}, (estimateAmount ? "~ " : "") + fiatCurrencyCode), !isLoading && cryptoAssetToFiatRate != null ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4266
4302
|
type: "text",
|
|
4267
4303
|
inputMode: "decimal",
|
|
4268
|
-
className: s$
|
|
4304
|
+
className: s$c["requested-amount-fiat-input"],
|
|
4269
4305
|
value: fiatAmountValue,
|
|
4270
4306
|
disabled: disabled || locked,
|
|
4271
4307
|
onChange: function onChange(e) {
|
|
@@ -4284,18 +4320,18 @@
|
|
|
4284
4320
|
}, e);
|
|
4285
4321
|
}
|
|
4286
4322
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4287
|
-
className: s$
|
|
4323
|
+
className: s$c["requested-amount-fiat-skeleton"]
|
|
4288
4324
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4289
|
-
className: s$
|
|
4325
|
+
className: s$c["requested-amount-fiat-skeleton-content"] + " " + "skeleton-dark"
|
|
4290
4326
|
}))) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4291
|
-
className: s$
|
|
4327
|
+
className: s$c["requested-amount-fiat-placeholder"],
|
|
4292
4328
|
onClick: function onClick(e) {
|
|
4293
4329
|
return callHandlingErrors(function () {
|
|
4294
4330
|
return handleFiatInteraction();
|
|
4295
4331
|
}, e);
|
|
4296
4332
|
}
|
|
4297
|
-
}, fiatInputPlaceholderText)))
|
|
4298
|
-
className: s$
|
|
4333
|
+
}, fiatInputPlaceholderText)))), showChangeAssetButton && ticker ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4334
|
+
className: s$c["amount-input-container-button-wrapper"],
|
|
4299
4335
|
ref: buttonForwardRef
|
|
4300
4336
|
}, /*#__PURE__*/React__default["default"].createElement(AssetSelection, {
|
|
4301
4337
|
assetIconSrc: assetIconSrc,
|
|
@@ -4309,9 +4345,9 @@
|
|
|
4309
4345
|
}) : null);
|
|
4310
4346
|
});
|
|
4311
4347
|
|
|
4312
|
-
var s$
|
|
4348
|
+
var s$b = {"swap-form-inputs-separator":"_2vSSb","disabled":"_t1R13","swap-form":"_Uwb2p","swap-form-inputs":"_kkR8O","swap-form-information-field":"_ZUAfe","semi-transparent":"_1mu0j","interactable":"_S9zQS","red":"_SbQSO","swap-form-address-field":"_c8Nfv","swap-form-rate-selector":"_Fo9O-","swap-form-validation-text":"_8iEHB","swap-form-button-container":"_cVVfG","swap-form-button-container-consent-text":"_UNMjb","swap-form-button-container-consent-text-link":"_-g020"};
|
|
4313
4349
|
|
|
4314
|
-
var s$
|
|
4350
|
+
var s$a = {"textarea-input":"_EJFn-","textarea":"_YjRAf","full-height":"_kDp5e","textarea-input-label":"_XQC6S","adaptive-height":"_UnSJE","small-text":"_WtRnB","disabled":"_IO5nl","error-encountered":"_00pBS"};
|
|
4315
4351
|
|
|
4316
4352
|
/**
|
|
4317
4353
|
* A textarea component with optional adaptive height and validation messaging.
|
|
@@ -4372,12 +4408,12 @@
|
|
|
4372
4408
|
if (((_e$target = e.target) == null ? void 0 : _e$target.value.indexOf("\n")) === -1 || !ignoreEnter) _onChange(e);
|
|
4373
4409
|
};
|
|
4374
4410
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4375
|
-
className: s$
|
|
4411
|
+
className: s$a["textarea"] + (" " + (fullHeight ? " " + s$a["full-height"] : ""))
|
|
4376
4412
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4377
4413
|
htmlFor: id,
|
|
4378
|
-
className: s$
|
|
4414
|
+
className: s$a["textarea-input-label"]
|
|
4379
4415
|
}, label) : null, adaptiveHeight ? /*#__PURE__*/React__default["default"].createElement(TextareaAutosize__default["default"], {
|
|
4380
|
-
className: s$
|
|
4416
|
+
className: s$a["textarea-input"] + " " + s$a["adaptive-height"] + (disabled ? " " + s$a["disabled"] : "") + (errorEncountered ? " " + s$a["error-encountered"] : ""),
|
|
4381
4417
|
minRows: 1,
|
|
4382
4418
|
maxRows: 3,
|
|
4383
4419
|
onChange: function onChange(e) {
|
|
@@ -4391,7 +4427,7 @@
|
|
|
4391
4427
|
disabled: disabled
|
|
4392
4428
|
}) : /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
4393
4429
|
name: name,
|
|
4394
|
-
className: s$
|
|
4430
|
+
className: s$a["textarea-input"] + (" " + (fullHeight ? s$a["full-height"] : "") + " " + (smallText ? s$a["small-text"] : "") + " " + (disabled ? s$a["disabled"] : "")),
|
|
4395
4431
|
onChange: function onChange(e) {
|
|
4396
4432
|
return callHandlingErrors(_onChange, e);
|
|
4397
4433
|
},
|
|
@@ -4441,7 +4477,7 @@
|
|
|
4441
4477
|
ignoreEnter: false
|
|
4442
4478
|
};
|
|
4443
4479
|
|
|
4444
|
-
var s$
|
|
4480
|
+
var s$9 = {"rate-selector":"_bqJFm","rate-selector-item":"_te8yb","selected":"_HU2Oq","rate-selector-item-text":"_ew-Z1"};
|
|
4445
4481
|
|
|
4446
4482
|
// TODO: [dev] add JSDoc
|
|
4447
4483
|
var RateSelector = function RateSelector(_ref) {
|
|
@@ -4455,21 +4491,21 @@
|
|
|
4455
4491
|
fixedRate: "Fixed rate"
|
|
4456
4492
|
} : _ref$translations;
|
|
4457
4493
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4458
|
-
className: s$
|
|
4494
|
+
className: s$9["rate-selector"]
|
|
4459
4495
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4460
|
-
className: s$
|
|
4496
|
+
className: s$9["rate-selector-item"] + " " + (!isFixed ? s$9["selected"] : ""),
|
|
4461
4497
|
onClick: function onClick() {
|
|
4462
|
-
return setIsFixed(false);
|
|
4498
|
+
return isFixed ? setIsFixed(false) : null;
|
|
4463
4499
|
}
|
|
4464
4500
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4465
|
-
className: s$
|
|
4501
|
+
className: s$9["rate-selector-item-text"]
|
|
4466
4502
|
}, translations.floatingRate)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4467
|
-
className: s$
|
|
4503
|
+
className: s$9["rate-selector-item"] + " " + (isFixed ? s$9["selected"] : ""),
|
|
4468
4504
|
onClick: function onClick() {
|
|
4469
|
-
return setIsFixed(true);
|
|
4505
|
+
return !isFixed ? setIsFixed(true) : null;
|
|
4470
4506
|
}
|
|
4471
4507
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4472
|
-
className: s$
|
|
4508
|
+
className: s$9["rate-selector-item-text"]
|
|
4473
4509
|
}, translations.fixedRate)));
|
|
4474
4510
|
};
|
|
4475
4511
|
|
|
@@ -4694,7 +4730,7 @@
|
|
|
4694
4730
|
* @constructor
|
|
4695
4731
|
*/
|
|
4696
4732
|
|
|
4697
|
-
function _catch$
|
|
4733
|
+
function _catch$f(body, recover) {
|
|
4698
4734
|
try {
|
|
4699
4735
|
var result = body();
|
|
4700
4736
|
} catch (e) {
|
|
@@ -5018,23 +5054,26 @@
|
|
|
5018
5054
|
setMaximumAmountValid(!maximumAmount.current || bignumber_js.BigNumber(amount).eq("0") || bignumber_js.BigNumber(amount).lte(maximumAmount.current.crypto));
|
|
5019
5055
|
setMinimalAmountValid(!minimalAmount.current || bignumber_js.BigNumber(amount).eq("0") || bignumber_js.BigNumber(amount).gte((_minimalAmount$curren5 = minimalAmount.current) == null ? void 0 : _minimalAmount$curren5.crypto));
|
|
5020
5056
|
};
|
|
5021
|
-
var requestDataRefresh = function requestDataRefresh(amount, immediately, isSwapAll) {
|
|
5057
|
+
var requestDataRefresh = function requestDataRefresh(amount, immediately, isSwapAll, ignoreEmptyAmount) {
|
|
5022
5058
|
if (immediately === void 0) {
|
|
5023
5059
|
immediately = false;
|
|
5024
5060
|
}
|
|
5025
5061
|
if (isSwapAll === void 0) {
|
|
5026
5062
|
isSwapAll = false;
|
|
5027
5063
|
}
|
|
5064
|
+
if (ignoreEmptyAmount === void 0) {
|
|
5065
|
+
ignoreEmptyAmount = false;
|
|
5066
|
+
}
|
|
5028
5067
|
try {
|
|
5029
5068
|
clearTimeout(dataUpdateTimeoutId.current);
|
|
5030
5069
|
if (isSwapAll) {
|
|
5031
5070
|
loadFullEstimation(null);
|
|
5032
5071
|
return;
|
|
5033
5072
|
}
|
|
5034
|
-
if (!amount) {
|
|
5073
|
+
if (!amount && !ignoreEmptyAmount) {
|
|
5035
5074
|
return;
|
|
5036
5075
|
}
|
|
5037
|
-
if (bignumber_js.BigNumber(amount).eq("0")) {
|
|
5076
|
+
if (bignumber_js.BigNumber(amount).eq("0") || amount == null || amount === "") {
|
|
5038
5077
|
if (immediately) {
|
|
5039
5078
|
loadMinimalAmountAndSwapRate(true);
|
|
5040
5079
|
} else {
|
|
@@ -5090,7 +5129,7 @@
|
|
|
5090
5129
|
}
|
|
5091
5130
|
(function () {
|
|
5092
5131
|
try {
|
|
5093
|
-
return _catch$
|
|
5132
|
+
return _catch$f(function () {
|
|
5094
5133
|
var _minimalAmount$curren6, _maximumAmount$curren5, _isFixedRate$current;
|
|
5095
5134
|
var dataMemento = {
|
|
5096
5135
|
rate: swapRate,
|
|
@@ -5176,7 +5215,7 @@
|
|
|
5176
5215
|
}
|
|
5177
5216
|
(function () {
|
|
5178
5217
|
try {
|
|
5179
|
-
return _catch$
|
|
5218
|
+
return _catch$f(function () {
|
|
5180
5219
|
setIsLoading(true);
|
|
5181
5220
|
setMinimalAmount(null);
|
|
5182
5221
|
setMaximumAmount(null);
|
|
@@ -5185,7 +5224,7 @@
|
|
|
5185
5224
|
setIsPairSupported(true);
|
|
5186
5225
|
setIsSwapCalculated(false);
|
|
5187
5226
|
return Promise.resolve(retrieveInitialSwapData(sendingAssetTicker, receivingAssetTicker)).then(function (swapData) {
|
|
5188
|
-
if (sendAssetAmount.current != null && !isCalledForClearedInput) {
|
|
5227
|
+
if ((isFixedRate.current && isLastEditedReceiving.current ? receiveAssetAmount.current != null : sendAssetAmount.current != null) && !isCalledForClearedInput) {
|
|
5189
5228
|
// Means user already entered amount after starting the form initialization
|
|
5190
5229
|
return;
|
|
5191
5230
|
}
|
|
@@ -5229,7 +5268,7 @@
|
|
|
5229
5268
|
};
|
|
5230
5269
|
var handleRateModeChanged = function handleRateModeChanged(isFixed) {
|
|
5231
5270
|
setIsFixedRate(isFixed);
|
|
5232
|
-
requestDataRefresh(isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current, true);
|
|
5271
|
+
requestDataRefresh(isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current, true, null, true);
|
|
5233
5272
|
};
|
|
5234
5273
|
React.useEffect(function () {
|
|
5235
5274
|
if (isSwapAll.current === true) {
|
|
@@ -5246,9 +5285,10 @@
|
|
|
5246
5285
|
}, [isFixedRate.current]);
|
|
5247
5286
|
React.useEffect(function () {
|
|
5248
5287
|
if (!sendingAssetTicker || !receivingAssetTicker) return;
|
|
5249
|
-
var
|
|
5288
|
+
var currentAmount = isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current;
|
|
5289
|
+
var isCurrentAmountNotZero = currentAmount && !bignumber_js.BigNumber("0").eq(currentAmount);
|
|
5250
5290
|
if (isCurrentAmountNotZero) {
|
|
5251
|
-
loadFullEstimation(
|
|
5291
|
+
loadFullEstimation(currentAmount);
|
|
5252
5292
|
} else {
|
|
5253
5293
|
loadMinimalAmountAndSwapRate(true);
|
|
5254
5294
|
}
|
|
@@ -5344,7 +5384,7 @@
|
|
|
5344
5384
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5345
5385
|
}, [updateSendInputTo, updateReceiveInputTo]);
|
|
5346
5386
|
React.useEffect(function () {
|
|
5347
|
-
if (swapRate != null && sendAssetAmount.current != null) {
|
|
5387
|
+
if (swapRate != null && (isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current) != null) {
|
|
5348
5388
|
if (isLastEditedReceiving.current) {
|
|
5349
5389
|
setUpdateSendInputTo(AmountUtils.trim(bignumber_js.BigNumber(receiveAssetAmount.current).div(swapRate), sendingAssetDecimalCount));
|
|
5350
5390
|
} else {
|
|
@@ -5375,7 +5415,7 @@
|
|
|
5375
5415
|
var recipientAddressExtraIdName = getExtraIdNameByTicker(receivingAssetTicker);
|
|
5376
5416
|
var refundAddressExtraIdName = getExtraIdNameByTicker(sendingAssetTicker);
|
|
5377
5417
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5378
|
-
className: s$
|
|
5418
|
+
className: s$b["swap-form"]
|
|
5379
5419
|
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
5380
5420
|
linkButtonClick: bignumber_js.BigNumber(sendingAssetBalance == null ? void 0 : sendingAssetBalance.assetAmount).eq(0) ? null : function (resetButtonLoader) {
|
|
5381
5421
|
return handleSwapAllClick(resetButtonLoader);
|
|
@@ -5384,13 +5424,13 @@
|
|
|
5384
5424
|
linkButtonLoader: true,
|
|
5385
5425
|
isLinkButtonDisabled: isLoading.current || sendingAssetTicker === receivingAssetTicker || bignumber_js.BigNumber(sendingAssetBalance == null ? void 0 : sendingAssetBalance.assetAmount).eq(0)
|
|
5386
5426
|
}, displayRateSelector ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5387
|
-
className: s$
|
|
5427
|
+
className: s$b["swap-form-rate-selector"]
|
|
5388
5428
|
}, /*#__PURE__*/React__default["default"].createElement(RateSelector, {
|
|
5389
5429
|
isFixed: (_isFixedRate$current2 = isFixedRate.current) != null ? _isFixedRate$current2 : IS_FIXED_BY_DEFAULT,
|
|
5390
5430
|
setIsFixed: handleRateModeChanged,
|
|
5391
5431
|
translations: translations.rateSelector
|
|
5392
5432
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5393
|
-
className: s$
|
|
5433
|
+
className: s$b["swap-form-inputs"]
|
|
5394
5434
|
}, /*#__PURE__*/React__default["default"].createElement(AmountInput, {
|
|
5395
5435
|
ticker: sendingAssetTicker,
|
|
5396
5436
|
tickerPrintable: sendingAssetTickerPrintable,
|
|
@@ -5415,12 +5455,12 @@
|
|
|
5415
5455
|
ref: fromAssetSelectionButtonRef,
|
|
5416
5456
|
isLoading: isLastEditedReceiving.current ? isLoading.current : false,
|
|
5417
5457
|
cryptoAssetToFiatRate: sendingAssetToFiatRate,
|
|
5418
|
-
fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
|
|
5458
|
+
fiatCurrencyCode: formHasFiat && (isLoading.current || sendingAssetToFiatRate != null) ? fiatCurrencyCode : null,
|
|
5419
5459
|
fiatCurrencyDecimals: fiatCurrencyDecimals,
|
|
5420
5460
|
balanceLoaderText: translations.input.balanceLoaderText,
|
|
5421
5461
|
fiatInputPlaceholderText: translations.input.fiatPlaceholder
|
|
5422
5462
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5423
|
-
className: s$
|
|
5463
|
+
className: s$b["swap-form-inputs-separator"] + " " + (isLoading.current || sendingAssetTicker === null || receivingAssetTicker === null ? s$b["disabled"] : "")
|
|
5424
5464
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5425
5465
|
src: swapSeparatorIconSrc,
|
|
5426
5466
|
alt: "swap icon",
|
|
@@ -5438,7 +5478,7 @@
|
|
|
5438
5478
|
assetIconProtocolSrc: receivingAssetProtocolIconSrc,
|
|
5439
5479
|
fallbackAssetIconSrc: fallBackAssetIconSrc,
|
|
5440
5480
|
disabled: isSwapAll.current || sendingAssetTicker === null || receivingAssetTicker === null,
|
|
5441
|
-
locked: !formHasBalance
|
|
5481
|
+
locked: !formHasBalance,
|
|
5442
5482
|
handleCoinAmountChange: handleReceiveAssetAmountChange,
|
|
5443
5483
|
handleChangeAssetClick: handleChangeReceivingAssetClick,
|
|
5444
5484
|
updateAssetInputTo: updateReceiveInputTo,
|
|
@@ -5451,30 +5491,30 @@
|
|
|
5451
5491
|
ref: toAssetSelectionButtonRef,
|
|
5452
5492
|
isLoading: isLastEditedReceiving.current ? false : isLoading.current,
|
|
5453
5493
|
cryptoAssetToFiatRate: receivingAssetToFiatRate,
|
|
5454
|
-
fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
|
|
5494
|
+
fiatCurrencyCode: formHasFiat && (isLoading.current || receivingAssetToFiatRate != null) ? fiatCurrencyCode : null,
|
|
5455
5495
|
fiatCurrencyDecimals: fiatCurrencyDecimals,
|
|
5456
5496
|
balanceLoaderText: translations.input.balanceLoaderText,
|
|
5457
5497
|
fiatInputPlaceholderText: translations.input.fiatPlaceholder
|
|
5458
5498
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5459
|
-
className: s$
|
|
5499
|
+
className: s$b["swap-form-information-field"]
|
|
5460
5500
|
}, /*#__PURE__*/React__default["default"].createElement("p", null, !isPairSupported ? translations.informationBlock.pairNotAvailable : transactionFee && minimalAmountValid ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, translations.informationBlock.transactionFee, /*#__PURE__*/React__default["default"].createElement("span", null, AmountUtils.crypto(transactionFee == null ? void 0 : transactionFee.crypto, sendingAssetFeeCoinTickerPrintable)), (transactionFee == null ? void 0 : transactionFee.fiat) != null && (transactionFee == null ? void 0 : transactionFee.fiat) !== "" ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5461
5501
|
className: "semi-transparent"
|
|
5462
5502
|
}, " ~ " + AmountUtils.fiat(transactionFee == null ? void 0 : transactionFee.fiat, fiatCurrencyCode)) : "") : !isLoading.current && (isSwapCalculated || !minimalAmount.current && swapRate) ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, translations.informationBlock.swapRate, /*#__PURE__*/React__default["default"].createElement("span", null, AmountUtils.composeRateText(sendingAssetTickerPrintable, receivingAssetTickerPrintable, swapRate, receivingAssetDecimalCount, (_isFixedRate$current3 = isFixedRate.current) != null ? _isFixedRate$current3 : IS_FIXED_BY_DEFAULT))) : minimalAmount.current || maximumAmount.current ? !maximumAmountValid && maximumAmount.current != null ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, translations.informationBlock.maximumAmount, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5463
|
-
className: s$
|
|
5503
|
+
className: s$b["interactable"] + " " + s$b["red"],
|
|
5464
5504
|
onClick: isLoading.current ? function () {} : function (e) {
|
|
5465
5505
|
return callHandlingErrors(handleMaximumAmountClick, e);
|
|
5466
5506
|
}
|
|
5467
5507
|
}, AmountUtils.crypto((_maximumAmount$curren6 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren6.crypto, isLastEditedReceiving.current ? receivingAssetTickerPrintable : sendingAssetTickerPrintable)), ((_maximumAmount$curren7 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren7.fiat) != null && ((_maximumAmount$curren8 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren8.fiat) !== "" ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5468
5508
|
className: "semi-transparent"
|
|
5469
5509
|
}, " ~ " + AmountUtils.fiat(maximumAmount.current.fiat, fiatCurrencyCode)) : "") : !minimalAmount.current ? "" : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, translations.informationBlock.minimumAmount, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5470
|
-
className: s$
|
|
5510
|
+
className: s$b["interactable"] + " " + (!minimalAmountValid ? s$b["red"] : ""),
|
|
5471
5511
|
onClick: isLoading.current ? function () {} : function (e) {
|
|
5472
5512
|
return callHandlingErrors(handleMinimalAmountClick, e);
|
|
5473
5513
|
}
|
|
5474
5514
|
}, AmountUtils.crypto(minimalAmount.current.crypto, isLastEditedReceiving.current ? receivingAssetTickerPrintable : sendingAssetTickerPrintable)), ((_minimalAmount$curren7 = minimalAmount.current) == null ? void 0 : _minimalAmount$curren7.fiat) != null && minimalAmount.current.fiat !== "" ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5475
5515
|
className: "semi-transparent"
|
|
5476
|
-
}, " ~ " + AmountUtils.fiat(minimalAmount.current.fiat, fiatCurrencyCode)) : "") : isLoading.current ? sendAssetAmount.current || isSwapAll.current ? translations.informationBlock[formHasBalance ? "calculatingNetworkFee" : "calculatingSwapRates"] : translations.informationBlock.loadingMinimalAmount : "")), isAddressFieldEnabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5477
|
-
className: s$
|
|
5516
|
+
}, " ~ " + AmountUtils.fiat(minimalAmount.current.fiat, fiatCurrencyCode)) : "") : isLoading.current ? sendAssetAmount.current || receiveAssetAmount.current || isSwapAll.current ? translations.informationBlock[formHasBalance ? "calculatingNetworkFee" : "calculatingSwapRates"] : translations.informationBlock.loadingMinimalAmount : "")), isAddressFieldEnabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5517
|
+
className: s$b["swap-form-address-field"]
|
|
5478
5518
|
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
5479
5519
|
title: translations.addressFields.addressTitle
|
|
5480
5520
|
}, /*#__PURE__*/React__default["default"].createElement(Textarea, {
|
|
@@ -5520,20 +5560,20 @@
|
|
|
5520
5560
|
adaptiveHeight: true,
|
|
5521
5561
|
placeholder: translations.addressFields.extraIdPlaceholder
|
|
5522
5562
|
})) : null) : null) : null, validationContent ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5523
|
-
className: s$
|
|
5563
|
+
className: s$b["swap-form-validation-text"]
|
|
5524
5564
|
}, /*#__PURE__*/React__default["default"].createElement(Validation, {
|
|
5525
5565
|
text: validationContent
|
|
5526
5566
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5527
|
-
className: s$
|
|
5567
|
+
className: s$b["swap-form-button-container"]
|
|
5528
5568
|
}, !termsOfUseUrl || !privacyPolicyUrl ? null : /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5529
|
-
className: s$
|
|
5569
|
+
className: s$b["swap-form-button-container-consent-text"]
|
|
5530
5570
|
}, translations.consents.consentText + " ", /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5531
5571
|
href: termsOfUseUrl,
|
|
5532
|
-
className: s$
|
|
5572
|
+
className: s$b["swap-form-button-container-consent-text-link"],
|
|
5533
5573
|
target: "_blank"
|
|
5534
5574
|
}, translations.consents.termsOfUse), " " + translations.consents.and + " ", /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5535
5575
|
href: privacyPolicyUrl,
|
|
5536
|
-
className: s$
|
|
5576
|
+
className: s$b["swap-form-button-container-consent-text-link"],
|
|
5537
5577
|
target: "_blank"
|
|
5538
5578
|
}, translations.consents.privacyPolicy), "."), /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
5539
5579
|
size: "lg",
|
|
@@ -5644,7 +5684,7 @@
|
|
|
5644
5684
|
* @return {Promise<string>} xml string of generated svg image
|
|
5645
5685
|
*/
|
|
5646
5686
|
|
|
5647
|
-
function _catch$
|
|
5687
|
+
function _catch$e(body, recover) {
|
|
5648
5688
|
try {
|
|
5649
5689
|
var result = body();
|
|
5650
5690
|
} catch (e) {
|
|
@@ -5657,7 +5697,7 @@
|
|
|
5657
5697
|
}
|
|
5658
5698
|
var generateQrAndShowInCanvas = function generateQrAndShowInCanvas(encodingString) {
|
|
5659
5699
|
try {
|
|
5660
|
-
return Promise.resolve(_catch$
|
|
5700
|
+
return Promise.resolve(_catch$e(function () {
|
|
5661
5701
|
return Promise.resolve(QRCode__default["default"].toString(encodingString, {
|
|
5662
5702
|
type: "svg"
|
|
5663
5703
|
}));
|
|
@@ -5669,7 +5709,7 @@
|
|
|
5669
5709
|
}
|
|
5670
5710
|
};
|
|
5671
5711
|
|
|
5672
|
-
var s$
|
|
5712
|
+
var s$8 = {"qr-code":"_VZ0dT","fill":"_hFE1l"};
|
|
5673
5713
|
|
|
5674
5714
|
/**
|
|
5675
5715
|
* QrCode component renders a QR code for a provided crypto address.
|
|
@@ -5682,7 +5722,7 @@
|
|
|
5682
5722
|
* @returns {JSX.Element} A div containing the generated QR code.
|
|
5683
5723
|
*/
|
|
5684
5724
|
|
|
5685
|
-
function _catch$
|
|
5725
|
+
function _catch$d(body, recover) {
|
|
5686
5726
|
try {
|
|
5687
5727
|
var result = body();
|
|
5688
5728
|
} catch (e) {
|
|
@@ -5701,7 +5741,7 @@
|
|
|
5701
5741
|
React.useEffect(function () {
|
|
5702
5742
|
(function () {
|
|
5703
5743
|
try {
|
|
5704
|
-
return _catch$
|
|
5744
|
+
return _catch$d(function () {
|
|
5705
5745
|
var _temp = function () {
|
|
5706
5746
|
if (address) {
|
|
5707
5747
|
return Promise.resolve(generateQrAndShowInCanvas(address)).then(function (_generateQrAndShowInC) {
|
|
@@ -5719,7 +5759,7 @@
|
|
|
5719
5759
|
})();
|
|
5720
5760
|
}, [address]);
|
|
5721
5761
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5722
|
-
className: s$
|
|
5762
|
+
className: s$8["qr-code"] + (fill ? " " + s$8["fill"] : ""),
|
|
5723
5763
|
ref: canvasRef
|
|
5724
5764
|
});
|
|
5725
5765
|
};
|
|
@@ -5731,7 +5771,7 @@
|
|
|
5731
5771
|
fill: false
|
|
5732
5772
|
};
|
|
5733
5773
|
|
|
5734
|
-
var s$
|
|
5774
|
+
var s$7 = {"first-line-text":"_IGz2I","wrap":"_eKd8P","break":"_mT5i4","full-text":"_PVKxC","shorted":"_wB5qV","horizontal":"_lqJz-","line":"_MGRy0","second-line-text":"_hdF64"};
|
|
5735
5775
|
|
|
5736
5776
|
/**
|
|
5737
5777
|
* Renders up to three lines of text with configurable options for horizontal layout, text wrapping, and breaking.
|
|
@@ -5769,19 +5809,19 @@
|
|
|
5769
5809
|
_ref$breakFirstLine = _ref.breakFirstLine,
|
|
5770
5810
|
breakFirstLine = _ref$breakFirstLine === void 0 ? false : _ref$breakFirstLine;
|
|
5771
5811
|
return defaultTextContent ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5772
|
-
className: s$
|
|
5812
|
+
className: s$7["centered-vertically"]
|
|
5773
5813
|
}, defaultTextContent) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5774
|
-
className: isHorizontal ? s$
|
|
5814
|
+
className: isHorizontal ? s$7["horizontal"] : ""
|
|
5775
5815
|
}, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
5776
|
-
className: s$
|
|
5816
|
+
className: s$7["first-line-text"]
|
|
5777
5817
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5778
|
-
className: (isFirstLineTextReducible ? s$
|
|
5818
|
+
className: (isFirstLineTextReducible ? s$7["shorted"] : s$7["full-text"]) + " " + (wrapFirstLine ? " " + s$7["wrap"] : "") + " " + (breakFirstLine ? " " + s$7["break"] : "")
|
|
5779
5819
|
}, firstLineText), "\xA0" + firstLineNotReducibleSuffix), isHorizontal ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5780
5820
|
className: "line"
|
|
5781
5821
|
}) : null, secondLineText ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5782
|
-
className: s$
|
|
5822
|
+
className: s$7["second-line-text"]
|
|
5783
5823
|
}, secondLineText) : null, thirdLineText ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5784
|
-
className: s$
|
|
5824
|
+
className: s$7["second-line-text"]
|
|
5785
5825
|
}, thirdLineText) : null);
|
|
5786
5826
|
};
|
|
5787
5827
|
LinesOfText.propTypes = {
|
|
@@ -5807,7 +5847,7 @@
|
|
|
5807
5847
|
breakFirstLine: false
|
|
5808
5848
|
};
|
|
5809
5849
|
|
|
5810
|
-
var s$
|
|
5850
|
+
var s$6 = {"line-with-icon-link-icon":"_8HT4K","line-with-icon-link":"_m8MBC","line-with-icon-link-text":"_M7e-R"};
|
|
5811
5851
|
|
|
5812
5852
|
/**
|
|
5813
5853
|
* Renders a line with text and an accompanying icon that serves as a link.
|
|
@@ -5822,9 +5862,9 @@
|
|
|
5822
5862
|
icon = _ref.icon,
|
|
5823
5863
|
url = _ref.url;
|
|
5824
5864
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5825
|
-
className: s$
|
|
5865
|
+
className: s$6["line-with-icon-link"]
|
|
5826
5866
|
}, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
5827
|
-
className: s$
|
|
5867
|
+
className: s$6["line-with-icon-link-text"]
|
|
5828
5868
|
}, text), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5829
5869
|
href: url,
|
|
5830
5870
|
target: "_blank",
|
|
@@ -6066,7 +6106,7 @@
|
|
|
6066
6106
|
};
|
|
6067
6107
|
TitledLineWithIconLink.defaultProps = {};
|
|
6068
6108
|
|
|
6069
|
-
var s$
|
|
6109
|
+
var s$5 = {"radio-button-with-text-container":"_n8DcU","radio-button-with-text":"_BcSKE","selected":"_orWq2","disabled":"_2bALK","hide":"_-LxGT","radio-button-with-text-wrapper":"_cRkxm","radio-button-with-text-content":"_gUlt9","radio-button-with-text-dots":"_pyIax","show":"_EOvAZ"};
|
|
6070
6110
|
|
|
6071
6111
|
/**
|
|
6072
6112
|
* RadioButtonWithText component with a label and optional tooltip.
|
|
@@ -6126,10 +6166,10 @@
|
|
|
6126
6166
|
}
|
|
6127
6167
|
};
|
|
6128
6168
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6129
|
-
className: s$
|
|
6169
|
+
className: s$5["radio-button-with-text-container"]
|
|
6130
6170
|
}, /*#__PURE__*/React__default["default"].createElement("label", {
|
|
6131
6171
|
htmlFor: "radio-button-with-text-" + id,
|
|
6132
|
-
className: [s$
|
|
6172
|
+
className: [s$5["radio-button-with-text"], isSwitchedOn ? s$5["selected"] : "", isLoading ? s$5["hide"] : "", isDisabled ? s$5["disabled"] : ""].join(" "),
|
|
6133
6173
|
onMouseEnter: function onMouseEnter(e) {
|
|
6134
6174
|
return handleError(_onMouseEnter, e);
|
|
6135
6175
|
},
|
|
@@ -6142,16 +6182,16 @@
|
|
|
6142
6182
|
return setShowTooltip(false);
|
|
6143
6183
|
}
|
|
6144
6184
|
}, tooltipText)) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6145
|
-
className: s$
|
|
6185
|
+
className: s$5["radio-button-with-text-dots"] + (isLoading ? s$5["show"] : "")
|
|
6146
6186
|
}, /*#__PURE__*/React__default["default"].createElement(LoadingDots, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6147
|
-
className: s$
|
|
6187
|
+
className: s$5["radio-button-with-text-content"] + " " + ("")
|
|
6148
6188
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
6149
6189
|
id: "radio-button-with-text-" + id,
|
|
6150
6190
|
type: "checkbox",
|
|
6151
6191
|
value: isSwitchedOn,
|
|
6152
6192
|
onChange: handleChange
|
|
6153
6193
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6154
|
-
className: s$
|
|
6194
|
+
className: s$5["radio-button-with-text-wrapper"]
|
|
6155
6195
|
}, text))));
|
|
6156
6196
|
};
|
|
6157
6197
|
RadioButtonWithText.propTypes = {
|
|
@@ -6170,7 +6210,7 @@
|
|
|
6170
6210
|
id: ""
|
|
6171
6211
|
};
|
|
6172
6212
|
|
|
6173
|
-
var s$
|
|
6213
|
+
var s$4 = {"information-message":"_95-Ev","data-loaded":"_-kB8A","big-image":"_2LO1t","information-message-text":"_BiT68","white-text":"_-BraU"};
|
|
6174
6214
|
|
|
6175
6215
|
var InfoIcon = (function () {
|
|
6176
6216
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -6213,13 +6253,13 @@
|
|
|
6213
6253
|
_ref$children = _ref.children,
|
|
6214
6254
|
children = _ref$children === void 0 ? null : _ref$children;
|
|
6215
6255
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6216
|
-
className: s$
|
|
6256
|
+
className: s$4["information-message"] + (bigImage ? " " + s$4["big-image"] : "")
|
|
6217
6257
|
}, icon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6218
6258
|
src: icon,
|
|
6219
6259
|
alt: "info icon",
|
|
6220
6260
|
loading: "lazy"
|
|
6221
6261
|
}) : /*#__PURE__*/React__default["default"].createElement(InfoIcon, null), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6222
|
-
className: s$
|
|
6262
|
+
className: s$4["information-message-text"] + (whiteText ? " " + s$4["white-text"] : "")
|
|
6223
6263
|
}, text, children));
|
|
6224
6264
|
};
|
|
6225
6265
|
InformationMessage.propTypes = {
|
|
@@ -6237,7 +6277,7 @@
|
|
|
6237
6277
|
children: null
|
|
6238
6278
|
};
|
|
6239
6279
|
|
|
6240
|
-
var s$
|
|
6280
|
+
var s$3 = {"input":"_ulRDR","big-height":"_F2P0V","small-height":"_-B-mJ","disabled":"_nGsPr","fill-width":"_5xJbH","error-encountered":"_zp1RY","input-clear-button":"_iqmlY","image-background":"_YK4ec","image-background-clear-button":"_VOvdT","input-label":"_bICe7"};
|
|
6241
6281
|
|
|
6242
6282
|
/**
|
|
6243
6283
|
* Input component for forms.
|
|
@@ -6320,12 +6360,12 @@
|
|
|
6320
6360
|
}
|
|
6321
6361
|
};
|
|
6322
6362
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6323
|
-
className: [s$
|
|
6363
|
+
className: [s$3["input"], isBigHeight ? s$3["big-height"] : "", isSmallHeight ? s$3["small-height"] : "", disabled ? s$3["disabled"] : "", fillWidth ? s$3["fill-width"] : "", imageBackground ? s$3["image-background"] : ""].join(" ")
|
|
6324
6364
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
6325
6365
|
htmlFor: id,
|
|
6326
|
-
className: s$
|
|
6366
|
+
className: s$3["input-label"]
|
|
6327
6367
|
}, label) : null, clearButton ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6328
|
-
className: s$
|
|
6368
|
+
className: s$3["input-clear-button"]
|
|
6329
6369
|
}, /*#__PURE__*/React__default["default"].createElement(Close, {
|
|
6330
6370
|
onClick: handleClearButtonClick,
|
|
6331
6371
|
color: "dark-invert"
|
|
@@ -6337,7 +6377,7 @@
|
|
|
6337
6377
|
return handleError(_onChange, e);
|
|
6338
6378
|
},
|
|
6339
6379
|
placeholder: placeholder,
|
|
6340
|
-
className: className + (errorEncountered ? " " + s$
|
|
6380
|
+
className: className + (errorEncountered ? " " + s$3["error-encountered"] : ""),
|
|
6341
6381
|
defaultValue: defaultValue,
|
|
6342
6382
|
disabled: disabled,
|
|
6343
6383
|
onKeyUp: function onKeyUp(event) {
|
|
@@ -6353,7 +6393,7 @@
|
|
|
6353
6393
|
return handleError(_onChange, e);
|
|
6354
6394
|
},
|
|
6355
6395
|
placeholder: placeholder,
|
|
6356
|
-
className: className + (errorEncountered ? " " + s$
|
|
6396
|
+
className: className + (errorEncountered ? " " + s$3["error-encountered"] : ""),
|
|
6357
6397
|
value: value,
|
|
6358
6398
|
disabled: disabled,
|
|
6359
6399
|
onKeyUp: function onKeyUp(event) {
|
|
@@ -6410,12 +6450,290 @@
|
|
|
6410
6450
|
errorEncountered: false
|
|
6411
6451
|
};
|
|
6412
6452
|
|
|
6413
|
-
var s = {"coin-picker":"_mvuzQ","loading":"_18kIX","item":"_fSxCX","link":"_rOS3q","content":"_ONDTD","name":"_GlPf1","amount":"_kiTZB","icon":"_jrdDI","coin-picker-search":"_9BFcQ","coin-picker-wrapper":"_6Melc","fixed-height":"_pSvdH","reached-top":"_SQFMD","reached-bottom":"_CTcCE","coin-picker-wrapper-content":"_uK6LL","coin-picker-wrapper-content-bottom-message":"_TxE8d","coin-picker-wrapper-content-bottom-message-link":"_jX5uW","coin-picker-wrapper-content-assets":"_YA-nb","outline":"_665-T","disabled":"_hBmLs","toggle-container":"_KZMGR","arrow":"_dgQQJ","coin-picker-wrapper-content-load-more-button":"_DjR6l","coin-picker-wrapper-content-asset-not-found":"_0PUY9"};
|
|
6453
|
+
var s$2 = {"coin-picker":"_mvuzQ","loading":"_18kIX","item":"_fSxCX","link":"_rOS3q","content":"_ONDTD","name":"_GlPf1","amount":"_kiTZB","icon":"_jrdDI","coin-picker-search":"_9BFcQ","coin-picker-wrapper":"_6Melc","fixed-height":"_pSvdH","reached-top":"_SQFMD","reached-bottom":"_CTcCE","coin-picker-wrapper-content":"_uK6LL","coin-picker-wrapper-content-bottom-message":"_TxE8d","coin-picker-wrapper-content-bottom-message-link":"_jX5uW","coin-picker-wrapper-content-assets":"_YA-nb","outline":"_665-T","disabled":"_hBmLs","toggle-container":"_KZMGR","arrow":"_dgQQJ","coin-picker-wrapper-content-load-more-button":"_DjR6l","coin-picker-wrapper-content-asset-not-found":"_0PUY9"};
|
|
6414
6454
|
|
|
6415
6455
|
var FALLBACK_ASSET_ICON_URL = "https://rabbit.io/asset-icons/fallback.svg";
|
|
6416
6456
|
var DEFAULT_CRYPTO_DECIMAL_COUNT = 8;
|
|
6417
6457
|
|
|
6418
|
-
|
|
6458
|
+
/**
|
|
6459
|
+
* The model for cryptocurrency coins.
|
|
6460
|
+
*
|
|
6461
|
+
* WARNING: this class should not be instantiated directly. Use only predefined singleton Coin (or descendants) instances.
|
|
6462
|
+
*/
|
|
6463
|
+
var Coin = /*#__PURE__*/function () {
|
|
6464
|
+
/**
|
|
6465
|
+
* Creates new coin
|
|
6466
|
+
*
|
|
6467
|
+
* @param latinName {string} the coin name in latin symbols like "Bitcoin"
|
|
6468
|
+
* @param ticker {string} the coin symbol/ticker/code like 'BTC'. Always upper case. A unique coin identifier
|
|
6469
|
+
* @param tickerPrintable {string} ticker but in printable format. Useful for tokens based on external blockchains
|
|
6470
|
+
* like ERC20 or TRC20. It is not friendly to display USDTERC20 or BUSDTRC20 - more neat options are just
|
|
6471
|
+
* USDT and BUSD. Note that you should always care about user's understanding of what coin he/she is working
|
|
6472
|
+
* with as printable ticker for USDTERC20 and USDTTRC20 are the same.
|
|
6473
|
+
* @param digitsCountAfterComma {number} count of digits after the comma. E.g. 8 for bitcoin
|
|
6474
|
+
* @param maxValue {number|null} max possible value for cryptocurrency. Null means that the currency has no max possible value
|
|
6475
|
+
* @param atomName {string} name of the coin's atomic value. Like 'satoshi' for bitcoin
|
|
6476
|
+
* @param mainnet {Network} main network for this coin
|
|
6477
|
+
* @param testnet {Network} test network for this coin
|
|
6478
|
+
* @param minConfirmations {number} min confirmations count to treat the coin's transaction confirmed
|
|
6479
|
+
* @param payableEntityStringForFeeRate {string|null} the payable fee entity like byte for bitcoin or gas for ether if present
|
|
6480
|
+
* @param feeOptionsTimeStringsSortedDesc {string[]} array of 4 strings for fee options when sending coins. Should be sorted from the highest time to the smallest
|
|
6481
|
+
* @param feeRatesExpirationTimeMs {number} number of milliseconds to treat the fee rates as expired
|
|
6482
|
+
* @param blockchain {Blockchain} blockchain object
|
|
6483
|
+
* @param [protocol] {Protocol|null} token/coin protocol if relevant
|
|
6484
|
+
* @param [tokenAddress] {string|null} address of contract of this token (if the coin is token)
|
|
6485
|
+
* @param [doesUseLowerCaseAddresses] {boolean} flag to clarify whether we can use lower case addresses to ensure more robust comparisons
|
|
6486
|
+
* @param [doesUseOutputs=false] {boolean} true if this coin uses inputs/outputs concept and false if it uses just balances
|
|
6487
|
+
*/
|
|
6488
|
+
function Coin(latinName, ticker, tickerPrintable, digitsCountAfterComma, maxValue, atomName, mainnet, testnet, minConfirmations, payableEntityStringForFeeRate, feeOptionsTimeStringsSortedDesc, feeRatesExpirationTimeMs, blockchain, protocol, tokenAddress, doesUseLowerCaseAddresses, doesUseOutputs) {
|
|
6489
|
+
if (protocol === void 0) {
|
|
6490
|
+
protocol = null;
|
|
6491
|
+
}
|
|
6492
|
+
if (tokenAddress === void 0) {
|
|
6493
|
+
tokenAddress = null;
|
|
6494
|
+
}
|
|
6495
|
+
if (doesUseLowerCaseAddresses === void 0) {
|
|
6496
|
+
doesUseLowerCaseAddresses = true;
|
|
6497
|
+
}
|
|
6498
|
+
if (doesUseOutputs === void 0) {
|
|
6499
|
+
doesUseOutputs = false;
|
|
6500
|
+
}
|
|
6501
|
+
this.latinName = latinName;
|
|
6502
|
+
this.ticker = ticker;
|
|
6503
|
+
this.tickerPrintable = tickerPrintable;
|
|
6504
|
+
this.digits = digitsCountAfterComma;
|
|
6505
|
+
this.maxValue = maxValue;
|
|
6506
|
+
this.atomName = atomName;
|
|
6507
|
+
this.mainnet = mainnet;
|
|
6508
|
+
this.testnet = testnet;
|
|
6509
|
+
this.minConfirmations = minConfirmations;
|
|
6510
|
+
this.payableEntityStringForFeeRate = payableEntityStringForFeeRate;
|
|
6511
|
+
this.feeOptionsTimeStringsSortedDesc = feeOptionsTimeStringsSortedDesc;
|
|
6512
|
+
this.feeRatesExpirationTimeMs = feeRatesExpirationTimeMs;
|
|
6513
|
+
this.protocol = protocol;
|
|
6514
|
+
this.blockchain = blockchain;
|
|
6515
|
+
// TODO: [bug, critical] use testnet property for testnet contract address as it blocks the app work in testnets
|
|
6516
|
+
this.tokenAddress = tokenAddress;
|
|
6517
|
+
this.feeCoin = this;
|
|
6518
|
+
this._significantDigits = 8;
|
|
6519
|
+
this.doesUseLowerCaseAddresses = doesUseLowerCaseAddresses;
|
|
6520
|
+
this.doesUseOutputs = doesUseOutputs;
|
|
6521
|
+
}
|
|
6522
|
+
|
|
6523
|
+
/**
|
|
6524
|
+
* Sets fee coin
|
|
6525
|
+
*
|
|
6526
|
+
* @param feeCoin {Coin} some tokens use another coin to charge transaction fee as they work on top of some external
|
|
6527
|
+
* blockchain. So pass here the coin the token uses for fee charging. Like for ERC20 token the fee coin is ETH.
|
|
6528
|
+
* By default, the creating coin will be set as a value for this field.
|
|
6529
|
+
*/
|
|
6530
|
+
var _proto = Coin.prototype;
|
|
6531
|
+
_proto.setFeeCoin = function setFeeCoin(feeCoin) {
|
|
6532
|
+
this.feeCoin = feeCoin;
|
|
6533
|
+
}
|
|
6534
|
+
|
|
6535
|
+
/**
|
|
6536
|
+
* Checks whether this coin uses another coin (blockchain) to charge fee for transactions (means works on base of
|
|
6537
|
+
* some external blockchain).
|
|
6538
|
+
*
|
|
6539
|
+
* @return {boolean} true if this coin uses external blockchain to perform transactions and charge fee
|
|
6540
|
+
*/;
|
|
6541
|
+
_proto.doesUseDifferentCoinFee = function doesUseDifferentCoinFee() {
|
|
6542
|
+
return this.feeCoin !== this;
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
/**
|
|
6546
|
+
* Converts the given atoms string/number to string representing the same amount in coin itself - floating point number
|
|
6547
|
+
*
|
|
6548
|
+
* @param atoms {string} atoms positive integer amount
|
|
6549
|
+
* @return {string} coin amount floating point number as a string
|
|
6550
|
+
*/;
|
|
6551
|
+
_proto.atomsToCoinAmount = function atomsToCoinAmount(atoms) {
|
|
6552
|
+
throw new Error("Not implemented in base Coin");
|
|
6553
|
+
}
|
|
6554
|
+
|
|
6555
|
+
/**
|
|
6556
|
+
* Converts the given coins amount string/number to string representing the same amount in coin atoms - integer number
|
|
6557
|
+
*
|
|
6558
|
+
* @param coinsAmount {string} coins positive floating point amount
|
|
6559
|
+
* @return {string} coin atoms amount integer number as a string
|
|
6560
|
+
*/;
|
|
6561
|
+
_proto.coinAmountToAtoms = function coinAmountToAtoms(coinsAmount) {
|
|
6562
|
+
throw new Error("Not implemented in base Coin");
|
|
6563
|
+
}
|
|
6564
|
+
|
|
6565
|
+
/**
|
|
6566
|
+
* Composes URL to view the tx with given id in the external blockchain explorer
|
|
6567
|
+
*
|
|
6568
|
+
* @param txId {string} id of transaction
|
|
6569
|
+
* @return {string} URL string
|
|
6570
|
+
*/;
|
|
6571
|
+
_proto.composeUrlToTransactionExplorer = function composeUrlToTransactionExplorer(txId) {
|
|
6572
|
+
throw new Error("Not implemented in base Coin");
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6575
|
+
/**
|
|
6576
|
+
* Most of the cryptocurrencies has specific fee rate or fee price metric. This value usually has specific measure
|
|
6577
|
+
* like satoshi/byte or gWei/gas. This function adds the described denomination string to the given amount
|
|
6578
|
+
* as a suffix and returns the result string ready to be show to a user.
|
|
6579
|
+
*
|
|
6580
|
+
* @param coinAtomsString {string} coin atoms positive integer amount
|
|
6581
|
+
* @return {string} string of coin amount and fee rate units
|
|
6582
|
+
*/;
|
|
6583
|
+
_proto.coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString = function coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
|
|
6584
|
+
throw new Error("Not implemented in base Coin");
|
|
6585
|
+
}
|
|
6586
|
+
|
|
6587
|
+
/**
|
|
6588
|
+
* Check whether this coin support transaction prioritisation during the sending process.
|
|
6589
|
+
*
|
|
6590
|
+
* @return {boolean} true if support transaction prioritisation and false otherwise
|
|
6591
|
+
*/;
|
|
6592
|
+
_proto.doesSupportTransactionPrioritisation = function doesSupportTransactionPrioritisation() {
|
|
6593
|
+
return Array.isArray(this.feeOptionsTimeStringsSortedDesc);
|
|
6594
|
+
};
|
|
6595
|
+
_proto.tickerAndProtocol = function tickerAndProtocol() {
|
|
6596
|
+
try {
|
|
6597
|
+
var _ref;
|
|
6598
|
+
return "" + this.tickerPrintable + (this.protocol ? (_ref = " " + this.protocol.protocol) != null ? _ref : "" : "");
|
|
6599
|
+
} catch (e) {
|
|
6600
|
+
improveAndRethrow(e, "tickerAndProtocol");
|
|
6601
|
+
}
|
|
6602
|
+
};
|
|
6603
|
+
return Coin;
|
|
6604
|
+
}();
|
|
6605
|
+
|
|
6606
|
+
/**
|
|
6607
|
+
* A component that displays a list of coins that can be searched and filtered.
|
|
6608
|
+
*
|
|
6609
|
+
* @param {Object} props - The properties object.
|
|
6610
|
+
* @param {Coin[]} props.coinsList - The list of all available coins.
|
|
6611
|
+
* @param {Array<{coin: Coin, component: React.Component}>} props.coinsBundle - The bundle of coin components to be displayed.
|
|
6612
|
+
* @param {string} props.searchQuery - The search query to filter coins.
|
|
6613
|
+
* @param {boolean} props.partialLoadingEnabled - Determines if partial loading is enabled.
|
|
6614
|
+
* @param {number} props.partialLoadingIncrement - The increment of coins to load when loading more.
|
|
6615
|
+
* @param {Function} props.onListUpdated - Callback when the list of displayed coins is updated.
|
|
6616
|
+
* @param {Function} props.setIsListFull - Callback to set if the list is fully displayed.
|
|
6617
|
+
* @param {Function} props.setIsSearchResultEmpty - Callback to set if the search result is empty.
|
|
6618
|
+
* @param {number} props.triggerLoadMoreCoins - Triggers loading more coins.
|
|
6619
|
+
*/
|
|
6620
|
+
var SearchableCoinsList = function SearchableCoinsList(_ref) {
|
|
6621
|
+
var coinsList = _ref.coinsList,
|
|
6622
|
+
coinsBundle = _ref.coinsBundle,
|
|
6623
|
+
searchQuery = _ref.searchQuery,
|
|
6624
|
+
_ref$partialLoadingEn = _ref.partialLoadingEnabled,
|
|
6625
|
+
partialLoadingEnabled = _ref$partialLoadingEn === void 0 ? true : _ref$partialLoadingEn,
|
|
6626
|
+
_ref$partialLoadingIn = _ref.partialLoadingIncrement,
|
|
6627
|
+
partialLoadingIncrement = _ref$partialLoadingIn === void 0 ? 100 : _ref$partialLoadingIn,
|
|
6628
|
+
_ref$onListUpdated = _ref.onListUpdated,
|
|
6629
|
+
onListUpdated = _ref$onListUpdated === void 0 ? function () {} : _ref$onListUpdated,
|
|
6630
|
+
_ref$setIsListFull = _ref.setIsListFull,
|
|
6631
|
+
setIsListFull = _ref$setIsListFull === void 0 ? function () {} : _ref$setIsListFull,
|
|
6632
|
+
_ref$setIsSearchResul = _ref.setIsSearchResultEmpty,
|
|
6633
|
+
setIsSearchResultEmpty = _ref$setIsSearchResul === void 0 ? function () {} : _ref$setIsSearchResul,
|
|
6634
|
+
triggerLoadMoreCoins = _ref.triggerLoadMoreCoins;
|
|
6635
|
+
var _useState = React.useState([]),
|
|
6636
|
+
filteredCoins = _useState[0],
|
|
6637
|
+
setFilteredCoins = _useState[1];
|
|
6638
|
+
var _useReferredState = useReferredState(0),
|
|
6639
|
+
limitedCoinsNumber = _useReferredState[0],
|
|
6640
|
+
setLimitedCoinsNumber = _useReferredState[1];
|
|
6641
|
+
var _useState2 = React.useState([]),
|
|
6642
|
+
displayedCoins = _useState2[0],
|
|
6643
|
+
setDisplayedCoins = _useState2[1];
|
|
6644
|
+
var handleSearchAsset = function handleSearchAsset(value) {
|
|
6645
|
+
var searchTerm = value.trim().toLowerCase();
|
|
6646
|
+
if (searchTerm !== "") {
|
|
6647
|
+
var searchWords = searchTerm.split(/\s+/); // Split search terms on whitespace
|
|
6648
|
+
|
|
6649
|
+
var filteredAndSortedCoins = coinsList.filter(function (coin) {
|
|
6650
|
+
// Check if all search words are found in any of the given properties
|
|
6651
|
+
return searchWords.every(function (word) {
|
|
6652
|
+
var _coin$latinName, _coin$ticker, _coin$tickerPrintable;
|
|
6653
|
+
return (coin == null || (_coin$latinName = coin.latinName) == null ? void 0 : _coin$latinName.toLowerCase().includes(word)) || (coin == null || (_coin$ticker = coin.ticker) == null ? void 0 : _coin$ticker.toLowerCase().includes(word)) || (coin == null || (_coin$tickerPrintable = coin.tickerPrintable) == null ? void 0 : _coin$tickerPrintable.toLowerCase().includes(word));
|
|
6654
|
+
});
|
|
6655
|
+
}).sort(function (a, b) {
|
|
6656
|
+
// Check for exact matches
|
|
6657
|
+
var aMatch = a.latinName.toLowerCase() === searchTerm || a.ticker.toLowerCase() === searchTerm || a.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6658
|
+
var bMatch = b.latinName.toLowerCase() === searchTerm || b.ticker.toLowerCase() === searchTerm || b.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6659
|
+
if (bMatch - aMatch !== 0) {
|
|
6660
|
+
// Prioritize exact matches to the top
|
|
6661
|
+
return bMatch - aMatch;
|
|
6662
|
+
} else {
|
|
6663
|
+
// Sort remaining items alphabetically by latinName
|
|
6664
|
+
return a.latinName.toLowerCase().localeCompare(b.latinName.toLowerCase());
|
|
6665
|
+
}
|
|
6666
|
+
});
|
|
6667
|
+
setFilteredCoins(filteredAndSortedCoins);
|
|
6668
|
+
} else {
|
|
6669
|
+
setFilteredCoins(coinsList); // Reset to original list if search term is empty
|
|
6670
|
+
}
|
|
6671
|
+
};
|
|
6672
|
+
var updateDisplayedCoins = function updateDisplayedCoins() {
|
|
6673
|
+
var fullList = limitedCoinsNumber.current >= filteredCoins.length;
|
|
6674
|
+
setDisplayedCoins(fullList ? filteredCoins : filteredCoins.slice(0, limitedCoinsNumber.current));
|
|
6675
|
+
setIsListFull(fullList);
|
|
6676
|
+
};
|
|
6677
|
+
var displayMoreCoins = function displayMoreCoins() {
|
|
6678
|
+
setLimitedCoinsNumber(function (prev) {
|
|
6679
|
+
return prev + partialLoadingIncrement;
|
|
6680
|
+
});
|
|
6681
|
+
updateDisplayedCoins();
|
|
6682
|
+
};
|
|
6683
|
+
|
|
6684
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6685
|
+
React.useEffect(function () {
|
|
6686
|
+
return onListUpdated();
|
|
6687
|
+
}, [displayedCoins]);
|
|
6688
|
+
|
|
6689
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6690
|
+
React.useEffect(function () {
|
|
6691
|
+
return displayMoreCoins();
|
|
6692
|
+
}, [triggerLoadMoreCoins]);
|
|
6693
|
+
React.useEffect(function () {
|
|
6694
|
+
if ((filteredCoins == null ? void 0 : filteredCoins.length) > partialLoadingIncrement && partialLoadingEnabled) {
|
|
6695
|
+
setLimitedCoinsNumber(partialLoadingIncrement);
|
|
6696
|
+
updateDisplayedCoins();
|
|
6697
|
+
} else {
|
|
6698
|
+
setLimitedCoinsNumber(0);
|
|
6699
|
+
setDisplayedCoins(filteredCoins);
|
|
6700
|
+
setIsListFull(true);
|
|
6701
|
+
}
|
|
6702
|
+
setIsSearchResultEmpty((filteredCoins == null ? void 0 : filteredCoins.length) === 0 && searchQuery !== "");
|
|
6703
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6704
|
+
}, [filteredCoins]);
|
|
6705
|
+
React.useEffect(function () {
|
|
6706
|
+
if (coinsBundle != null) handleSearchAsset(searchQuery);
|
|
6707
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6708
|
+
}, [coinsList, searchQuery]);
|
|
6709
|
+
return displayedCoins.map(function (coin) {
|
|
6710
|
+
return coinsBundle.find(function (bundleItem) {
|
|
6711
|
+
return bundleItem.coin.ticker === coin.ticker;
|
|
6712
|
+
}).component;
|
|
6713
|
+
}).map(function (Item) {
|
|
6714
|
+
return /*#__PURE__*/React__default["default"].createElement(Item, null);
|
|
6715
|
+
});
|
|
6716
|
+
};
|
|
6717
|
+
SearchableCoinsList.propTypes = {
|
|
6718
|
+
coinsList: PropTypes.array.isRequired,
|
|
6719
|
+
coinsBundle: PropTypes.array.isRequired,
|
|
6720
|
+
searchQuery: PropTypes.string.isRequired,
|
|
6721
|
+
partialLoadingEnabled: PropTypes.bool,
|
|
6722
|
+
partialLoadingIncrement: PropTypes.number,
|
|
6723
|
+
onListUpdated: PropTypes.func,
|
|
6724
|
+
setIsListFull: PropTypes.func,
|
|
6725
|
+
setIsSearchResultEmpty: PropTypes.func,
|
|
6726
|
+
triggerLoadMoreCoins: PropTypes.number
|
|
6727
|
+
};
|
|
6728
|
+
SearchableCoinsList.defaultProps = {
|
|
6729
|
+
partialLoadingEnabled: true,
|
|
6730
|
+
partialLoadingIncrement: 100,
|
|
6731
|
+
onListUpdated: function onListUpdated() {},
|
|
6732
|
+
setIsListFull: function setIsListFull() {},
|
|
6733
|
+
setIsSearchResultEmpty: function setIsSearchResultEmpty() {}
|
|
6734
|
+
};
|
|
6735
|
+
|
|
6736
|
+
function _catch$c(body, recover) {
|
|
6419
6737
|
try {
|
|
6420
6738
|
var result = body();
|
|
6421
6739
|
} catch (e) {
|
|
@@ -6516,39 +6834,36 @@
|
|
|
6516
6834
|
var _useState = React.useState(null),
|
|
6517
6835
|
coins = _useState[0],
|
|
6518
6836
|
setCoins = _useState[1];
|
|
6519
|
-
var _useState2 = React.useState([]),
|
|
6520
|
-
filteredCoins = _useState2[0],
|
|
6521
|
-
setFilteredCoins = _useState2[1];
|
|
6522
6837
|
var _useReferredState = useReferredState({}),
|
|
6523
6838
|
initiallyEnabledCoins = _useReferredState[0],
|
|
6524
6839
|
setInitiallyEnabledCoins = _useReferredState[1];
|
|
6525
6840
|
var _useReferredState2 = useReferredState({}),
|
|
6526
6841
|
currentlyEnabledCoins = _useReferredState2[0],
|
|
6527
6842
|
setCurrentlyEnabledCoins = _useReferredState2[1];
|
|
6843
|
+
var _useState2 = React.useState(""),
|
|
6844
|
+
searchFieldValue = _useState2[0],
|
|
6845
|
+
setSearchFieldValue = _useState2[1];
|
|
6528
6846
|
var _useState3 = React.useState(""),
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
var _useState4 = React.useState(
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
var _useState5 = React.useState(
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
var _useState6 = React.useState(
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
var _useState7 = React.useState(
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
var _useState8 = React.useState(
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
var _useState9 = React.useState(
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
var _useState10 = React.useState(true),
|
|
6550
|
-
isListFull = _useState10[0],
|
|
6551
|
-
setIsListFull = _useState10[1];
|
|
6847
|
+
scrollWrapperClass = _useState3[0],
|
|
6848
|
+
setScrollWrapperClass = _useState3[1];
|
|
6849
|
+
var _useState4 = React.useState(false),
|
|
6850
|
+
searchEnabled = _useState4[0],
|
|
6851
|
+
setSearchEnabled = _useState4[1];
|
|
6852
|
+
var _useState5 = React.useState(null),
|
|
6853
|
+
coinsContent = _useState5[0],
|
|
6854
|
+
setCoinsContent = _useState5[1];
|
|
6855
|
+
var _useState6 = React.useState(false),
|
|
6856
|
+
isCoinsDataReloadable = _useState6[0],
|
|
6857
|
+
setIsCoinsDataReloadable = _useState6[1];
|
|
6858
|
+
var _useState7 = React.useState(true),
|
|
6859
|
+
isListFull = _useState7[0],
|
|
6860
|
+
setIsListFull = _useState7[1];
|
|
6861
|
+
var _useState8 = React.useState(false),
|
|
6862
|
+
isSearchResultEmpty = _useState8[0],
|
|
6863
|
+
setIsSearchResultEmpty = _useState8[1];
|
|
6864
|
+
var _useState9 = React.useState(0),
|
|
6865
|
+
triggerLoadMoreCoins = _useState9[0],
|
|
6866
|
+
setTriggerLoadMoreCoins = _useState9[1];
|
|
6552
6867
|
var searchRef = React.useRef();
|
|
6553
6868
|
var scrollContainerRef = React.useRef();
|
|
6554
6869
|
var skeletonItemsCount = (initiallyEnabledCoinsList == null ? void 0 : initiallyEnabledCoinsList.length) || (partialLoadingEnabled ? partialLoadingIncrement : 6);
|
|
@@ -6606,43 +6921,12 @@
|
|
|
6606
6921
|
if (mode === COIN_PICKER_MODES.CHECKBOX) handleToggleClick(coin.ticker);
|
|
6607
6922
|
handleClick(coin.ticker);
|
|
6608
6923
|
};
|
|
6609
|
-
var handleSearchAsset = function handleSearchAsset(value) {
|
|
6610
|
-
// TODO: [refactoring, high] use unified search function. task_id=be0475316f374dd4a926c948d969e704
|
|
6611
|
-
setSearchFieldValue(value); // Trim the input to handle leading/trailing spaces
|
|
6612
|
-
var searchTerm = value.trim().toLowerCase();
|
|
6613
|
-
if (searchTerm !== "") {
|
|
6614
|
-
var searchWords = searchTerm.split(/\s+/); // Split search terms on whitespace
|
|
6615
|
-
|
|
6616
|
-
var filteredAndSortedCoins = coins.filter(function (coin) {
|
|
6617
|
-
// Check if all search words are found in any of the given properties
|
|
6618
|
-
return searchWords.every(function (word) {
|
|
6619
|
-
var _coin$latinName, _coin$ticker, _coin$tickerPrintable;
|
|
6620
|
-
return (coin == null || (_coin$latinName = coin.latinName) == null ? void 0 : _coin$latinName.toLowerCase().includes(word)) || (coin == null || (_coin$ticker = coin.ticker) == null ? void 0 : _coin$ticker.toLowerCase().includes(word)) || (coin == null || (_coin$tickerPrintable = coin.tickerPrintable) == null ? void 0 : _coin$tickerPrintable.toLowerCase().includes(word));
|
|
6621
|
-
});
|
|
6622
|
-
}).sort(function (a, b) {
|
|
6623
|
-
// Check for exact matches
|
|
6624
|
-
var aMatch = a.latinName.toLowerCase() === searchTerm || a.ticker.toLowerCase() === searchTerm || a.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6625
|
-
var bMatch = b.latinName.toLowerCase() === searchTerm || b.ticker.toLowerCase() === searchTerm || b.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6626
|
-
if (bMatch - aMatch !== 0) {
|
|
6627
|
-
// Prioritize exact matches to the top
|
|
6628
|
-
return bMatch - aMatch;
|
|
6629
|
-
} else {
|
|
6630
|
-
// Sort remaining items alphabetically by latinName
|
|
6631
|
-
return a.latinName.toLowerCase().localeCompare(b.latinName.toLowerCase());
|
|
6632
|
-
}
|
|
6633
|
-
});
|
|
6634
|
-
setFilteredCoins(filteredAndSortedCoins);
|
|
6635
|
-
} else {
|
|
6636
|
-
setFilteredCoins(coins); // Reset to original list if search term is empty
|
|
6637
|
-
}
|
|
6638
|
-
};
|
|
6639
6924
|
var loadCoinsAndSaveToState = function loadCoinsAndSaveToState() {
|
|
6640
6925
|
(function () {
|
|
6641
6926
|
try {
|
|
6642
|
-
var _temp = _catch$
|
|
6927
|
+
var _temp = _catch$c(function () {
|
|
6643
6928
|
return Promise.resolve(loadCoinsAndContent ? loadCoinsAndContent() : defaultLoadCoinsAndContent()).then(function (data) {
|
|
6644
6929
|
setCoins(data.coins);
|
|
6645
|
-
setFilteredCoins(data.coins);
|
|
6646
6930
|
setCoinsContent(data.content);
|
|
6647
6931
|
setIsCoinsDataReloadable(!!data.isCoinsDataReloadable);
|
|
6648
6932
|
});
|
|
@@ -6690,45 +6974,22 @@
|
|
|
6690
6974
|
setSearchEnabled(search ? true : searchAdaptive && initiallyEnabledCoinsList ? initiallyEnabledCoinsList.length > 6 : false);
|
|
6691
6975
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6692
6976
|
}, [search, searchAdaptive, coins]);
|
|
6693
|
-
React.useEffect(function () {
|
|
6694
|
-
if ((filteredCoins == null ? void 0 : filteredCoins.length) > partialLoadingIncrement && partialLoadingEnabled) {
|
|
6695
|
-
setLimitedCoinsNumber(partialLoadingIncrement);
|
|
6696
|
-
} else {
|
|
6697
|
-
setLimitedCoinsNumber(0);
|
|
6698
|
-
setDisplayedCoins(filteredCoins);
|
|
6699
|
-
setIsListFull(true);
|
|
6700
|
-
}
|
|
6701
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6702
|
-
}, [filteredCoins]);
|
|
6703
|
-
React.useEffect(function () {
|
|
6704
|
-
if (limitedCoinsNumber > 0) {
|
|
6705
|
-
var coinsToDisplay = filteredCoins.slice(0, limitedCoinsNumber);
|
|
6706
|
-
setDisplayedCoins(coinsToDisplay);
|
|
6707
|
-
setIsListFull(coinsToDisplay.length === filteredCoins.length);
|
|
6708
|
-
}
|
|
6709
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6710
|
-
}, [limitedCoinsNumber]);
|
|
6711
|
-
var displayMoreCoins = function displayMoreCoins() {
|
|
6712
|
-
setLimitedCoinsNumber(function (prev) {
|
|
6713
|
-
return prev + partialLoadingIncrement;
|
|
6714
|
-
});
|
|
6715
|
-
};
|
|
6716
6977
|
var skeleton = function skeleton() {
|
|
6717
6978
|
var skeletonItems = [];
|
|
6718
6979
|
for (var i = 0; i < skeletonItemsCount; i++) {
|
|
6719
6980
|
skeletonItems.push( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6720
|
-
className: s["item"],
|
|
6981
|
+
className: s$2["item"],
|
|
6721
6982
|
key: "coin-picker-skeleton-" + i
|
|
6722
6983
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6723
|
-
className: s["link"] + " " + s["loading"]
|
|
6984
|
+
className: s$2["link"] + " " + s$2["loading"]
|
|
6724
6985
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6725
|
-
className: s["icon"] + " " + "skeleton-dark"
|
|
6986
|
+
className: s$2["icon"] + " " + "skeleton-dark"
|
|
6726
6987
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6727
|
-
className: s["content"]
|
|
6988
|
+
className: s$2["content"]
|
|
6728
6989
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6729
|
-
className: s["name"] + " " + "skeleton-dark"
|
|
6990
|
+
className: s$2["name"] + " " + "skeleton-dark"
|
|
6730
6991
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6731
|
-
className: s["amount"] + " " + "skeleton-dark"
|
|
6992
|
+
className: s$2["amount"] + " " + "skeleton-dark"
|
|
6732
6993
|
})))));
|
|
6733
6994
|
}
|
|
6734
6995
|
return skeletonItems;
|
|
@@ -6736,24 +6997,27 @@
|
|
|
6736
6997
|
var handleScroll = function handleScroll() {
|
|
6737
6998
|
var _scrollContainerRef$c, _scrollContainerRef$c2, _scrollContainerRef$c3, _scrollContainerRef$c4, _scrollContainerRef$c5, _scrollContainerRef$c6, _scrollContainerRef$c7;
|
|
6738
6999
|
if (scrollWrapperClass !== "") setScrollWrapperClass("");
|
|
6739
|
-
if (((_scrollContainerRef$c = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c.scrollTop) === 0) setScrollWrapperClass(s["reached-top"] + (((_scrollContainerRef$c2 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c2.scrollHeight) - ((_scrollContainerRef$c3 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c3.clientHeight) === 0 ? " " + s["reached-bottom"] : ""));
|
|
6740
|
-
if (((_scrollContainerRef$c4 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c4.scrollTop) > 0 && ((_scrollContainerRef$c5 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c5.scrollTop) === ((_scrollContainerRef$c6 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c6.scrollHeight) - ((_scrollContainerRef$c7 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c7.clientHeight)) setScrollWrapperClass(s["reached-bottom"]);
|
|
7000
|
+
if (((_scrollContainerRef$c = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c.scrollTop) === 0) setScrollWrapperClass(s$2["reached-top"] + (((_scrollContainerRef$c2 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c2.scrollHeight) - ((_scrollContainerRef$c3 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c3.clientHeight) === 0 ? " " + s$2["reached-bottom"] : ""));
|
|
7001
|
+
if (((_scrollContainerRef$c4 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c4.scrollTop) > 0 && ((_scrollContainerRef$c5 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c5.scrollTop) === ((_scrollContainerRef$c6 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c6.scrollHeight) - ((_scrollContainerRef$c7 = scrollContainerRef.current) == null ? void 0 : _scrollContainerRef$c7.clientHeight)) setScrollWrapperClass(s$2["reached-bottom"]);
|
|
7002
|
+
};
|
|
7003
|
+
var displayMoreCoins = function displayMoreCoins() {
|
|
7004
|
+
return setTriggerLoadMoreCoins(function (prev) {
|
|
7005
|
+
return prev + 1;
|
|
7006
|
+
});
|
|
6741
7007
|
};
|
|
6742
7008
|
|
|
6743
7009
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6744
7010
|
React.useEffect(handleScroll, []);
|
|
6745
|
-
|
|
6746
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6747
|
-
React.useEffect(handleScroll, [filteredCoins]);
|
|
6748
7011
|
var shouldShowSkeleton = coins == null;
|
|
6749
7012
|
return coins ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6750
|
-
className: s["coin-picker"] + (shouldShowSkeleton ? " " + s["loading"] : "")
|
|
7013
|
+
className: s$2["coin-picker"] + (shouldShowSkeleton ? " " + s$2["loading"] : "")
|
|
6751
7014
|
}, searchEnabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6752
|
-
className: s["coin-picker-search"]
|
|
7015
|
+
className: s$2["coin-picker-search"]
|
|
6753
7016
|
}, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6754
7017
|
value: searchFieldValue,
|
|
6755
7018
|
onChange: function onChange(e) {
|
|
6756
|
-
|
|
7019
|
+
setSearchFieldValue(e.target.value);
|
|
7020
|
+
handleScroll();
|
|
6757
7021
|
},
|
|
6758
7022
|
placeholder: texts.searchPlaceholder,
|
|
6759
7023
|
isSmallHeight: true,
|
|
@@ -6761,71 +7025,88 @@
|
|
|
6761
7025
|
ref: searchRef,
|
|
6762
7026
|
disabled: shouldShowSkeleton
|
|
6763
7027
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6764
|
-
className: s["coin-picker-wrapper"] + " " + scrollWrapperClass + (searchEnabled ? " " + s["fixed-height"] : "")
|
|
7028
|
+
className: s$2["coin-picker-wrapper"] + " " + scrollWrapperClass + (searchEnabled ? " " + s$2["fixed-height"] : "")
|
|
6765
7029
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6766
|
-
className: s["coin-picker-wrapper-content"] + (searchEnabled ? " " + s["fixed-height"] : ""),
|
|
7030
|
+
className: s$2["coin-picker-wrapper-content"] + (searchEnabled ? " " + s$2["fixed-height"] : ""),
|
|
6767
7031
|
ref: scrollContainerRef,
|
|
6768
7032
|
onScroll: handleScroll
|
|
6769
7033
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6770
|
-
className: s["coin-picker-wrapper-content-assets"]
|
|
6771
|
-
}, shouldShowSkeleton ? skeleton() :
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
7034
|
+
className: s$2["coin-picker-wrapper-content-assets"]
|
|
7035
|
+
}, shouldShowSkeleton ? skeleton() : /*#__PURE__*/React__default["default"].createElement(SearchableCoinsList, {
|
|
7036
|
+
searchQuery: searchFieldValue,
|
|
7037
|
+
onListUpdated: function onListUpdated() {
|
|
7038
|
+
return handleScroll();
|
|
7039
|
+
},
|
|
7040
|
+
setIsListFull: setIsListFull,
|
|
7041
|
+
setIsSearchResultEmpty: setIsSearchResultEmpty,
|
|
7042
|
+
triggerLoadMoreCoins: triggerLoadMoreCoins,
|
|
7043
|
+
coinsList: allCoins,
|
|
7044
|
+
coinsBundle: allCoins.map(function (coin, index) {
|
|
7045
|
+
return {
|
|
7046
|
+
coin: coin,
|
|
7047
|
+
component: function component() {
|
|
7048
|
+
var _coinsContent$find$su, _coinsContent$find;
|
|
7049
|
+
var _coinToIconPaths = coinToIconPaths(coin),
|
|
7050
|
+
assetIconSrc = _coinToIconPaths.assetIconSrc,
|
|
7051
|
+
assetIconProtocolSrc = _coinToIconPaths.assetIconProtocolSrc;
|
|
7052
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7053
|
+
className: s$2["item"],
|
|
7054
|
+
key: "picker-" + coin.ticker + "-" + index,
|
|
7055
|
+
onClick: function onClick(e) {
|
|
7056
|
+
return handleError(function () {
|
|
7057
|
+
return handleCoinClick(coin);
|
|
7058
|
+
}, e);
|
|
7059
|
+
}
|
|
7060
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7061
|
+
className: s$2["link"] + (currentlyEnabledCoins.current[coin.ticker] !== initiallyEnabledCoins.current[coin.ticker] ? " " + s$2["outline"] : "")
|
|
7062
|
+
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
7063
|
+
assetIconSrc: assetIconSrc,
|
|
7064
|
+
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
7065
|
+
fallbackSrc: FALLBACK_ASSET_ICON_URL
|
|
7066
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7067
|
+
className: s$2["content"],
|
|
7068
|
+
key: coin.ticker
|
|
7069
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7070
|
+
className: s$2["name"]
|
|
7071
|
+
}, coin.latinName), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7072
|
+
className: s$2["amount"]
|
|
7073
|
+
}, (_coinsContent$find$su = coinsContent == null || (_coinsContent$find = coinsContent.find(function (i) {
|
|
7074
|
+
return i.coin === coin;
|
|
7075
|
+
})) == null ? void 0 : _coinsContent$find.subtitle) != null ? _coinsContent$find$su : "")), mode === COIN_PICKER_MODES.BUTTON ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7076
|
+
className: s$2["arrow"]
|
|
7077
|
+
}, /*#__PURE__*/React__default["default"].createElement(ArrowIcon, null)) : mode === COIN_PICKER_MODES.CHECKBOX ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7078
|
+
className: s$2["toggle-container"]
|
|
7079
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonWithText, {
|
|
7080
|
+
onStateChange: function onStateChange(resetButtonLoader) {
|
|
7081
|
+
return handleToggleClick(coin.ticker, resetButtonLoader);
|
|
7082
|
+
},
|
|
7083
|
+
isSwitchedOn: currentlyEnabledCoins.current[coin.ticker],
|
|
7084
|
+
id: index
|
|
7085
|
+
})) : ""));
|
|
7086
|
+
}
|
|
7087
|
+
};
|
|
7088
|
+
})
|
|
7089
|
+
})), isSearchResultEmpty ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7090
|
+
className: s$2["coin-picker-wrapper-content-asset-not-found"]
|
|
6812
7091
|
}, /*#__PURE__*/React__default["default"].createElement("h6", null, texts.noAssetsMessage)) : "", partialLoadingEnabled && !isListFull ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6813
|
-
className: s["coin-picker-wrapper-content-load-more-button"]
|
|
7092
|
+
className: s$2["coin-picker-wrapper-content-load-more-button"]
|
|
6814
7093
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
6815
7094
|
mode: "primary-transparent",
|
|
6816
7095
|
size: "sm",
|
|
6817
7096
|
loader: false,
|
|
6818
7097
|
content: texts.loadMoreButton,
|
|
6819
|
-
onClick:
|
|
7098
|
+
onClick: function onClick() {
|
|
7099
|
+
return displayMoreCoins();
|
|
7100
|
+
},
|
|
6820
7101
|
handleError: handleError
|
|
6821
7102
|
})) : "", searchEnabled && showRequestMissingCoinsInfoMessage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6822
|
-
className: s["coin-picker-wrapper-content-bottom-message"]
|
|
7103
|
+
className: s$2["coin-picker-wrapper-content-bottom-message"]
|
|
6823
7104
|
}, /*#__PURE__*/React__default["default"].createElement(InformationMessage, {
|
|
6824
7105
|
text: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, texts.assetSuggestionMessage.part1, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
6825
7106
|
target: "_blank",
|
|
6826
7107
|
rel: "noreferrer",
|
|
6827
7108
|
href: supportUrl,
|
|
6828
|
-
className: s["coin-picker-wrapper-content-bottom-message-link"]
|
|
7109
|
+
className: s$2["coin-picker-wrapper-content-bottom-message-link"]
|
|
6829
7110
|
}, " " + texts.assetSuggestionMessage.part2 + " "), texts.assetSuggestionMessage.part3)
|
|
6830
7111
|
})) : "")))) : /*#__PURE__*/React__default["default"].createElement(LoadingDots, null);
|
|
6831
7112
|
};
|
|
@@ -6910,34 +7191,433 @@
|
|
|
6910
7191
|
texts = _ref.texts;
|
|
6911
7192
|
return /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
6912
7193
|
controls: controls,
|
|
6913
|
-
stepName: stepName,
|
|
6914
|
-
title: title,
|
|
6915
|
-
subtitle: subtitle,
|
|
6916
|
-
cornerBackButtonTitle: cornerBackButtonTitle,
|
|
6917
|
-
cornerBackButtonClick: cornerBackButtonClick,
|
|
6918
|
-
confirmButtonText: confirmButtonText,
|
|
6919
|
-
confirmButtonClick: confirmButtonClick,
|
|
6920
|
-
showCornerBackButton: showCornerBackButton,
|
|
6921
|
-
headerTitleLeft: true,
|
|
7194
|
+
stepName: stepName,
|
|
7195
|
+
title: title,
|
|
7196
|
+
subtitle: subtitle,
|
|
7197
|
+
cornerBackButtonTitle: cornerBackButtonTitle,
|
|
7198
|
+
cornerBackButtonClick: cornerBackButtonClick,
|
|
7199
|
+
confirmButtonText: confirmButtonText,
|
|
7200
|
+
confirmButtonClick: confirmButtonClick,
|
|
7201
|
+
showCornerBackButton: showCornerBackButton,
|
|
7202
|
+
headerTitleLeft: true,
|
|
7203
|
+
subtitleSmallMargin: true,
|
|
7204
|
+
width: controls ? DIALOG_SIZES.largePlus.width : null
|
|
7205
|
+
}, /*#__PURE__*/React__default["default"].createElement(CoinPicker, {
|
|
7206
|
+
mode: mode,
|
|
7207
|
+
allCoins: allCoins,
|
|
7208
|
+
initiallyEnabledCoinsList: initiallyEnabledCoinsList,
|
|
7209
|
+
handleClick: function handleClick(ticker) {
|
|
7210
|
+
return handleCoinSelection(ticker);
|
|
7211
|
+
},
|
|
7212
|
+
triggerToReloadData: triggerToReloadData,
|
|
7213
|
+
search: search,
|
|
7214
|
+
searchAdaptive: searchAdaptive,
|
|
7215
|
+
loadCoinsAndContent: loadCoinsAndContent,
|
|
7216
|
+
showRequestMissingCoinsInfoMessage: showRequestMissingCoinsInfoMessage,
|
|
7217
|
+
coinToIconPaths: coinToIconPaths,
|
|
7218
|
+
supportUrl: supportUrl,
|
|
7219
|
+
texts: texts
|
|
7220
|
+
}));
|
|
7221
|
+
};
|
|
7222
|
+
|
|
7223
|
+
var s$1 = {"colored-notice":"_ZE1ju","colored-notice-text":"_aN0LH"};
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* ColoredNotice component displays a notice with optional text and a button.
|
|
7227
|
+
*
|
|
7228
|
+
* @component
|
|
7229
|
+
* @param {Object} props - The component props.
|
|
7230
|
+
* @param {string} [props.text] - The text to be displayed in the notice.
|
|
7231
|
+
* @param {string} [props.buttonTitle] - The title of the button.
|
|
7232
|
+
* @param {function} [props.onButtonClick] - Callback function to be called when the button is clicked.
|
|
7233
|
+
* @returns {JSX.Element} The ColoredNotice component.
|
|
7234
|
+
*/
|
|
7235
|
+
var ColoredNotice = function ColoredNotice(_ref) {
|
|
7236
|
+
var _ref$text = _ref.text,
|
|
7237
|
+
text = _ref$text === void 0 ? "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor." : _ref$text,
|
|
7238
|
+
buttonTitle = _ref.buttonTitle,
|
|
7239
|
+
_ref$onButtonClick = _ref.onButtonClick,
|
|
7240
|
+
onButtonClick = _ref$onButtonClick === void 0 ? function () {} : _ref$onButtonClick;
|
|
7241
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7242
|
+
className: s$1["colored-notice"]
|
|
7243
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7244
|
+
className: s$1["colored-notice-text"]
|
|
7245
|
+
}, text), buttonTitle ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
7246
|
+
mode: "primary",
|
|
7247
|
+
size: "sm",
|
|
7248
|
+
content: buttonTitle,
|
|
7249
|
+
loader: false,
|
|
7250
|
+
onClick: onButtonClick
|
|
7251
|
+
}) : null);
|
|
7252
|
+
};
|
|
7253
|
+
ColoredNotice.propTypes = {
|
|
7254
|
+
text: PropTypes.string,
|
|
7255
|
+
buttonTitle: PropTypes.string,
|
|
7256
|
+
onButtonClick: PropTypes.func
|
|
7257
|
+
};
|
|
7258
|
+
ColoredNotice.defaultProps = {
|
|
7259
|
+
text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.",
|
|
7260
|
+
onButtonClick: function onButtonClick() {}
|
|
7261
|
+
};
|
|
7262
|
+
|
|
7263
|
+
var messageIcon = (function () {
|
|
7264
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
7265
|
+
width: "130",
|
|
7266
|
+
height: "130",
|
|
7267
|
+
viewBox: "0 0 130 130",
|
|
7268
|
+
fill: "none",
|
|
7269
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7270
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7271
|
+
"fill-rule": "evenodd",
|
|
7272
|
+
"clip-rule": "evenodd",
|
|
7273
|
+
d: "M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z",
|
|
7274
|
+
fill: "#2294F0"
|
|
7275
|
+
}), /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
7276
|
+
id: "mask0",
|
|
7277
|
+
style: {
|
|
7278
|
+
maskType: "alpha"
|
|
7279
|
+
},
|
|
7280
|
+
maskUnits: "userSpaceOnUse",
|
|
7281
|
+
x: "0",
|
|
7282
|
+
y: "0",
|
|
7283
|
+
width: "130",
|
|
7284
|
+
height: "130"
|
|
7285
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7286
|
+
"fill-rule": "evenodd",
|
|
7287
|
+
"clip-rule": "evenodd",
|
|
7288
|
+
d: "M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z",
|
|
7289
|
+
fill: "white"
|
|
7290
|
+
})), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
7291
|
+
mask: "url(#mask0)"
|
|
7292
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7293
|
+
opacity: "0.3",
|
|
7294
|
+
x: "3.25",
|
|
7295
|
+
y: "150.776",
|
|
7296
|
+
width: "227.136",
|
|
7297
|
+
height: "25.2373",
|
|
7298
|
+
transform: "rotate(-45 3.25 150.776)",
|
|
7299
|
+
fill: "white"
|
|
7300
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7301
|
+
opacity: "0.3",
|
|
7302
|
+
x: "-48.4546",
|
|
7303
|
+
y: "126.52",
|
|
7304
|
+
width: "227.136",
|
|
7305
|
+
height: "25.2373",
|
|
7306
|
+
transform: "rotate(-45 -48.4546 126.52)",
|
|
7307
|
+
fill: "white"
|
|
7308
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7309
|
+
x: "27.75",
|
|
7310
|
+
y: "29.5",
|
|
7311
|
+
width: "74.5",
|
|
7312
|
+
height: "81.5",
|
|
7313
|
+
rx: "12",
|
|
7314
|
+
fill: "white"
|
|
7315
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7316
|
+
d: "M27.75 41.5C27.75 34.8726 33.1226 29.5 39.75 29.5H90.25C96.8774 29.5 102.25 34.8726 102.25 41.5V118C102.25 124.627 96.8774 130 90.25 130H39.75C33.1226 130 27.75 124.627 27.75 118V41.5Z",
|
|
7317
|
+
fill: "white"
|
|
7318
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7319
|
+
"fill-rule": "evenodd",
|
|
7320
|
+
"clip-rule": "evenodd",
|
|
7321
|
+
d: "M51.5 63.5C58.1274 63.5 63.5 58.1274 63.5 51.5C63.5 44.8726 58.1274 39.5 51.5 39.5C44.8726 39.5 39.5 44.8726 39.5 51.5C39.5 58.1274 44.8726 63.5 51.5 63.5Z",
|
|
7322
|
+
fill: "#2294F0"
|
|
7323
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7324
|
+
d: "M50.072 49.088H52.03V54.5H50.072V49.088ZM52.074 46.382V48.153H50.028V46.382H52.074Z",
|
|
7325
|
+
fill: "white"
|
|
7326
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7327
|
+
opacity: "0.2",
|
|
7328
|
+
d: "M41 74.5H63",
|
|
7329
|
+
stroke: "#2294F0",
|
|
7330
|
+
"stroke-width": "4",
|
|
7331
|
+
"stroke-linecap": "round",
|
|
7332
|
+
"stroke-linejoin": "round"
|
|
7333
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7334
|
+
opacity: "0.2",
|
|
7335
|
+
d: "M41 84.6157H84.1426",
|
|
7336
|
+
stroke: "#2294F0",
|
|
7337
|
+
"stroke-width": "4",
|
|
7338
|
+
"stroke-linecap": "round",
|
|
7339
|
+
"stroke-linejoin": "round"
|
|
7340
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7341
|
+
opacity: "0.2",
|
|
7342
|
+
d: "M41 94.7314H84.1426",
|
|
7343
|
+
stroke: "#2294F0",
|
|
7344
|
+
"stroke-width": "4",
|
|
7345
|
+
"stroke-linecap": "round",
|
|
7346
|
+
"stroke-linejoin": "round"
|
|
7347
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7348
|
+
opacity: "0.2",
|
|
7349
|
+
d: "M41 104.731H84.1426",
|
|
7350
|
+
stroke: "#2294F0",
|
|
7351
|
+
"stroke-width": "4",
|
|
7352
|
+
"stroke-linecap": "round",
|
|
7353
|
+
"stroke-linejoin": "round"
|
|
7354
|
+
})));
|
|
7355
|
+
});
|
|
7356
|
+
|
|
7357
|
+
var supportDialogImage = (function () {
|
|
7358
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
7359
|
+
width: "130",
|
|
7360
|
+
height: "130",
|
|
7361
|
+
viewBox: "0 0 130 130",
|
|
7362
|
+
fill: "none",
|
|
7363
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7364
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7365
|
+
"fill-rule": "evenodd",
|
|
7366
|
+
"clip-rule": "evenodd",
|
|
7367
|
+
d: "M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z",
|
|
7368
|
+
fill: "#AFEBC3"
|
|
7369
|
+
}), /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
7370
|
+
id: "mask0",
|
|
7371
|
+
"mask-type": "alpha",
|
|
7372
|
+
maskUnits: "userSpaceOnUse",
|
|
7373
|
+
x: "0",
|
|
7374
|
+
y: "0",
|
|
7375
|
+
width: "130",
|
|
7376
|
+
height: "130"
|
|
7377
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7378
|
+
"fill-rule": "evenodd",
|
|
7379
|
+
"clip-rule": "evenodd",
|
|
7380
|
+
d: "M65 130C100.899 130 130 100.899 130 65C130 29.1015 100.899 0 65 0C29.1015 0 0 29.1015 0 65C0 100.899 29.1015 130 65 130Z",
|
|
7381
|
+
fill: "white"
|
|
7382
|
+
})), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
7383
|
+
mask: "url(#mask0)"
|
|
7384
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7385
|
+
opacity: "0.3",
|
|
7386
|
+
x: "3.25",
|
|
7387
|
+
y: "150.776",
|
|
7388
|
+
width: "227.136",
|
|
7389
|
+
height: "25.2373",
|
|
7390
|
+
transform: "rotate(-45 3.25 150.776)",
|
|
7391
|
+
fill: "white"
|
|
7392
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7393
|
+
opacity: "0.3",
|
|
7394
|
+
x: "-48.4545",
|
|
7395
|
+
y: "126.52",
|
|
7396
|
+
width: "227.136",
|
|
7397
|
+
height: "25.2373",
|
|
7398
|
+
transform: "rotate(-45 -48.4545 126.52)",
|
|
7399
|
+
fill: "white"
|
|
7400
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7401
|
+
d: "M9.69092 69.153C9.69092 66.0864 11.2523 63.2309 13.8339 61.576L55.8257 34.6583C61.4168 31.0742 68.5832 31.0742 74.1743 34.6583L116.166 61.576C118.748 63.2309 120.309 66.0864 120.309 69.153V126.495C120.309 131.466 116.28 135.495 111.309 135.495H18.6909C13.7204 135.495 9.69092 131.466 9.69092 126.495V69.153Z",
|
|
7402
|
+
fill: "#14A957"
|
|
7403
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7404
|
+
d: "M30.9045 51.8818H97.9136V117.118H30.9045V51.8818Z",
|
|
7405
|
+
fill: "white"
|
|
7406
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7407
|
+
opacity: "0.1",
|
|
7408
|
+
d: "M63.8182 107.167C76.8722 107.167 87.4545 96.5849 87.4545 83.5308C87.4545 70.4768 76.8722 59.8945 63.8182 59.8945C50.7642 59.8945 40.1818 70.4768 40.1818 83.5308C40.1818 96.5849 50.7642 107.167 63.8182 107.167Z",
|
|
7409
|
+
fill: "#24BE6A"
|
|
7410
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7411
|
+
d: "M58.2093 83.4849L63.0246 88.3002L71.3036 79.047",
|
|
7412
|
+
stroke: "#24BE6A",
|
|
7413
|
+
"stroke-width": "3.76358",
|
|
7414
|
+
"stroke-linecap": "round",
|
|
7415
|
+
"stroke-linejoin": "round"
|
|
7416
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7417
|
+
d: "M9.69092 70.2531C9.69092 68.672 11.4391 67.7161 12.7703 68.5694L65 102.05L117.23 68.5694C118.561 67.7161 120.309 68.672 120.309 70.2531V128.859C120.309 133.83 116.28 137.859 111.309 137.859H18.6909C13.7204 137.859 9.69092 133.83 9.69092 128.859V70.2531Z",
|
|
7418
|
+
fill: "#24BE6A"
|
|
7419
|
+
})));
|
|
7420
|
+
});
|
|
7421
|
+
|
|
7422
|
+
/**
|
|
7423
|
+
* Saves a user's subscription to receive notifications about a specific coin.
|
|
7424
|
+
* This function sends an email to subscribe the user to notifications for the specified coin.
|
|
7425
|
+
*
|
|
7426
|
+
* @function
|
|
7427
|
+
* @name saveSubscription
|
|
7428
|
+
* @param {Coin} coin - The coin object containing information about the coin, including its ticker symbol.
|
|
7429
|
+
* @param {string} address - The email address of the user who wishes to subscribe.
|
|
7430
|
+
* @returns {Promise<boolean>} A promise that resolves to `true` if the subscription email was sent successfully, or `false` if an error occurred during the process.
|
|
7431
|
+
*/
|
|
7432
|
+
|
|
7433
|
+
/**
|
|
7434
|
+
* WaitlistSubscription component handles user subscription to a waitlist for coin notifications.
|
|
7435
|
+
* It displays a notice with a button to open a dialog where the user can enter their email to subscribe.
|
|
7436
|
+
*
|
|
7437
|
+
* @component
|
|
7438
|
+
* @param {Object} props - The component props.
|
|
7439
|
+
* @param {Coin} props.coin - The coin object containing information about the coin.
|
|
7440
|
+
* @param {Object} props.translations - The text translations for the component.
|
|
7441
|
+
* @param {saveSubscription} props.saveSubscription - Function to handle/save the subscription.
|
|
7442
|
+
* @returns {JSX.Element} The WaitlistSubscription component.
|
|
7443
|
+
*/
|
|
7444
|
+
|
|
7445
|
+
function _catch$b(body, recover) {
|
|
7446
|
+
try {
|
|
7447
|
+
var result = body();
|
|
7448
|
+
} catch (e) {
|
|
7449
|
+
return recover(e);
|
|
7450
|
+
}
|
|
7451
|
+
if (result && result.then) {
|
|
7452
|
+
return result.then(void 0, recover);
|
|
7453
|
+
}
|
|
7454
|
+
return result;
|
|
7455
|
+
}
|
|
7456
|
+
var WaitlistSubscription = function WaitlistSubscription(_ref) {
|
|
7457
|
+
var coin = _ref.coin,
|
|
7458
|
+
translations = _ref.translations,
|
|
7459
|
+
saveSubscription = _ref.saveSubscription;
|
|
7460
|
+
var _useState = React.useState(),
|
|
7461
|
+
controls = _useState[0],
|
|
7462
|
+
_initControls = _useState[1];
|
|
7463
|
+
var _useState2 = React.useState(false),
|
|
7464
|
+
showDialog = _useState2[0],
|
|
7465
|
+
setShowDialog = _useState2[1];
|
|
7466
|
+
var _useState3 = React.useState(""),
|
|
7467
|
+
inputValue = _useState3[0],
|
|
7468
|
+
setInputValue = _useState3[1];
|
|
7469
|
+
var _useState4 = React.useState(false),
|
|
7470
|
+
isEmailValid = _useState4[0],
|
|
7471
|
+
setIsEmailValid = _useState4[1];
|
|
7472
|
+
var _useState5 = React.useState(false),
|
|
7473
|
+
errorEncountered = _useState5[0],
|
|
7474
|
+
setErrorEncountered = _useState5[1];
|
|
7475
|
+
var defaultTranslations = {
|
|
7476
|
+
coloredNotice: {
|
|
7477
|
+
text: "This is a pre-listed coin, meaning that the swap is not yet available. As soon as this coin allows exchanges, it will be automatically enabled. If you want to get a notification as soon as this coin becomes available for swap - sign up for the waitlist below!",
|
|
7478
|
+
buttonTitle: "Subscribe for updates"
|
|
7479
|
+
},
|
|
7480
|
+
signUpStep: {
|
|
7481
|
+
title: coin.latinName + " (" + coin.ticker + ") listing notification",
|
|
7482
|
+
subtitle: "To be notified as soon as " + coin.latinName + " becomes available for swaps, please provide your email address. We’ll send you a single notification when it’s listed.",
|
|
7483
|
+
actionButtonTitle: "Subscribe",
|
|
7484
|
+
inputTitle: "Your email address:",
|
|
7485
|
+
error: "Something went wrong. Please try again later."
|
|
7486
|
+
},
|
|
7487
|
+
successStep: {
|
|
7488
|
+
title: "Subscribed successfully!",
|
|
7489
|
+
subtitle: "We’ll notify you as soon as " + coin.latinName + " becomes available for swaps. Keep an eye on your inbox for the update.",
|
|
7490
|
+
actionButtonTitle: "Close"
|
|
7491
|
+
}
|
|
7492
|
+
};
|
|
7493
|
+
var t = translations != null ? translations : defaultTranslations;
|
|
7494
|
+
var STEPS = {
|
|
7495
|
+
signUp: "signUp",
|
|
7496
|
+
success: "success"
|
|
7497
|
+
};
|
|
7498
|
+
var subscribe = function subscribe(resetButtonLoader) {
|
|
7499
|
+
try {
|
|
7500
|
+
var _temp = _catch$b(function () {
|
|
7501
|
+
setErrorEncountered(false);
|
|
7502
|
+
return Promise.resolve(saveSubscription(coin, inputValue)).then(function (result) {
|
|
7503
|
+
if (result) {
|
|
7504
|
+
controls == null || controls.goToStep(STEPS.success);
|
|
7505
|
+
} else {
|
|
7506
|
+
setErrorEncountered(true);
|
|
7507
|
+
}
|
|
7508
|
+
resetButtonLoader();
|
|
7509
|
+
});
|
|
7510
|
+
}, function (e) {
|
|
7511
|
+
resetButtonLoader();
|
|
7512
|
+
logErrorOrOutputToConsole(e);
|
|
7513
|
+
setShowDialog(false);
|
|
7514
|
+
});
|
|
7515
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
7516
|
+
} catch (e) {
|
|
7517
|
+
return Promise.reject(e);
|
|
7518
|
+
}
|
|
7519
|
+
};
|
|
7520
|
+
var openDialog = function openDialog() {
|
|
7521
|
+
setErrorEncountered(false);
|
|
7522
|
+
setInputValue("");
|
|
7523
|
+
setIsEmailValid(false);
|
|
7524
|
+
controls == null || controls.toFirstStep(false);
|
|
7525
|
+
setShowDialog(true);
|
|
7526
|
+
};
|
|
7527
|
+
React.useEffect(function () {
|
|
7528
|
+
setIsEmailValid(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(inputValue));
|
|
7529
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7530
|
+
}, [inputValue]);
|
|
7531
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Dialog, {
|
|
7532
|
+
initControls: function initControls(controls) {
|
|
7533
|
+
return _initControls(controls);
|
|
7534
|
+
},
|
|
7535
|
+
showDialog: showDialog,
|
|
7536
|
+
onClose: function onClose() {
|
|
7537
|
+
return setShowDialog(false);
|
|
7538
|
+
}
|
|
7539
|
+
}, /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
7540
|
+
stepName: STEPS.signUp,
|
|
7541
|
+
controls: controls,
|
|
7542
|
+
title: t.signUpStep.title,
|
|
7543
|
+
subtitle: t.signUpStep.subtitle,
|
|
7544
|
+
confirmButtonClick: subscribe,
|
|
7545
|
+
confirmButtonEnabled: isEmailValid,
|
|
7546
|
+
confirmButtonText: t.signUpStep.actionButtonTitle,
|
|
7547
|
+
primaryButtonLoader: true,
|
|
6922
7548
|
subtitleSmallMargin: true,
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
7549
|
+
showBackgroundTitle: false,
|
|
7550
|
+
ImageRaw: messageIcon
|
|
7551
|
+
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
7552
|
+
title: t.signUpStep.inputTitle
|
|
7553
|
+
}, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
7554
|
+
type: "text",
|
|
7555
|
+
onChange: function onChange(e) {
|
|
7556
|
+
return setInputValue(e.target.value);
|
|
6930
7557
|
},
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
7558
|
+
value: inputValue
|
|
7559
|
+
}), errorEncountered ? /*#__PURE__*/React__default["default"].createElement(Validation, {
|
|
7560
|
+
text: t.signUpStep.error
|
|
7561
|
+
}) : null)), /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
7562
|
+
stepName: STEPS.success,
|
|
7563
|
+
controls: controls,
|
|
7564
|
+
title: t.successStep.title,
|
|
7565
|
+
subtitle: t.successStep.subtitle,
|
|
7566
|
+
confirmButtonClick: function confirmButtonClick() {
|
|
7567
|
+
return setShowDialog(false);
|
|
7568
|
+
},
|
|
7569
|
+
confirmButtonText: t.successStep.actionButtonTitle,
|
|
7570
|
+
showBackgroundTitle: false,
|
|
7571
|
+
ImageRaw: supportDialogImage,
|
|
7572
|
+
showCornerBackButton: false,
|
|
7573
|
+
subtitleSmallMargin: true
|
|
7574
|
+
})), /*#__PURE__*/React__default["default"].createElement(ColoredNotice, {
|
|
7575
|
+
text: t.coloredNotice.text,
|
|
7576
|
+
buttonTitle: t.coloredNotice.buttonTitle,
|
|
7577
|
+
onButtonClick: openDialog
|
|
7578
|
+
}));
|
|
7579
|
+
};
|
|
7580
|
+
WaitlistSubscription.propTypes = {
|
|
7581
|
+
coin: PropTypes.object.isRequired,
|
|
7582
|
+
translations: PropTypes.object
|
|
7583
|
+
};
|
|
7584
|
+
|
|
7585
|
+
var s = {"logo-carousel":"_CgRBd","logo-carousel-slide":"_hIh2D","slide":"_Gu7XN"};
|
|
7586
|
+
|
|
7587
|
+
/**
|
|
7588
|
+
* LogoCarousel component renders a set of logos in a sliding carousel.
|
|
7589
|
+
*
|
|
7590
|
+
* @component
|
|
7591
|
+
*
|
|
7592
|
+
* @param {Object} props - The props object for this component.
|
|
7593
|
+
* @param {Array<{logo: string, url: string}>} props.logos - Array of objects representing logos and their corresponding URLs.
|
|
7594
|
+
*/
|
|
7595
|
+
var LogoCarousel = function LogoCarousel(_ref) {
|
|
7596
|
+
var logos = _ref.logos;
|
|
7597
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7598
|
+
className: s["logo-carousel"]
|
|
7599
|
+
}, [].concat(Array(2)).map(function (z, i) {
|
|
7600
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7601
|
+
className: s["logo-carousel-slide"],
|
|
7602
|
+
key: "logo-carousel-slide-" + i
|
|
7603
|
+
}, logos.map(function (item, index) {
|
|
7604
|
+
return /*#__PURE__*/React__default["default"].createElement("a", {
|
|
7605
|
+
key: "logo-carousel-slide-" + i + "-" + index,
|
|
7606
|
+
href: item.url,
|
|
7607
|
+
target: "_blank"
|
|
7608
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7609
|
+
src: item.logo,
|
|
7610
|
+
alt: "logo"
|
|
7611
|
+
}));
|
|
7612
|
+
}));
|
|
6939
7613
|
}));
|
|
6940
7614
|
};
|
|
7615
|
+
LogoCarousel.propTypes = {
|
|
7616
|
+
logos: PropTypes.arrayOf(PropTypes.shape({
|
|
7617
|
+
logo: PropTypes.string.isRequired,
|
|
7618
|
+
url: PropTypes.string.isRequired
|
|
7619
|
+
})).isRequired
|
|
7620
|
+
};
|
|
6941
7621
|
|
|
6942
7622
|
var PARAMETER_VALUES_SEPARATOR = "|*|"; // Sting that with high probability will not be in the user's data
|
|
6943
7623
|
|
|
@@ -7031,154 +7711,6 @@
|
|
|
7031
7711
|
this.protocol = protocolName;
|
|
7032
7712
|
};
|
|
7033
7713
|
|
|
7034
|
-
/**
|
|
7035
|
-
* The model for cryptocurrency coins.
|
|
7036
|
-
*
|
|
7037
|
-
* WARNING: this class should not be instantiated directly. Use only predefined singleton Coin (or descendants) instances.
|
|
7038
|
-
*/
|
|
7039
|
-
var Coin = /*#__PURE__*/function () {
|
|
7040
|
-
/**
|
|
7041
|
-
* Creates new coin
|
|
7042
|
-
*
|
|
7043
|
-
* @param latinName {string} the coin name in latin symbols like "Bitcoin"
|
|
7044
|
-
* @param ticker {string} the coin symbol/ticker/code like 'BTC'. Always upper case. A unique coin identifier
|
|
7045
|
-
* @param tickerPrintable {string} ticker but in printable format. Useful for tokens based on external blockchains
|
|
7046
|
-
* like ERC20 or TRC20. It is not friendly to display USDTERC20 or BUSDTRC20 - more neat options are just
|
|
7047
|
-
* USDT and BUSD. Note that you should always care about user's understanding of what coin he/she is working
|
|
7048
|
-
* with as printable ticker for USDTERC20 and USDTTRC20 are the same.
|
|
7049
|
-
* @param digitsCountAfterComma {number} count of digits after the comma. E.g. 8 for bitcoin
|
|
7050
|
-
* @param maxValue {number|null} max possible value for cryptocurrency. Null means that the currency has no max possible value
|
|
7051
|
-
* @param atomName {string} name of the coin's atomic value. Like 'satoshi' for bitcoin
|
|
7052
|
-
* @param mainnet {Network} main network for this coin
|
|
7053
|
-
* @param testnet {Network} test network for this coin
|
|
7054
|
-
* @param minConfirmations {number} min confirmations count to treat the coin's transaction confirmed
|
|
7055
|
-
* @param payableEntityStringForFeeRate {string|null} the payable fee entity like byte for bitcoin or gas for ether if present
|
|
7056
|
-
* @param feeOptionsTimeStringsSortedDesc {string[]} array of 4 strings for fee options when sending coins. Should be sorted from the highest time to the smallest
|
|
7057
|
-
* @param feeRatesExpirationTimeMs {number} number of milliseconds to treat the fee rates as expired
|
|
7058
|
-
* @param blockchain {Blockchain} blockchain object
|
|
7059
|
-
* @param [protocol] {Protocol|null} token/coin protocol if relevant
|
|
7060
|
-
* @param [tokenAddress] {string|null} address of contract of this token (if the coin is token)
|
|
7061
|
-
* @param [doesUseLowerCaseAddresses] {boolean} flag to clarify whether we can use lower case addresses to ensure more robust comparisons
|
|
7062
|
-
* @param [doesUseOutputs=false] {boolean} true if this coin uses inputs/outputs concept and false if it uses just balances
|
|
7063
|
-
*/
|
|
7064
|
-
function Coin(latinName, ticker, tickerPrintable, digitsCountAfterComma, maxValue, atomName, mainnet, testnet, minConfirmations, payableEntityStringForFeeRate, feeOptionsTimeStringsSortedDesc, feeRatesExpirationTimeMs, blockchain, protocol, tokenAddress, doesUseLowerCaseAddresses, doesUseOutputs) {
|
|
7065
|
-
if (protocol === void 0) {
|
|
7066
|
-
protocol = null;
|
|
7067
|
-
}
|
|
7068
|
-
if (tokenAddress === void 0) {
|
|
7069
|
-
tokenAddress = null;
|
|
7070
|
-
}
|
|
7071
|
-
if (doesUseLowerCaseAddresses === void 0) {
|
|
7072
|
-
doesUseLowerCaseAddresses = true;
|
|
7073
|
-
}
|
|
7074
|
-
if (doesUseOutputs === void 0) {
|
|
7075
|
-
doesUseOutputs = false;
|
|
7076
|
-
}
|
|
7077
|
-
this.latinName = latinName;
|
|
7078
|
-
this.ticker = ticker;
|
|
7079
|
-
this.tickerPrintable = tickerPrintable;
|
|
7080
|
-
this.digits = digitsCountAfterComma;
|
|
7081
|
-
this.maxValue = maxValue;
|
|
7082
|
-
this.atomName = atomName;
|
|
7083
|
-
this.mainnet = mainnet;
|
|
7084
|
-
this.testnet = testnet;
|
|
7085
|
-
this.minConfirmations = minConfirmations;
|
|
7086
|
-
this.payableEntityStringForFeeRate = payableEntityStringForFeeRate;
|
|
7087
|
-
this.feeOptionsTimeStringsSortedDesc = feeOptionsTimeStringsSortedDesc;
|
|
7088
|
-
this.feeRatesExpirationTimeMs = feeRatesExpirationTimeMs;
|
|
7089
|
-
this.protocol = protocol;
|
|
7090
|
-
this.blockchain = blockchain;
|
|
7091
|
-
// TODO: [bug, critical] use testnet property for testnet contract address as it blocks the app work in testnets
|
|
7092
|
-
this.tokenAddress = tokenAddress;
|
|
7093
|
-
this.feeCoin = this;
|
|
7094
|
-
this._significantDigits = 8;
|
|
7095
|
-
this.doesUseLowerCaseAddresses = doesUseLowerCaseAddresses;
|
|
7096
|
-
this.doesUseOutputs = doesUseOutputs;
|
|
7097
|
-
}
|
|
7098
|
-
|
|
7099
|
-
/**
|
|
7100
|
-
* Sets fee coin
|
|
7101
|
-
*
|
|
7102
|
-
* @param feeCoin {Coin} some tokens use another coin to charge transaction fee as they work on top of some external
|
|
7103
|
-
* blockchain. So pass here the coin the token uses for fee charging. Like for ERC20 token the fee coin is ETH.
|
|
7104
|
-
* By default, the creating coin will be set as a value for this field.
|
|
7105
|
-
*/
|
|
7106
|
-
var _proto = Coin.prototype;
|
|
7107
|
-
_proto.setFeeCoin = function setFeeCoin(feeCoin) {
|
|
7108
|
-
this.feeCoin = feeCoin;
|
|
7109
|
-
}
|
|
7110
|
-
|
|
7111
|
-
/**
|
|
7112
|
-
* Checks whether this coin uses another coin (blockchain) to charge fee for transactions (means works on base of
|
|
7113
|
-
* some external blockchain).
|
|
7114
|
-
*
|
|
7115
|
-
* @return {boolean} true if this coin uses external blockchain to perform transactions and charge fee
|
|
7116
|
-
*/;
|
|
7117
|
-
_proto.doesUseDifferentCoinFee = function doesUseDifferentCoinFee() {
|
|
7118
|
-
return this.feeCoin !== this;
|
|
7119
|
-
}
|
|
7120
|
-
|
|
7121
|
-
/**
|
|
7122
|
-
* Converts the given atoms string/number to string representing the same amount in coin itself - floating point number
|
|
7123
|
-
*
|
|
7124
|
-
* @param atoms {string} atoms positive integer amount
|
|
7125
|
-
* @return {string} coin amount floating point number as a string
|
|
7126
|
-
*/;
|
|
7127
|
-
_proto.atomsToCoinAmount = function atomsToCoinAmount(atoms) {
|
|
7128
|
-
throw new Error("Not implemented in base Coin");
|
|
7129
|
-
}
|
|
7130
|
-
|
|
7131
|
-
/**
|
|
7132
|
-
* Converts the given coins amount string/number to string representing the same amount in coin atoms - integer number
|
|
7133
|
-
*
|
|
7134
|
-
* @param coinsAmount {string} coins positive floating point amount
|
|
7135
|
-
* @return {string} coin atoms amount integer number as a string
|
|
7136
|
-
*/;
|
|
7137
|
-
_proto.coinAmountToAtoms = function coinAmountToAtoms(coinsAmount) {
|
|
7138
|
-
throw new Error("Not implemented in base Coin");
|
|
7139
|
-
}
|
|
7140
|
-
|
|
7141
|
-
/**
|
|
7142
|
-
* Composes URL to view the tx with given id in the external blockchain explorer
|
|
7143
|
-
*
|
|
7144
|
-
* @param txId {string} id of transaction
|
|
7145
|
-
* @return {string} URL string
|
|
7146
|
-
*/;
|
|
7147
|
-
_proto.composeUrlToTransactionExplorer = function composeUrlToTransactionExplorer(txId) {
|
|
7148
|
-
throw new Error("Not implemented in base Coin");
|
|
7149
|
-
}
|
|
7150
|
-
|
|
7151
|
-
/**
|
|
7152
|
-
* Most of the cryptocurrencies has specific fee rate or fee price metric. This value usually has specific measure
|
|
7153
|
-
* like satoshi/byte or gWei/gas. This function adds the described denomination string to the given amount
|
|
7154
|
-
* as a suffix and returns the result string ready to be show to a user.
|
|
7155
|
-
*
|
|
7156
|
-
* @param coinAtomsString {string} coin atoms positive integer amount
|
|
7157
|
-
* @return {string} string of coin amount and fee rate units
|
|
7158
|
-
*/;
|
|
7159
|
-
_proto.coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString = function coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
|
|
7160
|
-
throw new Error("Not implemented in base Coin");
|
|
7161
|
-
}
|
|
7162
|
-
|
|
7163
|
-
/**
|
|
7164
|
-
* Check whether this coin support transaction prioritisation during the sending process.
|
|
7165
|
-
*
|
|
7166
|
-
* @return {boolean} true if support transaction prioritisation and false otherwise
|
|
7167
|
-
*/;
|
|
7168
|
-
_proto.doesSupportTransactionPrioritisation = function doesSupportTransactionPrioritisation() {
|
|
7169
|
-
return Array.isArray(this.feeOptionsTimeStringsSortedDesc);
|
|
7170
|
-
};
|
|
7171
|
-
_proto.tickerAndProtocol = function tickerAndProtocol() {
|
|
7172
|
-
try {
|
|
7173
|
-
var _ref;
|
|
7174
|
-
return "" + this.tickerPrintable + (this.protocol ? (_ref = " " + this.protocol.protocol) != null ? _ref : "" : "");
|
|
7175
|
-
} catch (e) {
|
|
7176
|
-
improveAndRethrow(e, "tickerAndProtocol");
|
|
7177
|
-
}
|
|
7178
|
-
};
|
|
7179
|
-
return Coin;
|
|
7180
|
-
}();
|
|
7181
|
-
|
|
7182
7714
|
/**
|
|
7183
7715
|
* TODO: [tests, critical] Ued by payments logic
|
|
7184
7716
|
*
|
|
@@ -10280,6 +10812,13 @@
|
|
|
10280
10812
|
}
|
|
10281
10813
|
}
|
|
10282
10814
|
return coinName;
|
|
10815
|
+
}
|
|
10816
|
+
|
|
10817
|
+
/**
|
|
10818
|
+
* @return {Promise<Partner[]>}
|
|
10819
|
+
*/;
|
|
10820
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
10821
|
+
return Promise.resolve([]);
|
|
10283
10822
|
};
|
|
10284
10823
|
return SwapProvider;
|
|
10285
10824
|
}();
|
|
@@ -10300,6 +10839,7 @@
|
|
|
10300
10839
|
WAITING_FOR_PAYMENT: "waiting_for_payment",
|
|
10301
10840
|
CONFIRMING: "confirming",
|
|
10302
10841
|
PAYMENT_RECEIVED: "payment_received",
|
|
10842
|
+
VERIFYING: "verifying",
|
|
10303
10843
|
EXCHANGING: "exchanging",
|
|
10304
10844
|
COMPLETED: "completed",
|
|
10305
10845
|
REFUNDED: "refunded",
|
|
@@ -10307,6 +10847,12 @@
|
|
|
10307
10847
|
FAILED: "failed"
|
|
10308
10848
|
};
|
|
10309
10849
|
|
|
10850
|
+
var Partner = function Partner(name, url, logoUrl) {
|
|
10851
|
+
this.name = name;
|
|
10852
|
+
this.url = url;
|
|
10853
|
+
this.logoUrl = logoUrl;
|
|
10854
|
+
};
|
|
10855
|
+
|
|
10310
10856
|
function _catch$3(body, recover) {
|
|
10311
10857
|
try {
|
|
10312
10858
|
var result = body();
|
|
@@ -10716,7 +11262,7 @@
|
|
|
10716
11262
|
case "finished":
|
|
10717
11263
|
return SwapProvider.SWAP_STATUSES.COMPLETED;
|
|
10718
11264
|
case "verifying":
|
|
10719
|
-
return SwapProvider.SWAP_STATUSES.
|
|
11265
|
+
return SwapProvider.SWAP_STATUSES.VERIFYING;
|
|
10720
11266
|
case "refunded":
|
|
10721
11267
|
return SwapProvider.SWAP_STATUSES.REFUNDED;
|
|
10722
11268
|
case "expired":
|
|
@@ -10808,6 +11354,29 @@
|
|
|
10808
11354
|
return Promise.reject(e);
|
|
10809
11355
|
}
|
|
10810
11356
|
};
|
|
11357
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
11358
|
+
try {
|
|
11359
|
+
var _this7 = this;
|
|
11360
|
+
return Promise.resolve(_catch$3(function () {
|
|
11361
|
+
return Promise.resolve(_this7._fetchPartnersListIfNeeded()).then(function () {
|
|
11362
|
+
return _this7._partners.filter(function (p) {
|
|
11363
|
+
return !BANNED_PARTNERS.find(function (banned) {
|
|
11364
|
+
return banned === p.path;
|
|
11365
|
+
});
|
|
11366
|
+
}).map(function (p) {
|
|
11367
|
+
var _p$image;
|
|
11368
|
+
return new Partner(p.name, null,
|
|
11369
|
+
// No data in swapspace
|
|
11370
|
+
p != null && (_p$image = p.image) != null && _p$image["default"] ? "https://storage.swapspace.co" + p.image["default"] : null);
|
|
11371
|
+
});
|
|
11372
|
+
});
|
|
11373
|
+
}, function (e) {
|
|
11374
|
+
improveAndRethrow(e, "swapspace.getPartnersList");
|
|
11375
|
+
}));
|
|
11376
|
+
} catch (e) {
|
|
11377
|
+
return Promise.reject(e);
|
|
11378
|
+
}
|
|
11379
|
+
};
|
|
10811
11380
|
return SwapspaceSwapProvider;
|
|
10812
11381
|
}(SwapProvider);
|
|
10813
11382
|
|
|
@@ -11588,6 +12157,13 @@
|
|
|
11588
12157
|
throw new Error("Unknown LetsExchange status: " + status);
|
|
11589
12158
|
}
|
|
11590
12159
|
};
|
|
12160
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
12161
|
+
try {
|
|
12162
|
+
return Promise.resolve([new Partner("LetsExchange", "https://letsexchange.io/", "https://letsexchange.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F02e45813-b375-49d8-b2b0-092ce1847fff%2F55ebbc3c-4ee6-4fa7-847b-f673e82594f3%2Flets-logo-basic__on-light.svg?table=block&id=bec5952a-2f9c-47fb-8cc0-86e1391a7f60&spaceId=02e45813-b375-49d8-b2b0-092ce1847fff&userId=&cache=v2")]);
|
|
12163
|
+
} catch (e) {
|
|
12164
|
+
return Promise.reject(e);
|
|
12165
|
+
}
|
|
12166
|
+
};
|
|
11591
12167
|
return LetsExchangeSwapProvider;
|
|
11592
12168
|
}(SwapProvider);
|
|
11593
12169
|
LetsExchangeSwapProvider.AFFILIATE_ID = "0zbj9hf7xg7jgdgv";
|
|
@@ -12293,6 +12869,39 @@
|
|
|
12293
12869
|
improveAndRethrow(e, "getExtraIdNameIfPresentForAsset");
|
|
12294
12870
|
}
|
|
12295
12871
|
};
|
|
12872
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
12873
|
+
try {
|
|
12874
|
+
var _temp17 = function _temp17(_result15) {
|
|
12875
|
+
return _exit4 ? _result15 : [];
|
|
12876
|
+
};
|
|
12877
|
+
var _exit4;
|
|
12878
|
+
var _this13 = this;
|
|
12879
|
+
var _temp16 = _catch(function () {
|
|
12880
|
+
var allPartners = [_this13._swapProvider, _this13._fixedSwapProvider].map(function (provider) {
|
|
12881
|
+
return provider.getPartnersList();
|
|
12882
|
+
});
|
|
12883
|
+
return Promise.resolve(Promise.all(allPartners)).then(function (_Promise$all) {
|
|
12884
|
+
allPartners = _Promise$all;
|
|
12885
|
+
allPartners = allPartners.flat().flat();
|
|
12886
|
+
var _allPartners$reduce = allPartners.reduce(function (prev, cur) {
|
|
12887
|
+
if (!prev.find(function (partner) {
|
|
12888
|
+
return partner.name.toLowerCase() === cur.name.toLowerCase();
|
|
12889
|
+
})) {
|
|
12890
|
+
prev.push(cur);
|
|
12891
|
+
}
|
|
12892
|
+
return prev;
|
|
12893
|
+
}, []);
|
|
12894
|
+
_exit4 = 1;
|
|
12895
|
+
return _allPartners$reduce;
|
|
12896
|
+
});
|
|
12897
|
+
}, function (e) {
|
|
12898
|
+
Logger.logError(e, "getPartnersList");
|
|
12899
|
+
});
|
|
12900
|
+
return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16));
|
|
12901
|
+
} catch (e) {
|
|
12902
|
+
return Promise.reject(e);
|
|
12903
|
+
}
|
|
12904
|
+
};
|
|
12296
12905
|
return PublicSwapService;
|
|
12297
12906
|
}();
|
|
12298
12907
|
PublicSwapService.PUBLIC_SWAP_CREATED_ANALYTICS_EVENT = "public_swap_created_event";
|
|
@@ -12330,6 +12939,7 @@
|
|
|
12330
12939
|
exports.Coin = Coin;
|
|
12331
12940
|
exports.CoinPicker = CoinPicker;
|
|
12332
12941
|
exports.CoinPickerDialogStep = CoinPickerDialogStep;
|
|
12942
|
+
exports.ColoredNotice = ColoredNotice;
|
|
12333
12943
|
exports.ConcurrentCalculationsMetadataHolder = ConcurrentCalculationsMetadataHolder;
|
|
12334
12944
|
exports.DEFAULT_CRYPTO_DECIMAL_COUNT = DEFAULT_CRYPTO_DECIMAL_COUNT;
|
|
12335
12945
|
exports.DIALOG_SIZES = DIALOG_SIZES;
|
|
@@ -12356,6 +12966,7 @@
|
|
|
12356
12966
|
exports.LinkButton = LinkButton;
|
|
12357
12967
|
exports.LoadingDots = LoadingDots;
|
|
12358
12968
|
exports.Logger = Logger;
|
|
12969
|
+
exports.LogoCarousel = LogoCarousel;
|
|
12359
12970
|
exports.LogsStorage = LogsStorage;
|
|
12360
12971
|
exports.MixpanelAdapter = MixpanelAdapter;
|
|
12361
12972
|
exports.NoticeIcon = NoticeIcon;
|
|
@@ -12364,6 +12975,7 @@
|
|
|
12364
12975
|
exports.QrCode = QrCode;
|
|
12365
12976
|
exports.RadioButtonWithText = RadioButtonWithText;
|
|
12366
12977
|
exports.RobustExternalAPICallerService = RobustExternalAPICallerService;
|
|
12978
|
+
exports.SearchableCoinsList = SearchableCoinsList;
|
|
12367
12979
|
exports.SupportChat = SupportChat;
|
|
12368
12980
|
exports.SwapForm = SwapForm;
|
|
12369
12981
|
exports.SwapProvider = SwapProvider;
|
|
@@ -12375,6 +12987,7 @@
|
|
|
12375
12987
|
exports.TitledLineWithIconLink = TitledLineWithIconLink;
|
|
12376
12988
|
exports.Tooltip = Tooltip;
|
|
12377
12989
|
exports.Validation = Validation;
|
|
12990
|
+
exports.WaitlistSubscription = WaitlistSubscription;
|
|
12378
12991
|
exports.copyBrowserTextToClipboard = copyBrowserTextToClipboard;
|
|
12379
12992
|
exports.getQueryParameterSingleValue = getQueryParameterSingleValue;
|
|
12380
12993
|
exports.getQueryParameterValues = getQueryParameterValues;
|