@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.cjs
CHANGED
|
@@ -1469,7 +1469,7 @@ SupportChat.defaultProps = {
|
|
|
1469
1469
|
locale: "en"
|
|
1470
1470
|
};
|
|
1471
1471
|
|
|
1472
|
-
var s$
|
|
1472
|
+
var s$o = {"asset-icon":"_0RwWA","small":"_QL4L6","asset-icon-primary":"_ltTJa","asset-icon-secondary":"_3rtPy"};
|
|
1473
1473
|
|
|
1474
1474
|
/**
|
|
1475
1475
|
* AssetIcon component to display an icon for an asset.
|
|
@@ -1494,16 +1494,16 @@ var AssetIcon = function AssetIcon(_ref) {
|
|
|
1494
1494
|
e.target.src = fallbackSrc;
|
|
1495
1495
|
};
|
|
1496
1496
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1497
|
-
className: s$
|
|
1497
|
+
className: s$o["asset-icon"] + (small ? " " + s$o["small"] : "")
|
|
1498
1498
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1499
1499
|
src: assetIconSrc,
|
|
1500
|
-
className: s$
|
|
1500
|
+
className: s$o["asset-icon-primary"] + (small ? " " + s$o["small"] : ""),
|
|
1501
1501
|
alt: " ",
|
|
1502
1502
|
onError: handleFailedLoad,
|
|
1503
1503
|
loading: "lazy"
|
|
1504
1504
|
}), assetIconProtocolSrc ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1505
1505
|
src: assetIconProtocolSrc,
|
|
1506
|
-
className: s$
|
|
1506
|
+
className: s$o["asset-icon-secondary"] + (small ? " " + s$o["small"] : ""),
|
|
1507
1507
|
alt: " ",
|
|
1508
1508
|
onError: handleFailedLoad,
|
|
1509
1509
|
loading: "lazy"
|
|
@@ -1659,7 +1659,7 @@ var Logger = /*#__PURE__*/function () {
|
|
|
1659
1659
|
return Logger;
|
|
1660
1660
|
}();
|
|
1661
1661
|
|
|
1662
|
-
function _catch$
|
|
1662
|
+
function _catch$g(body, recover) {
|
|
1663
1663
|
try {
|
|
1664
1664
|
var result = body();
|
|
1665
1665
|
} catch (e) {
|
|
@@ -1675,7 +1675,7 @@ function useCallHandlingErrors() {
|
|
|
1675
1675
|
setState = _useState[1];
|
|
1676
1676
|
return React.useCallback(function (functionToBeCalled, event) {
|
|
1677
1677
|
try {
|
|
1678
|
-
var _temp = _catch$
|
|
1678
|
+
var _temp = _catch$g(function () {
|
|
1679
1679
|
return Promise.resolve(functionToBeCalled(event)).then(function () {});
|
|
1680
1680
|
}, function (error) {
|
|
1681
1681
|
Logger.logError(error, (functionToBeCalled == null ? void 0 : functionToBeCalled.name) || "errorBoundaryTrigger", "Caught by ErrorBoundary");
|
|
@@ -1691,7 +1691,7 @@ function useCallHandlingErrors() {
|
|
|
1691
1691
|
}, []);
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
|
-
var s$
|
|
1694
|
+
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"};
|
|
1695
1695
|
|
|
1696
1696
|
var ICON_ROTATE_OPTIONS = {
|
|
1697
1697
|
rotate0: "0deg",
|
|
@@ -1760,14 +1760,14 @@ var LinkButton = function LinkButton(_ref) {
|
|
|
1760
1760
|
return isLoading ? /*#__PURE__*/React__default["default"].createElement(LoadingDots, {
|
|
1761
1761
|
isColored: true
|
|
1762
1762
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1763
|
-
className: s$
|
|
1763
|
+
className: s$n["link-button"] + (" " + (processedIconRotation && processedIconRotation !== ICON_ROTATE_OPTIONS.rotate0 ? " " + s$n["icon-rotate-" + processedIconRotation] : "") + " " + (isDisabled ? " " + s$n["disabled"] : "")),
|
|
1764
1764
|
onClick: handleClick
|
|
1765
1765
|
}, icon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1766
1766
|
src: icon,
|
|
1767
1767
|
alt: "link button alt",
|
|
1768
1768
|
loading: "lazy"
|
|
1769
1769
|
}) : null, IconComponent ? /*#__PURE__*/React__default["default"].createElement(IconComponent, null) : null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1770
|
-
className: s$
|
|
1770
|
+
className: s$n["link-button-text"] + (" " + (isColored ? s$n["colored"] : "") + " " + (isDisabled ? s$n["disabled"] : ""))
|
|
1771
1771
|
}, content));
|
|
1772
1772
|
};
|
|
1773
1773
|
LinkButton.propTypes = {
|
|
@@ -1790,7 +1790,7 @@ LinkButton.defaultProps = {
|
|
|
1790
1790
|
iconRotate: ICON_ROTATE_OPTIONS.rotate0
|
|
1791
1791
|
};
|
|
1792
1792
|
|
|
1793
|
-
var s$
|
|
1793
|
+
var s$m = {"dialog-buttons":"_UtFG3","hide-on-mobiles":"_fVQUd","space-between-layout":"_zVTkC"};
|
|
1794
1794
|
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Renders a dialog component with configurable primary and secondary buttons.
|
|
@@ -1801,11 +1801,13 @@ var s$k = {"dialog-buttons":"_UtFG3","hide-on-mobiles":"_fVQUd","space-between-l
|
|
|
1801
1801
|
* @param {Object} props - Props for configuring the DialogButtons.
|
|
1802
1802
|
* @param {string} [props.primaryButtonTitle] - The text to display on the primary button.
|
|
1803
1803
|
* @param {Function} props.primaryButtonOnClick - Function to call when the primary button is clicked.
|
|
1804
|
+
* @param {boolean} props.primaryButtonEnabled - Determines whether the secondary button is enabled.
|
|
1804
1805
|
* @param {boolean} [props.primaryButtonLoader=false] - Whether to show a loader on the primary button.
|
|
1805
1806
|
* @param {string} [props.primaryButtonTo] - The URL or route the primary button should navigate to.
|
|
1806
1807
|
* @param {Function} [props.primaryButtonSetClickTrigger] - Additional click handling logic for the primary button.
|
|
1807
1808
|
* @param {string} [props.secondaryButtonTitle] - The text to display on the secondary button.
|
|
1808
1809
|
* @param {Function} props.secondaryButtonOnClick - Function to call when the secondary button is clicked.
|
|
1810
|
+
* @param {boolean} props.secondaryButtonEnabled - Determines whether the primary button is enabled.
|
|
1809
1811
|
* @param {string} [props.secondaryButtonTo] - The URL or route the secondary button should navigate to.
|
|
1810
1812
|
* @param {boolean} [props.secondaryButtonBig=false] - Makes the secondary button larger for visual emphasis.
|
|
1811
1813
|
* @param {boolean} [props.withBackgroundImage=false] - Indicates if the button should adjust its styling for background images.
|
|
@@ -1815,12 +1817,14 @@ var s$k = {"dialog-buttons":"_UtFG3","hide-on-mobiles":"_fVQUd","space-between-l
|
|
|
1815
1817
|
var DialogButtons = function DialogButtons(_ref) {
|
|
1816
1818
|
var primaryButtonTitle = _ref.primaryButtonTitle,
|
|
1817
1819
|
primaryButtonOnClick = _ref.primaryButtonOnClick,
|
|
1820
|
+
primaryButtonEnabled = _ref.primaryButtonEnabled,
|
|
1818
1821
|
_ref$primaryButtonLoa = _ref.primaryButtonLoader,
|
|
1819
1822
|
primaryButtonLoader = _ref$primaryButtonLoa === void 0 ? false : _ref$primaryButtonLoa,
|
|
1820
1823
|
primaryButtonTo = _ref.primaryButtonTo,
|
|
1821
1824
|
primaryButtonSetClickTrigger = _ref.primaryButtonSetClickTrigger,
|
|
1822
1825
|
secondaryButtonTitle = _ref.secondaryButtonTitle,
|
|
1823
1826
|
secondaryButtonOnClick = _ref.secondaryButtonOnClick,
|
|
1827
|
+
secondaryButtonEnabled = _ref.secondaryButtonEnabled,
|
|
1824
1828
|
secondaryButtonTo = _ref.secondaryButtonTo,
|
|
1825
1829
|
_ref$secondaryButtonB = _ref.secondaryButtonBig,
|
|
1826
1830
|
secondaryButtonBig = _ref$secondaryButtonB === void 0 ? false : _ref$secondaryButtonB,
|
|
@@ -1830,7 +1834,7 @@ var DialogButtons = function DialogButtons(_ref) {
|
|
|
1830
1834
|
hideOnMobiles = _ref$hideOnMobiles === void 0 ? false : _ref$hideOnMobiles;
|
|
1831
1835
|
var callHandlingErrors = useCallHandlingErrors();
|
|
1832
1836
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1833
|
-
className: s$
|
|
1837
|
+
className: s$m["dialog-buttons"] + (hideOnMobiles ? " " + s$m["hide-on-mobiles"] : "") + (secondaryButtonBig ? " " + s$m["space-between-layout"] : "")
|
|
1834
1838
|
}, secondaryButtonTitle ? secondaryButtonTo ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1835
1839
|
mode: "primary-transparent",
|
|
1836
1840
|
to: secondaryButtonTo,
|
|
@@ -1839,7 +1843,8 @@ var DialogButtons = function DialogButtons(_ref) {
|
|
|
1839
1843
|
fullWidthOnMobiles: true,
|
|
1840
1844
|
content: secondaryButtonTitle,
|
|
1841
1845
|
onClick: secondaryButtonOnClick,
|
|
1842
|
-
handleError: callHandlingErrors
|
|
1846
|
+
handleError: callHandlingErrors,
|
|
1847
|
+
isDisabled: !secondaryButtonEnabled
|
|
1843
1848
|
}) : secondaryButtonBig ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1844
1849
|
mode: "transparent",
|
|
1845
1850
|
size: "lg",
|
|
@@ -1847,11 +1852,13 @@ var DialogButtons = function DialogButtons(_ref) {
|
|
|
1847
1852
|
fullWidthOnMobiles: true,
|
|
1848
1853
|
content: secondaryButtonTitle,
|
|
1849
1854
|
onClick: secondaryButtonOnClick,
|
|
1850
|
-
handleError: callHandlingErrors
|
|
1855
|
+
handleError: callHandlingErrors,
|
|
1856
|
+
isDisabled: !secondaryButtonEnabled
|
|
1851
1857
|
}) : /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
1852
1858
|
onClick: secondaryButtonOnClick,
|
|
1853
1859
|
content: secondaryButtonTitle,
|
|
1854
|
-
isColored: !withBackgroundImage
|
|
1860
|
+
isColored: !withBackgroundImage,
|
|
1861
|
+
isDisabled: !secondaryButtonEnabled
|
|
1855
1862
|
}) : null, primaryButtonTitle ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1856
1863
|
mode: "primary",
|
|
1857
1864
|
size: "lg",
|
|
@@ -1861,17 +1868,20 @@ var DialogButtons = function DialogButtons(_ref) {
|
|
|
1861
1868
|
fullWidthOnMobiles: true,
|
|
1862
1869
|
content: primaryButtonTitle,
|
|
1863
1870
|
setClickTrigger: primaryButtonSetClickTrigger,
|
|
1864
|
-
handleError: callHandlingErrors
|
|
1871
|
+
handleError: callHandlingErrors,
|
|
1872
|
+
isDisabled: !primaryButtonEnabled
|
|
1865
1873
|
}) : null));
|
|
1866
1874
|
};
|
|
1867
1875
|
DialogButtons.propTypes = {
|
|
1868
1876
|
primaryButtonTitle: PropTypes.string,
|
|
1869
1877
|
primaryButtonOnClick: PropTypes.func,
|
|
1878
|
+
primaryButtonEnabled: PropTypes.bool,
|
|
1870
1879
|
primaryButtonLoader: PropTypes.bool,
|
|
1871
1880
|
primaryButtonTo: PropTypes.string,
|
|
1872
1881
|
primaryButtonSetClickTrigger: PropTypes.func,
|
|
1873
1882
|
secondaryButtonTitle: PropTypes.string,
|
|
1874
1883
|
secondaryButtonOnClick: PropTypes.func,
|
|
1884
|
+
secondaryButtonEnabled: PropTypes.bool,
|
|
1875
1885
|
secondaryButtonTo: PropTypes.string,
|
|
1876
1886
|
secondaryButtonBig: PropTypes.bool,
|
|
1877
1887
|
withBackgroundImage: PropTypes.bool,
|
|
@@ -1884,7 +1894,7 @@ DialogButtons.defaultProps = {
|
|
|
1884
1894
|
hideOnMobiles: false
|
|
1885
1895
|
};
|
|
1886
1896
|
|
|
1887
|
-
var s$
|
|
1897
|
+
var s$l = {"background-title":"_Gzho7","background-title-wrapper":"_Rvcyg","small-margins":"_WjuWI","background-title-wrapper-text":"_cAVcA"};
|
|
1888
1898
|
|
|
1889
1899
|
/**
|
|
1890
1900
|
* Component for displaying a title with a fancy background text, which
|
|
@@ -1900,11 +1910,11 @@ var BackgroundTitle = function BackgroundTitle(_ref) {
|
|
|
1900
1910
|
_ref$smallMargins = _ref.smallMargins,
|
|
1901
1911
|
smallMargins = _ref$smallMargins === void 0 ? false : _ref$smallMargins;
|
|
1902
1912
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1903
|
-
className: s$
|
|
1913
|
+
className: s$l["background-title"]
|
|
1904
1914
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1905
|
-
className: s$
|
|
1915
|
+
className: s$l["background-title-wrapper"] + (smallMargins ? " " + s$l["small-margins"] : "")
|
|
1906
1916
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1907
|
-
className: s$
|
|
1917
|
+
className: s$l["background-title-wrapper-text"] + (smallMargins ? " " + s$l["small-margins"] : "")
|
|
1908
1918
|
}, text)));
|
|
1909
1919
|
};
|
|
1910
1920
|
BackgroundTitle.propTypes = {
|
|
@@ -1915,7 +1925,7 @@ BackgroundTitle.defaultProps = {
|
|
|
1915
1925
|
smallMargins: false
|
|
1916
1926
|
};
|
|
1917
1927
|
|
|
1918
|
-
var s$
|
|
1928
|
+
var s$k = {"close":"_yMoDc","large":"_clOG2","white":"_145xN","dark-invert":"_-CvSS","dark":"_tTNnu"};
|
|
1919
1929
|
|
|
1920
1930
|
var CLOSE_COLORS = {
|
|
1921
1931
|
WHITE: "white",
|
|
@@ -1943,7 +1953,7 @@ var Close = function Close(_ref) {
|
|
|
1943
1953
|
large = _ref$large === void 0 ? false : _ref$large;
|
|
1944
1954
|
var callHandlingErrors = useCallHandlingErrors();
|
|
1945
1955
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1946
|
-
className: s$
|
|
1956
|
+
className: s$k["close"] + " " + s$k[color] + (large ? " " + s$k["large"] : ""),
|
|
1947
1957
|
onClick: function onClick(e) {
|
|
1948
1958
|
return callHandlingErrors(_onClick, e);
|
|
1949
1959
|
},
|
|
@@ -1969,7 +1979,7 @@ Close.defaultProps = {
|
|
|
1969
1979
|
large: false
|
|
1970
1980
|
};
|
|
1971
1981
|
|
|
1972
|
-
var s$
|
|
1982
|
+
var s$j = {"validation-text":"_VIr-M","validation":"_L3OdW"};
|
|
1973
1983
|
|
|
1974
1984
|
var SuccessfulValidationIcon = (function () {
|
|
1975
1985
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -2067,15 +2077,15 @@ var Validation = function Validation(_ref) {
|
|
|
2067
2077
|
text = _ref$text === void 0 ? "" : _ref$text,
|
|
2068
2078
|
isSuccessAlert = _ref.isSuccessAlert;
|
|
2069
2079
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2070
|
-
className: s$
|
|
2071
|
-
},
|
|
2080
|
+
className: s$j["validation"]
|
|
2081
|
+
}, isSuccessAlert ?
|
|
2072
2082
|
/*#__PURE__*/
|
|
2073
2083
|
// <img src={successfulValidationIcon} alt="validation icon" />
|
|
2074
2084
|
React__default["default"].createElement(SuccessfulValidationIcon, null) :
|
|
2075
2085
|
/*#__PURE__*/
|
|
2076
2086
|
// <img src={failedValidationIcon} alt="validation icon" />
|
|
2077
|
-
React__default["default"].createElement(FailedValidationIcon, null)
|
|
2078
|
-
className: s$
|
|
2087
|
+
React__default["default"].createElement(FailedValidationIcon, null), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2088
|
+
className: s$j["validation-text"]
|
|
2079
2089
|
}, text));
|
|
2080
2090
|
};
|
|
2081
2091
|
Validation.propTypes = {
|
|
@@ -2207,7 +2217,7 @@ function logErrorOrOutputToConsole(e) {
|
|
|
2207
2217
|
}
|
|
2208
2218
|
}
|
|
2209
2219
|
|
|
2210
|
-
var s$
|
|
2220
|
+
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"};
|
|
2211
2221
|
|
|
2212
2222
|
var DIALOG_SIZES = {
|
|
2213
2223
|
small: {
|
|
@@ -2589,10 +2599,10 @@ var Dialog = function Dialog(_ref) {
|
|
|
2589
2599
|
"in": showDialogProcessed,
|
|
2590
2600
|
timeout: DIALOG_TRANSITION_STEP_DURATION,
|
|
2591
2601
|
classNames: inline ? undefined : {
|
|
2592
|
-
enter: s$
|
|
2593
|
-
enterActive: s$
|
|
2594
|
-
exit: s$
|
|
2595
|
-
exitActive: s$
|
|
2602
|
+
enter: s$i["dialog-transition-enter"],
|
|
2603
|
+
enterActive: s$i["dialog-transition-enter-active"],
|
|
2604
|
+
exit: s$i["dialog-transition-exit"],
|
|
2605
|
+
exitActive: s$i["dialog-transition-exit-active"]
|
|
2596
2606
|
},
|
|
2597
2607
|
unmountOnExit: true,
|
|
2598
2608
|
onExited: function onExited() {
|
|
@@ -2611,13 +2621,13 @@ var Dialog = function Dialog(_ref) {
|
|
|
2611
2621
|
bodyScrollLock.disableBodyScroll(dialogRef.current);
|
|
2612
2622
|
}
|
|
2613
2623
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2614
|
-
className: s$
|
|
2624
|
+
className: s$i["dialog"] + " " + (dialogVerticalHeight > 1 || !isMultiStep ? "" : " " + s$i["hidden"]) + (animationConfiguration.dialogContainerOverflowDisabled ? " " + s$i["vertical-overflow-disabled"] : "") + (inline ? " " + s$i["inline"] : ""),
|
|
2615
2625
|
ref: dialogRef
|
|
2616
2626
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2617
|
-
className: s$
|
|
2627
|
+
className: s$i["scrollable"] + (inline ? " " + s$i["inline"] : ""),
|
|
2618
2628
|
ref: scrollableRef
|
|
2619
2629
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2620
|
-
className: s$
|
|
2630
|
+
className: s$i["dialog-wrapper"] + (animationConfiguration.wrapperWidthAnimationEnabled ? "" : " " + s$i["animation-disabled"]) + (inline ? " " + s$i["inline"] : ""),
|
|
2621
2631
|
ref: dialogWrapperRef,
|
|
2622
2632
|
style: dialogConfiguration.customWidth !== "" ? {
|
|
2623
2633
|
maxWidth: dialogConfiguration.customWidth
|
|
@@ -2628,9 +2638,9 @@ var Dialog = function Dialog(_ref) {
|
|
|
2628
2638
|
duration: animationConfiguration.animateHeightTransitionEnabled ? animationConfiguration.animateHeightTransitionSpeed : 0,
|
|
2629
2639
|
delay: animationConfiguration.animateHeightTransitionEnabled ? animationConfiguration.animateHeightDelay : 0,
|
|
2630
2640
|
height: isMultiStep ? dialogVerticalHeight : "auto",
|
|
2631
|
-
contentClassName: s$
|
|
2641
|
+
contentClassName: s$i["dialog-wrapper-rah-content"]
|
|
2632
2642
|
}, inline ? "" : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2633
|
-
className: s$
|
|
2643
|
+
className: s$i["dialog-wrapper-close"]
|
|
2634
2644
|
}, /*#__PURE__*/React__default["default"].createElement(Close, {
|
|
2635
2645
|
color: "dark",
|
|
2636
2646
|
onClick: function onClick(e) {
|
|
@@ -2643,16 +2653,16 @@ var Dialog = function Dialog(_ref) {
|
|
|
2643
2653
|
// classNames={s["fixed-buttons-container"]}
|
|
2644
2654
|
,
|
|
2645
2655
|
classNames: {
|
|
2646
|
-
enter: s$
|
|
2647
|
-
enterActive: s$
|
|
2648
|
-
enterDone: s$
|
|
2649
|
-
exit: s$
|
|
2650
|
-
exitActive: s$
|
|
2651
|
-
exitDone: s$
|
|
2656
|
+
enter: s$i["fixed-buttons-container-enter"],
|
|
2657
|
+
enterActive: s$i["fixed-buttons-container-enter-active"],
|
|
2658
|
+
enterDone: s$i["fixed-buttons-container-enter-done"],
|
|
2659
|
+
exit: s$i["fixed-buttons-container-exit"],
|
|
2660
|
+
exitActive: s$i["fixed-buttons-container-exit-active"],
|
|
2661
|
+
exitDone: s$i["fixed-buttons-container-exit-done"]
|
|
2652
2662
|
},
|
|
2653
2663
|
unmountOnExit: true
|
|
2654
2664
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2655
|
-
className: s$
|
|
2665
|
+
className: s$i["fixed-buttons-container"]
|
|
2656
2666
|
}, /*#__PURE__*/React__default["default"].createElement(DialogButtons, buttonsConfiguration)))));
|
|
2657
2667
|
};
|
|
2658
2668
|
Dialog.propTypes = {
|
|
@@ -2709,7 +2719,7 @@ var arrowWhite = (function () {
|
|
|
2709
2719
|
}));
|
|
2710
2720
|
});
|
|
2711
2721
|
|
|
2712
|
-
var s$
|
|
2722
|
+
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"};
|
|
2713
2723
|
|
|
2714
2724
|
var DIALOG_STEP_CLASS = "dialog-step";
|
|
2715
2725
|
|
|
@@ -2730,9 +2740,11 @@ var DIALOG_STEP_CLASS = "dialog-step";
|
|
|
2730
2740
|
* @param {string} props.subtitle - Step subtitle.
|
|
2731
2741
|
* @param {string} props.backButtonText - Secondary button title.
|
|
2732
2742
|
* @param {function} props.backButtonClick - Secondary button click handler.
|
|
2743
|
+
* @param {boolean} props.backButtonEnabled - Determines whether the secondary button is enabled.
|
|
2733
2744
|
* @param {string} props.backButtonTo - Secondary button link.
|
|
2734
2745
|
* @param {string} props.confirmButtonText - Primary button title.
|
|
2735
2746
|
* @param {function} props.confirmButtonClick - Primary button click handler.
|
|
2747
|
+
* @param {boolean} props.confirmButtonEnabled - Determines whether the primary button is enabled.
|
|
2736
2748
|
* @param {string} props.confirmButtonLink - Primary button link.
|
|
2737
2749
|
* @param {boolean} props.primaryButtonLoader - Enable loader for the primary button.
|
|
2738
2750
|
* @param {boolean} props.fixedButtons - Enable fixed buttons in the bottom for mobile devices.
|
|
@@ -2779,12 +2791,16 @@ var DialogStep = function DialogStep(_ref) {
|
|
|
2779
2791
|
backButtonText = _ref$backButtonText === void 0 ? "" : _ref$backButtonText,
|
|
2780
2792
|
_ref$backButtonClick = _ref.backButtonClick,
|
|
2781
2793
|
backButtonClick = _ref$backButtonClick === void 0 ? function () {} : _ref$backButtonClick,
|
|
2794
|
+
_ref$backButtonEnable = _ref.backButtonEnabled,
|
|
2795
|
+
backButtonEnabled = _ref$backButtonEnable === void 0 ? true : _ref$backButtonEnable,
|
|
2782
2796
|
_ref$backButtonTo = _ref.backButtonTo,
|
|
2783
2797
|
backButtonTo = _ref$backButtonTo === void 0 ? "" : _ref$backButtonTo,
|
|
2784
2798
|
_ref$confirmButtonTex = _ref.confirmButtonText,
|
|
2785
2799
|
confirmButtonText = _ref$confirmButtonTex === void 0 ? "" : _ref$confirmButtonTex,
|
|
2786
2800
|
_ref$confirmButtonCli = _ref.confirmButtonClick,
|
|
2787
2801
|
confirmButtonClick = _ref$confirmButtonCli === void 0 ? function () {} : _ref$confirmButtonCli,
|
|
2802
|
+
_ref$confirmButtonEna = _ref.confirmButtonEnabled,
|
|
2803
|
+
confirmButtonEnabled = _ref$confirmButtonEna === void 0 ? true : _ref$confirmButtonEna,
|
|
2788
2804
|
_ref$confirmButtonLin = _ref.confirmButtonLink,
|
|
2789
2805
|
confirmButtonLink = _ref$confirmButtonLin === void 0 ? "" : _ref$confirmButtonLin,
|
|
2790
2806
|
_ref$primaryButtonLoa = _ref.primaryButtonLoader,
|
|
@@ -2877,10 +2893,10 @@ var DialogStep = function DialogStep(_ref) {
|
|
|
2877
2893
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2878
2894
|
}, []);
|
|
2879
2895
|
var handleTransitionEnd = function handleTransitionEnd(event) {
|
|
2880
|
-
if (isMultiStep && isCurrentStep(stepName) && event.propertyName === "opacity" && event.target.classList[0] === s$
|
|
2896
|
+
if (isMultiStep && isCurrentStep(stepName) && event.propertyName === "opacity" && event.target.classList[0] === s$h[DIALOG_STEP_CLASS]) {
|
|
2881
2897
|
disableAnimation(animationConfiguration.animateHeightTransitionEnabled);
|
|
2882
2898
|
}
|
|
2883
|
-
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === s$
|
|
2899
|
+
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === s$h[DIALOG_STEP_CLASS]) {
|
|
2884
2900
|
clearButtonsConfiguration();
|
|
2885
2901
|
scrollDialogToTop();
|
|
2886
2902
|
setStepMounted(false);
|
|
@@ -2917,11 +2933,13 @@ var DialogStep = function DialogStep(_ref) {
|
|
|
2917
2933
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
2918
2934
|
return confirmButtonClick(resetButtonLoader);
|
|
2919
2935
|
},
|
|
2936
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
2920
2937
|
primaryButtonLoader: primaryButtonLoader,
|
|
2921
2938
|
primaryButtonTo: confirmButtonLink,
|
|
2922
2939
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
2923
2940
|
secondaryButtonTitle: backButtonText,
|
|
2924
2941
|
secondaryButtonOnClick: backButtonClick,
|
|
2942
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
2925
2943
|
secondaryButtonTo: backButtonTo,
|
|
2926
2944
|
fixedButtonsEnabled: fixedButtons
|
|
2927
2945
|
}, stepName);
|
|
@@ -2948,44 +2966,46 @@ var DialogStep = function DialogStep(_ref) {
|
|
|
2948
2966
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
2949
2967
|
return confirmButtonClick(resetButtonLoader);
|
|
2950
2968
|
},
|
|
2969
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
2951
2970
|
primaryButtonLoader: primaryButtonLoader,
|
|
2952
2971
|
primaryButtonTo: confirmButtonLink,
|
|
2953
2972
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
2954
2973
|
secondaryButtonTitle: backButtonText,
|
|
2955
2974
|
secondaryButtonOnClick: backButtonClick,
|
|
2975
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
2956
2976
|
secondaryButtonTo: backButtonTo,
|
|
2957
2977
|
fixedButtonsEnabled: fixedButtons
|
|
2958
2978
|
}, stepName);
|
|
2959
2979
|
}
|
|
2960
2980
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2961
|
-
}, [confirmButtonText, confirmButtonClick, primaryButtonLoader, confirmButtonLink, setClickTrigger, backButtonText, backButtonClick, backButtonTo, currentStep]);
|
|
2981
|
+
}, [confirmButtonText, confirmButtonClick, confirmButtonEnabled, primaryButtonLoader, confirmButtonLink, setClickTrigger, backButtonText, backButtonClick, backButtonEnabled, backButtonTo, currentStep]);
|
|
2962
2982
|
var _ref2 = titleIconCoin && coinToIconPaths ? coinToIconPaths(titleIconCoin) : {},
|
|
2963
2983
|
assetIconSrc = _ref2.assetIconSrc,
|
|
2964
2984
|
assetIconProtocolSrc = _ref2.assetIconProtocolSrc,
|
|
2965
2985
|
fallbackSrc = _ref2.fallbackSrc;
|
|
2966
2986
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2967
|
-
className: s$
|
|
2987
|
+
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"] : ""),
|
|
2968
2988
|
ref: currentStepRef,
|
|
2969
2989
|
onTransitionEnd: handleTransitionEnd,
|
|
2970
2990
|
style: height ? {
|
|
2971
2991
|
height: height
|
|
2972
2992
|
} : null
|
|
2973
2993
|
}, stepMounted ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, backgroundImage || backgroundImageMobile ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2974
|
-
className: s$
|
|
2994
|
+
className: s$h["dialog-step-background-image"] + " " + s$h[stepClass]
|
|
2975
2995
|
}, backgroundImage ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2976
2996
|
src: backgroundImage,
|
|
2977
|
-
className: s$
|
|
2997
|
+
className: s$h["dialog-step-background-image-desktop"] + " " + stepClass + (!backgroundImageMobile ? " " + s$h["primary"] : ""),
|
|
2978
2998
|
alt: "dialog step background",
|
|
2979
2999
|
loading: "lazy"
|
|
2980
3000
|
}) : null, backgroundImageMobile ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2981
3001
|
src: backgroundImageMobile,
|
|
2982
|
-
className: s$
|
|
3002
|
+
className: s$h["dialog-step-background-image-mobile"] + " " + stepClass + (!backgroundImage ? " " + s$h["primary"] : ""),
|
|
2983
3003
|
alt: "dialog step background",
|
|
2984
3004
|
loading: "lazy"
|
|
2985
3005
|
}) : null) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2986
|
-
className: s$
|
|
3006
|
+
className: s$h["dialog-step-wrapper"] + " " + s$h[stepClass] + " " + s$h[wrapperDirectionSubclass] + (inline ? " " + s$h["inline"] : "")
|
|
2987
3007
|
}, isMultiStep && showCornerButtonForStep(stepName, showCornerBackButton) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2988
|
-
className: s$
|
|
3008
|
+
className: s$h["dialog-step-wrapper-back-button"]
|
|
2989
3009
|
}, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
2990
3010
|
onClick: cornerBackButtonClick ? cornerBackButtonClick : previousStep,
|
|
2991
3011
|
content: cornerBackButtonTitle ? cornerBackButtonTitle :
|
|
@@ -2995,54 +3015,56 @@ var DialogStep = function DialogStep(_ref) {
|
|
|
2995
3015
|
iconRotate: ICON_ROTATE_OPTIONS.rotate90,
|
|
2996
3016
|
isColored: backgroundImage || backgroundImageMobile ? false : undefined
|
|
2997
3017
|
})) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2998
|
-
className: s$
|
|
3018
|
+
className: s$h["dialog-step-wrapper-header"] + (headerTitleLeft ? " " + s$h["text-left"] : "") + (backgroundImage || backgroundImageMobile ? " " + s$h["with-background-image"] : "")
|
|
2999
3019
|
}, image ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3000
3020
|
src: image,
|
|
3001
3021
|
alt: "dialog popup logo",
|
|
3002
|
-
className: s$
|
|
3022
|
+
className: s$h["dialog-step-wrapper-header-logo"],
|
|
3003
3023
|
loading: "lazy"
|
|
3004
3024
|
}) : ImageRaw ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3005
|
-
className: s$
|
|
3025
|
+
className: s$h["dialog-step-wrapper-header-logo"]
|
|
3006
3026
|
}, /*#__PURE__*/React__default["default"].createElement(ImageRaw, null)) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3007
|
-
className: s$
|
|
3027
|
+
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"] : "")
|
|
3008
3028
|
}, titleIconCoin ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3009
|
-
className: s$
|
|
3029
|
+
className: s$h["dialog-step-wrapper-header-title-coin-icon"]
|
|
3010
3030
|
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
3011
3031
|
assetIconSrc: assetIconSrc,
|
|
3012
3032
|
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
3013
3033
|
fallbackSrc: fallbackSrc
|
|
3014
3034
|
})) : titleIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3015
|
-
className: s$
|
|
3035
|
+
className: s$h["dialog-step-wrapper-header-title-icon"]
|
|
3016
3036
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3017
3037
|
src: titleIcon,
|
|
3018
3038
|
alt: "coin icon to send",
|
|
3019
3039
|
loading: "lazy"
|
|
3020
3040
|
})) : null, titleLoadingDots ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3021
|
-
className: s$
|
|
3041
|
+
className: s$h["dialog-step-wrapper-header-title-loading"]
|
|
3022
3042
|
}, /*#__PURE__*/React__default["default"].createElement(LoadingDots, {
|
|
3023
3043
|
isColored: true
|
|
3024
3044
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3025
|
-
className: s$
|
|
3045
|
+
className: s$h["dialog-step-wrapper-header-title-text"]
|
|
3026
3046
|
}, !isTopImagePassed && showBackgroundTitle ? /*#__PURE__*/React__default["default"].createElement(BackgroundTitle, {
|
|
3027
3047
|
text: title
|
|
3028
3048
|
}) : null, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
3029
|
-
className: s$
|
|
3049
|
+
className: s$h["dialog-step-wrapper-header-title-text-content"] + (!isTopImagePassed ? " " + s$h["without-logo"] : "") + (backgroundImage || backgroundImageMobile ? " " + s$h["white"] : "")
|
|
3030
3050
|
}, title))), subtitle ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3031
|
-
className: s$
|
|
3051
|
+
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"] : ""))
|
|
3032
3052
|
}, subtitle) : null), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3033
|
-
className: s$
|
|
3053
|
+
className: s$h["dialog-step-wrapper-content"] + " " + s$h["align-" + contentAlign]
|
|
3034
3054
|
}, children), backButtonText || confirmButtonText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3035
|
-
className: s$
|
|
3055
|
+
className: s$h["dialog-step-wrapper-buttons"] + (" " + (bigButtonMargins ? s$h["big-margin"] : "") + " " + (noButtonMargins ? s$h["no-margin"] : "") + " " + (isSecondaryButtonBig ? s$h["space-between-layout"] : ""))
|
|
3036
3056
|
}, /*#__PURE__*/React__default["default"].createElement(DialogButtons, {
|
|
3037
3057
|
primaryButtonTitle: confirmButtonText,
|
|
3038
3058
|
primaryButtonOnClick: function primaryButtonOnClick(resetButtonLoader) {
|
|
3039
3059
|
return confirmButtonClick(resetButtonLoader);
|
|
3040
3060
|
},
|
|
3061
|
+
primaryButtonEnabled: confirmButtonEnabled,
|
|
3041
3062
|
primaryButtonLoader: primaryButtonLoader,
|
|
3042
3063
|
primaryButtonTo: confirmButtonLink,
|
|
3043
3064
|
primaryButtonSetClickTrigger: setClickTrigger,
|
|
3044
3065
|
secondaryButtonTitle: backButtonText,
|
|
3045
3066
|
secondaryButtonOnClick: backButtonClick,
|
|
3067
|
+
secondaryButtonEnabled: backButtonEnabled,
|
|
3046
3068
|
secondaryButtonTo: backButtonTo,
|
|
3047
3069
|
secondaryButtonBig: isSecondaryButtonBig,
|
|
3048
3070
|
withBackgroundImage: !!backgroundImage || !!backgroundImageMobile,
|
|
@@ -3062,9 +3084,11 @@ DialogStep.propTypes = {
|
|
|
3062
3084
|
subtitle: PropTypes.string,
|
|
3063
3085
|
backButtonText: PropTypes.string,
|
|
3064
3086
|
backButtonClick: PropTypes.func,
|
|
3087
|
+
backButtonEnabled: PropTypes.bool,
|
|
3065
3088
|
backButtonTo: PropTypes.string,
|
|
3066
3089
|
confirmButtonText: PropTypes.string,
|
|
3067
3090
|
confirmButtonClick: PropTypes.func,
|
|
3091
|
+
confirmButtonEnabled: PropTypes.bool,
|
|
3068
3092
|
confirmButtonLink: PropTypes.string,
|
|
3069
3093
|
primaryButtonLoader: PropTypes.bool,
|
|
3070
3094
|
fixedButtons: PropTypes.bool,
|
|
@@ -3100,9 +3124,11 @@ DialogStep.defaultProps = {
|
|
|
3100
3124
|
subtitle: "",
|
|
3101
3125
|
backButtonText: "",
|
|
3102
3126
|
backButtonClick: function backButtonClick() {},
|
|
3127
|
+
backButtonEnabled: true,
|
|
3103
3128
|
backButtonTo: "",
|
|
3104
3129
|
confirmButtonText: "",
|
|
3105
3130
|
confirmButtonClick: function confirmButtonClick() {},
|
|
3131
|
+
confirmButtonEnabled: true,
|
|
3106
3132
|
confirmButtonLink: "",
|
|
3107
3133
|
primaryButtonLoader: false,
|
|
3108
3134
|
fixedButtons: false,
|
|
@@ -3125,7 +3151,7 @@ DialogStep.defaultProps = {
|
|
|
3125
3151
|
isSecondaryButtonBig: false
|
|
3126
3152
|
};
|
|
3127
3153
|
|
|
3128
|
-
var s$
|
|
3154
|
+
var s$g = {"asset-selection":"_xevLY","disabled":"_DZRfD","active":"_oBw9O","asset-selection-protocol-wrapper":"_ixAiH","asset-selection-icon-wrapper":"_gJ5LN","arrow":"_W8Ibq"};
|
|
3129
3155
|
|
|
3130
3156
|
var ArrowIcon = (function () {
|
|
3131
3157
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -3167,21 +3193,21 @@ var AssetSelection = function AssetSelection(_ref) {
|
|
|
3167
3193
|
fallbackSrc = _ref.fallbackSrc;
|
|
3168
3194
|
var handleError = useCallHandlingErrors();
|
|
3169
3195
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3170
|
-
className: s$
|
|
3196
|
+
className: s$g["asset-selection"] + " " + (disabled ? s$g["disabled"] : ""),
|
|
3171
3197
|
onClick: disabled ? function () {} : function (e) {
|
|
3172
3198
|
return handleError(handleClick, e);
|
|
3173
3199
|
}
|
|
3174
3200
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3175
|
-
className: s$
|
|
3201
|
+
className: s$g["asset-selection-icon-wrapper"]
|
|
3176
3202
|
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
3177
3203
|
small: true,
|
|
3178
3204
|
assetIconSrc: assetIconSrc,
|
|
3179
3205
|
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
3180
3206
|
fallbackSrc: fallbackSrc
|
|
3181
3207
|
})), protocolName ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3182
|
-
className: s$
|
|
3208
|
+
className: s$g["asset-selection-protocol-wrapper"]
|
|
3183
3209
|
}, protocolName) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3184
|
-
className: s$
|
|
3210
|
+
className: s$g["arrow"]
|
|
3185
3211
|
}, /*#__PURE__*/React__default["default"].createElement(ArrowIcon, null)));
|
|
3186
3212
|
};
|
|
3187
3213
|
AssetSelection.propTypes = {
|
|
@@ -3198,7 +3224,7 @@ AssetSelection.defaultProps = {
|
|
|
3198
3224
|
assetIconProtocolSrc: null
|
|
3199
3225
|
};
|
|
3200
3226
|
|
|
3201
|
-
var s$
|
|
3227
|
+
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"};
|
|
3202
3228
|
|
|
3203
3229
|
var DarkRectangle = (function () {
|
|
3204
3230
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -3257,7 +3283,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
3257
3283
|
timeout: 400,
|
|
3258
3284
|
unmountOnExit: true
|
|
3259
3285
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3260
|
-
className: s$
|
|
3286
|
+
className: s$f["tooltip"] + " " + (wide ? s$f["wide"] : "") + " " + s$f[position] + " " + (ignorePointerEvents ? s$f["ignore-pointer"] : ""),
|
|
3261
3287
|
onClick: function onClick(e) {
|
|
3262
3288
|
return handleError(_onClick, e);
|
|
3263
3289
|
},
|
|
@@ -3283,7 +3309,7 @@ Tooltip.defaultProps = {
|
|
|
3283
3309
|
ignorePointerEvents: false
|
|
3284
3310
|
};
|
|
3285
3311
|
|
|
3286
|
-
var s$
|
|
3312
|
+
var s$e = {"notice-icon-image":"_MdvCj","notice-icon":"_lFNkE","notice-icon-tooltip":"_l38uS"};
|
|
3287
3313
|
|
|
3288
3314
|
var handleClickOutside = function handleClickOutside(exceptionsRefs, callback) {
|
|
3289
3315
|
function handleClick(event) {
|
|
@@ -3389,7 +3415,7 @@ var NoticeIcon = function NoticeIcon(_ref) {
|
|
|
3389
3415
|
}, []);
|
|
3390
3416
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3391
3417
|
ref: noticeRef,
|
|
3392
|
-
className: s$
|
|
3418
|
+
className: s$e["notice-icon"]
|
|
3393
3419
|
}, titleNoticeIcon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3394
3420
|
src: titleNoticeIcon,
|
|
3395
3421
|
alt: "title icon",
|
|
@@ -3398,17 +3424,17 @@ var NoticeIcon = function NoticeIcon(_ref) {
|
|
|
3398
3424
|
return !prev;
|
|
3399
3425
|
});
|
|
3400
3426
|
},
|
|
3401
|
-
className: s$
|
|
3427
|
+
className: s$e["notice-icon-image"],
|
|
3402
3428
|
loading: "lazy"
|
|
3403
3429
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3404
|
-
className: s$
|
|
3430
|
+
className: s$e["notice-icon-image"],
|
|
3405
3431
|
onClick: function onClick() {
|
|
3406
3432
|
return setShowTooltip(function (prev) {
|
|
3407
3433
|
return !prev;
|
|
3408
3434
|
});
|
|
3409
3435
|
}
|
|
3410
3436
|
}, /*#__PURE__*/React__default["default"].createElement(NoticeQuestionIcon, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3411
|
-
className: s$
|
|
3437
|
+
className: s$e["notice-icon-tooltip"]
|
|
3412
3438
|
}, /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
3413
3439
|
showTooltip: showTooltip,
|
|
3414
3440
|
handleClick: function handleClick() {
|
|
@@ -3428,7 +3454,7 @@ NoticeIcon.defaultProps = {
|
|
|
3428
3454
|
tooltipPosition: TOOLTIP_POSITIONS.TOP
|
|
3429
3455
|
};
|
|
3430
3456
|
|
|
3431
|
-
var s$
|
|
3457
|
+
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"};
|
|
3432
3458
|
|
|
3433
3459
|
/**
|
|
3434
3460
|
* Copies given text to clipboard inside browser.
|
|
@@ -3492,7 +3518,7 @@ var TitleBox = function TitleBox(_ref) {
|
|
|
3492
3518
|
copyButtonContent = _ref.copyButtonContent,
|
|
3493
3519
|
copyButtonTooltipContent = _ref.copyButtonTooltipContent;
|
|
3494
3520
|
var handleError = useCallHandlingErrors();
|
|
3495
|
-
var transparentTitleClass = transparentTitle ? s$
|
|
3521
|
+
var transparentTitleClass = transparentTitle ? s$d["transparent-title"] : "";
|
|
3496
3522
|
var _useState = React.useState(false),
|
|
3497
3523
|
showCopyNotice = _useState[0],
|
|
3498
3524
|
setShowCopyNotice = _useState[1];
|
|
@@ -3506,19 +3532,19 @@ var TitleBox = function TitleBox(_ref) {
|
|
|
3506
3532
|
}, e);
|
|
3507
3533
|
};
|
|
3508
3534
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3509
|
-
className: s$
|
|
3535
|
+
className: s$d["title-box"] + " " + (fullWidth ? s$d["full-width"] : "")
|
|
3510
3536
|
}, title || titleNoticeText || linkText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3511
|
-
className: s$
|
|
3537
|
+
className: s$d["title-box-wrapper"]
|
|
3512
3538
|
}, bigTitle ? /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
3513
|
-
className: s$
|
|
3539
|
+
className: s$d["title-box-wrapper-title"] + " " + transparentTitleClass
|
|
3514
3540
|
}, title) : /*#__PURE__*/React__default["default"].createElement("h6", {
|
|
3515
|
-
className: s$
|
|
3541
|
+
className: s$d["title-box-wrapper-title"] + " " + transparentTitleClass
|
|
3516
3542
|
}, title), titleNoticeText ? /*#__PURE__*/React__default["default"].createElement(NoticeIcon, {
|
|
3517
3543
|
noticeText: titleNoticeText,
|
|
3518
3544
|
titleNoticeIcon: titleNoticeIcon,
|
|
3519
3545
|
tooltipPosition: titleNoticePosition
|
|
3520
3546
|
}) : null, copyButtonContent && copyButtonText ? /*#__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: copyButtonText,
|
|
3524
3550
|
onClick: handleCopyButton,
|
|
@@ -3528,7 +3554,7 @@ var TitleBox = function TitleBox(_ref) {
|
|
|
3528
3554
|
position: TOOLTIP_POSITIONS.TOP_LEFT,
|
|
3529
3555
|
showTooltip: showCopyNotice
|
|
3530
3556
|
}, copyButtonTooltipContent)) : linkText ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3531
|
-
className: s$
|
|
3557
|
+
className: s$d["title-box-wrapper-link-button"]
|
|
3532
3558
|
}, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
3533
3559
|
content: linkText,
|
|
3534
3560
|
onClick: linkButtonClick,
|
|
@@ -3566,7 +3592,7 @@ TitleBox.defaultProps = {
|
|
|
3566
3592
|
transparentTitle: false
|
|
3567
3593
|
};
|
|
3568
3594
|
|
|
3569
|
-
var s$
|
|
3595
|
+
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"};
|
|
3570
3596
|
|
|
3571
3597
|
var WalletIcon = (function () {
|
|
3572
3598
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -4235,15 +4261,15 @@ var AmountInput = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4235
4261
|
linkText: isSendAll !== null ? isSendAll ? linkButtonActiveText : linkButtonInactiveText : null,
|
|
4236
4262
|
linkButtonClick: handleSendAllClick
|
|
4237
4263
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4238
|
-
className: [s$
|
|
4264
|
+
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(" ")
|
|
4239
4265
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4240
|
-
className: s$
|
|
4266
|
+
className: s$c["amount-input-container-input-wrapper"] + " " + (disabled ? s$c["disabled"] : "") + "\n " + (children ? s$c["bottom-margin"] : "")
|
|
4241
4267
|
}, showBalance ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4242
|
-
className: s$
|
|
4268
|
+
className: s$c["asset-balance"] + " " + (highlightBalance ? s$c["red"] : "")
|
|
4243
4269
|
}, /*#__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", {
|
|
4244
|
-
className: s$
|
|
4270
|
+
className: s$c["requested-amount-coin"]
|
|
4245
4271
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4246
|
-
className: s$
|
|
4272
|
+
className: s$c["requested-amount-coin-currency"]
|
|
4247
4273
|
}, tickerPrintable ? (estimateAmount ? "~ " : "") + tickerPrintable : ""), !isLoading ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4248
4274
|
type: "text",
|
|
4249
4275
|
inputMode: "decimal",
|
|
@@ -4252,7 +4278,7 @@ var AmountInput = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4252
4278
|
return handleChangeAmount(e.target.value);
|
|
4253
4279
|
},
|
|
4254
4280
|
placeholder: coinAmountPlaceholder,
|
|
4255
|
-
className: s$
|
|
4281
|
+
className: s$c["requested-amount-coin-input"],
|
|
4256
4282
|
disabled: disabled || locked,
|
|
4257
4283
|
onFocus: function onFocus(e) {
|
|
4258
4284
|
return callHandlingErrors(function () {
|
|
@@ -4265,17 +4291,27 @@ var AmountInput = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4265
4291
|
}, e);
|
|
4266
4292
|
}
|
|
4267
4293
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4268
|
-
className: s$
|
|
4294
|
+
className: s$c["requested-amount-coin-skeleton"]
|
|
4269
4295
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4270
|
-
className: s$
|
|
4271
|
-
}))),
|
|
4272
|
-
|
|
4296
|
+
className: s$c["requested-amount-coin-skeleton-content"] + " " + "skeleton-dark"
|
|
4297
|
+
}))), /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, {
|
|
4298
|
+
"in": fiatCurrencyCode !== null,
|
|
4299
|
+
timeout: 200,
|
|
4300
|
+
classNames: {
|
|
4301
|
+
enter: s$c["requested-amount-fiat-enter"],
|
|
4302
|
+
enterActive: s$c["requested-amount-fiat-enter-active"],
|
|
4303
|
+
exit: s$c["requested-amount-fiat-exit"],
|
|
4304
|
+
exitActive: s$c["requested-amount-fiat-exit-active"]
|
|
4305
|
+
},
|
|
4306
|
+
unmountOnExit: true
|
|
4307
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4308
|
+
className: s$c["requested-amount-fiat"] + (interactedWith ? " " + s$c["interacted"] : "")
|
|
4273
4309
|
}, interactedWith ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4274
|
-
className: s$
|
|
4310
|
+
className: s$c["requested-amount-fiat-currency"]
|
|
4275
4311
|
}, (estimateAmount ? "~ " : "") + fiatCurrencyCode), !isLoading && cryptoAssetToFiatRate != null ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4276
4312
|
type: "text",
|
|
4277
4313
|
inputMode: "decimal",
|
|
4278
|
-
className: s$
|
|
4314
|
+
className: s$c["requested-amount-fiat-input"],
|
|
4279
4315
|
value: fiatAmountValue,
|
|
4280
4316
|
disabled: disabled || locked,
|
|
4281
4317
|
onChange: function onChange(e) {
|
|
@@ -4294,18 +4330,18 @@ var AmountInput = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4294
4330
|
}, e);
|
|
4295
4331
|
}
|
|
4296
4332
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4297
|
-
className: s$
|
|
4333
|
+
className: s$c["requested-amount-fiat-skeleton"]
|
|
4298
4334
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4299
|
-
className: s$
|
|
4335
|
+
className: s$c["requested-amount-fiat-skeleton-content"] + " " + "skeleton-dark"
|
|
4300
4336
|
}))) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4301
|
-
className: s$
|
|
4337
|
+
className: s$c["requested-amount-fiat-placeholder"],
|
|
4302
4338
|
onClick: function onClick(e) {
|
|
4303
4339
|
return callHandlingErrors(function () {
|
|
4304
4340
|
return handleFiatInteraction();
|
|
4305
4341
|
}, e);
|
|
4306
4342
|
}
|
|
4307
|
-
}, fiatInputPlaceholderText)))
|
|
4308
|
-
className: s$
|
|
4343
|
+
}, fiatInputPlaceholderText)))), showChangeAssetButton && ticker ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4344
|
+
className: s$c["amount-input-container-button-wrapper"],
|
|
4309
4345
|
ref: buttonForwardRef
|
|
4310
4346
|
}, /*#__PURE__*/React__default["default"].createElement(AssetSelection, {
|
|
4311
4347
|
assetIconSrc: assetIconSrc,
|
|
@@ -4319,9 +4355,9 @@ var AmountInput = /*#__PURE__*/React__default["default"].forwardRef(function (_r
|
|
|
4319
4355
|
}) : null);
|
|
4320
4356
|
});
|
|
4321
4357
|
|
|
4322
|
-
var s$
|
|
4358
|
+
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"};
|
|
4323
4359
|
|
|
4324
|
-
var s$
|
|
4360
|
+
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"};
|
|
4325
4361
|
|
|
4326
4362
|
/**
|
|
4327
4363
|
* A textarea component with optional adaptive height and validation messaging.
|
|
@@ -4382,12 +4418,12 @@ var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4382
4418
|
if (((_e$target = e.target) == null ? void 0 : _e$target.value.indexOf("\n")) === -1 || !ignoreEnter) _onChange(e);
|
|
4383
4419
|
};
|
|
4384
4420
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4385
|
-
className: s$
|
|
4421
|
+
className: s$a["textarea"] + (" " + (fullHeight ? " " + s$a["full-height"] : ""))
|
|
4386
4422
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4387
4423
|
htmlFor: id,
|
|
4388
|
-
className: s$
|
|
4424
|
+
className: s$a["textarea-input-label"]
|
|
4389
4425
|
}, label) : null, adaptiveHeight ? /*#__PURE__*/React__default["default"].createElement(TextareaAutosize__default["default"], {
|
|
4390
|
-
className: s$
|
|
4426
|
+
className: s$a["textarea-input"] + " " + s$a["adaptive-height"] + (disabled ? " " + s$a["disabled"] : "") + (errorEncountered ? " " + s$a["error-encountered"] : ""),
|
|
4391
4427
|
minRows: 1,
|
|
4392
4428
|
maxRows: 3,
|
|
4393
4429
|
onChange: function onChange(e) {
|
|
@@ -4401,7 +4437,7 @@ var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4401
4437
|
disabled: disabled
|
|
4402
4438
|
}) : /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
4403
4439
|
name: name,
|
|
4404
|
-
className: s$
|
|
4440
|
+
className: s$a["textarea-input"] + (" " + (fullHeight ? s$a["full-height"] : "") + " " + (smallText ? s$a["small-text"] : "") + " " + (disabled ? s$a["disabled"] : "")),
|
|
4405
4441
|
onChange: function onChange(e) {
|
|
4406
4442
|
return callHandlingErrors(_onChange, e);
|
|
4407
4443
|
},
|
|
@@ -4451,7 +4487,7 @@ Textarea.defaultProps = {
|
|
|
4451
4487
|
ignoreEnter: false
|
|
4452
4488
|
};
|
|
4453
4489
|
|
|
4454
|
-
var s$
|
|
4490
|
+
var s$9 = {"rate-selector":"_bqJFm","rate-selector-item":"_te8yb","selected":"_HU2Oq","rate-selector-item-text":"_ew-Z1"};
|
|
4455
4491
|
|
|
4456
4492
|
// TODO: [dev] add JSDoc
|
|
4457
4493
|
var RateSelector = function RateSelector(_ref) {
|
|
@@ -4465,21 +4501,21 @@ var RateSelector = function RateSelector(_ref) {
|
|
|
4465
4501
|
fixedRate: "Fixed rate"
|
|
4466
4502
|
} : _ref$translations;
|
|
4467
4503
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4468
|
-
className: s$
|
|
4504
|
+
className: s$9["rate-selector"]
|
|
4469
4505
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4470
|
-
className: s$
|
|
4506
|
+
className: s$9["rate-selector-item"] + " " + (!isFixed ? s$9["selected"] : ""),
|
|
4471
4507
|
onClick: function onClick() {
|
|
4472
|
-
return setIsFixed(false);
|
|
4508
|
+
return isFixed ? setIsFixed(false) : null;
|
|
4473
4509
|
}
|
|
4474
4510
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4475
|
-
className: s$
|
|
4511
|
+
className: s$9["rate-selector-item-text"]
|
|
4476
4512
|
}, translations.floatingRate)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4477
|
-
className: s$
|
|
4513
|
+
className: s$9["rate-selector-item"] + " " + (isFixed ? s$9["selected"] : ""),
|
|
4478
4514
|
onClick: function onClick() {
|
|
4479
|
-
return setIsFixed(true);
|
|
4515
|
+
return !isFixed ? setIsFixed(true) : null;
|
|
4480
4516
|
}
|
|
4481
4517
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4482
|
-
className: s$
|
|
4518
|
+
className: s$9["rate-selector-item-text"]
|
|
4483
4519
|
}, translations.fixedRate)));
|
|
4484
4520
|
};
|
|
4485
4521
|
|
|
@@ -4704,7 +4740,7 @@ function useIsHydrated() {
|
|
|
4704
4740
|
* @constructor
|
|
4705
4741
|
*/
|
|
4706
4742
|
|
|
4707
|
-
function _catch$
|
|
4743
|
+
function _catch$f(body, recover) {
|
|
4708
4744
|
try {
|
|
4709
4745
|
var result = body();
|
|
4710
4746
|
} catch (e) {
|
|
@@ -5028,23 +5064,26 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5028
5064
|
setMaximumAmountValid(!maximumAmount.current || bignumber_js.BigNumber(amount).eq("0") || bignumber_js.BigNumber(amount).lte(maximumAmount.current.crypto));
|
|
5029
5065
|
setMinimalAmountValid(!minimalAmount.current || bignumber_js.BigNumber(amount).eq("0") || bignumber_js.BigNumber(amount).gte((_minimalAmount$curren5 = minimalAmount.current) == null ? void 0 : _minimalAmount$curren5.crypto));
|
|
5030
5066
|
};
|
|
5031
|
-
var requestDataRefresh = function requestDataRefresh(amount, immediately, isSwapAll) {
|
|
5067
|
+
var requestDataRefresh = function requestDataRefresh(amount, immediately, isSwapAll, ignoreEmptyAmount) {
|
|
5032
5068
|
if (immediately === void 0) {
|
|
5033
5069
|
immediately = false;
|
|
5034
5070
|
}
|
|
5035
5071
|
if (isSwapAll === void 0) {
|
|
5036
5072
|
isSwapAll = false;
|
|
5037
5073
|
}
|
|
5074
|
+
if (ignoreEmptyAmount === void 0) {
|
|
5075
|
+
ignoreEmptyAmount = false;
|
|
5076
|
+
}
|
|
5038
5077
|
try {
|
|
5039
5078
|
clearTimeout(dataUpdateTimeoutId.current);
|
|
5040
5079
|
if (isSwapAll) {
|
|
5041
5080
|
loadFullEstimation(null);
|
|
5042
5081
|
return;
|
|
5043
5082
|
}
|
|
5044
|
-
if (!amount) {
|
|
5083
|
+
if (!amount && !ignoreEmptyAmount) {
|
|
5045
5084
|
return;
|
|
5046
5085
|
}
|
|
5047
|
-
if (bignumber_js.BigNumber(amount).eq("0")) {
|
|
5086
|
+
if (bignumber_js.BigNumber(amount).eq("0") || amount == null || amount === "") {
|
|
5048
5087
|
if (immediately) {
|
|
5049
5088
|
loadMinimalAmountAndSwapRate(true);
|
|
5050
5089
|
} else {
|
|
@@ -5100,7 +5139,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5100
5139
|
}
|
|
5101
5140
|
(function () {
|
|
5102
5141
|
try {
|
|
5103
|
-
return _catch$
|
|
5142
|
+
return _catch$f(function () {
|
|
5104
5143
|
var _minimalAmount$curren6, _maximumAmount$curren5, _isFixedRate$current;
|
|
5105
5144
|
var dataMemento = {
|
|
5106
5145
|
rate: swapRate,
|
|
@@ -5186,7 +5225,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5186
5225
|
}
|
|
5187
5226
|
(function () {
|
|
5188
5227
|
try {
|
|
5189
|
-
return _catch$
|
|
5228
|
+
return _catch$f(function () {
|
|
5190
5229
|
setIsLoading(true);
|
|
5191
5230
|
setMinimalAmount(null);
|
|
5192
5231
|
setMaximumAmount(null);
|
|
@@ -5195,7 +5234,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5195
5234
|
setIsPairSupported(true);
|
|
5196
5235
|
setIsSwapCalculated(false);
|
|
5197
5236
|
return Promise.resolve(retrieveInitialSwapData(sendingAssetTicker, receivingAssetTicker)).then(function (swapData) {
|
|
5198
|
-
if (sendAssetAmount.current != null && !isCalledForClearedInput) {
|
|
5237
|
+
if ((isFixedRate.current && isLastEditedReceiving.current ? receiveAssetAmount.current != null : sendAssetAmount.current != null) && !isCalledForClearedInput) {
|
|
5199
5238
|
// Means user already entered amount after starting the form initialization
|
|
5200
5239
|
return;
|
|
5201
5240
|
}
|
|
@@ -5239,7 +5278,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5239
5278
|
};
|
|
5240
5279
|
var handleRateModeChanged = function handleRateModeChanged(isFixed) {
|
|
5241
5280
|
setIsFixedRate(isFixed);
|
|
5242
|
-
requestDataRefresh(isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current, true);
|
|
5281
|
+
requestDataRefresh(isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current, true, null, true);
|
|
5243
5282
|
};
|
|
5244
5283
|
React.useEffect(function () {
|
|
5245
5284
|
if (isSwapAll.current === true) {
|
|
@@ -5256,9 +5295,10 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5256
5295
|
}, [isFixedRate.current]);
|
|
5257
5296
|
React.useEffect(function () {
|
|
5258
5297
|
if (!sendingAssetTicker || !receivingAssetTicker) return;
|
|
5259
|
-
var
|
|
5298
|
+
var currentAmount = isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current;
|
|
5299
|
+
var isCurrentAmountNotZero = currentAmount && !bignumber_js.BigNumber("0").eq(currentAmount);
|
|
5260
5300
|
if (isCurrentAmountNotZero) {
|
|
5261
|
-
loadFullEstimation(
|
|
5301
|
+
loadFullEstimation(currentAmount);
|
|
5262
5302
|
} else {
|
|
5263
5303
|
loadMinimalAmountAndSwapRate(true);
|
|
5264
5304
|
}
|
|
@@ -5354,7 +5394,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5354
5394
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5355
5395
|
}, [updateSendInputTo, updateReceiveInputTo]);
|
|
5356
5396
|
React.useEffect(function () {
|
|
5357
|
-
if (swapRate != null && sendAssetAmount.current != null) {
|
|
5397
|
+
if (swapRate != null && (isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current) != null) {
|
|
5358
5398
|
if (isLastEditedReceiving.current) {
|
|
5359
5399
|
setUpdateSendInputTo(AmountUtils.trim(bignumber_js.BigNumber(receiveAssetAmount.current).div(swapRate), sendingAssetDecimalCount));
|
|
5360
5400
|
} else {
|
|
@@ -5385,7 +5425,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5385
5425
|
var recipientAddressExtraIdName = getExtraIdNameByTicker(receivingAssetTicker);
|
|
5386
5426
|
var refundAddressExtraIdName = getExtraIdNameByTicker(sendingAssetTicker);
|
|
5387
5427
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5388
|
-
className: s$
|
|
5428
|
+
className: s$b["swap-form"]
|
|
5389
5429
|
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
5390
5430
|
linkButtonClick: bignumber_js.BigNumber(sendingAssetBalance == null ? void 0 : sendingAssetBalance.assetAmount).eq(0) ? null : function (resetButtonLoader) {
|
|
5391
5431
|
return handleSwapAllClick(resetButtonLoader);
|
|
@@ -5394,13 +5434,13 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5394
5434
|
linkButtonLoader: true,
|
|
5395
5435
|
isLinkButtonDisabled: isLoading.current || sendingAssetTicker === receivingAssetTicker || bignumber_js.BigNumber(sendingAssetBalance == null ? void 0 : sendingAssetBalance.assetAmount).eq(0)
|
|
5396
5436
|
}, displayRateSelector ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5397
|
-
className: s$
|
|
5437
|
+
className: s$b["swap-form-rate-selector"]
|
|
5398
5438
|
}, /*#__PURE__*/React__default["default"].createElement(RateSelector, {
|
|
5399
5439
|
isFixed: (_isFixedRate$current2 = isFixedRate.current) != null ? _isFixedRate$current2 : IS_FIXED_BY_DEFAULT,
|
|
5400
5440
|
setIsFixed: handleRateModeChanged,
|
|
5401
5441
|
translations: translations.rateSelector
|
|
5402
5442
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5403
|
-
className: s$
|
|
5443
|
+
className: s$b["swap-form-inputs"]
|
|
5404
5444
|
}, /*#__PURE__*/React__default["default"].createElement(AmountInput, {
|
|
5405
5445
|
ticker: sendingAssetTicker,
|
|
5406
5446
|
tickerPrintable: sendingAssetTickerPrintable,
|
|
@@ -5425,12 +5465,12 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5425
5465
|
ref: fromAssetSelectionButtonRef,
|
|
5426
5466
|
isLoading: isLastEditedReceiving.current ? isLoading.current : false,
|
|
5427
5467
|
cryptoAssetToFiatRate: sendingAssetToFiatRate,
|
|
5428
|
-
fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
|
|
5468
|
+
fiatCurrencyCode: formHasFiat && (isLoading.current || sendingAssetToFiatRate != null) ? fiatCurrencyCode : null,
|
|
5429
5469
|
fiatCurrencyDecimals: fiatCurrencyDecimals,
|
|
5430
5470
|
balanceLoaderText: translations.input.balanceLoaderText,
|
|
5431
5471
|
fiatInputPlaceholderText: translations.input.fiatPlaceholder
|
|
5432
5472
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5433
|
-
className: s$
|
|
5473
|
+
className: s$b["swap-form-inputs-separator"] + " " + (isLoading.current || sendingAssetTicker === null || receivingAssetTicker === null ? s$b["disabled"] : "")
|
|
5434
5474
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5435
5475
|
src: swapSeparatorIconSrc,
|
|
5436
5476
|
alt: "swap icon",
|
|
@@ -5448,7 +5488,7 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5448
5488
|
assetIconProtocolSrc: receivingAssetProtocolIconSrc,
|
|
5449
5489
|
fallbackAssetIconSrc: fallBackAssetIconSrc,
|
|
5450
5490
|
disabled: isSwapAll.current || sendingAssetTicker === null || receivingAssetTicker === null,
|
|
5451
|
-
locked: !formHasBalance
|
|
5491
|
+
locked: !formHasBalance,
|
|
5452
5492
|
handleCoinAmountChange: handleReceiveAssetAmountChange,
|
|
5453
5493
|
handleChangeAssetClick: handleChangeReceivingAssetClick,
|
|
5454
5494
|
updateAssetInputTo: updateReceiveInputTo,
|
|
@@ -5461,30 +5501,30 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5461
5501
|
ref: toAssetSelectionButtonRef,
|
|
5462
5502
|
isLoading: isLastEditedReceiving.current ? false : isLoading.current,
|
|
5463
5503
|
cryptoAssetToFiatRate: receivingAssetToFiatRate,
|
|
5464
|
-
fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
|
|
5504
|
+
fiatCurrencyCode: formHasFiat && (isLoading.current || receivingAssetToFiatRate != null) ? fiatCurrencyCode : null,
|
|
5465
5505
|
fiatCurrencyDecimals: fiatCurrencyDecimals,
|
|
5466
5506
|
balanceLoaderText: translations.input.balanceLoaderText,
|
|
5467
5507
|
fiatInputPlaceholderText: translations.input.fiatPlaceholder
|
|
5468
5508
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5469
|
-
className: s$
|
|
5509
|
+
className: s$b["swap-form-information-field"]
|
|
5470
5510
|
}, /*#__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", {
|
|
5471
5511
|
className: "semi-transparent"
|
|
5472
5512
|
}, " ~ " + 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", {
|
|
5473
|
-
className: s$
|
|
5513
|
+
className: s$b["interactable"] + " " + s$b["red"],
|
|
5474
5514
|
onClick: isLoading.current ? function () {} : function (e) {
|
|
5475
5515
|
return callHandlingErrors(handleMaximumAmountClick, e);
|
|
5476
5516
|
}
|
|
5477
5517
|
}, 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", {
|
|
5478
5518
|
className: "semi-transparent"
|
|
5479
5519
|
}, " ~ " + 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", {
|
|
5480
|
-
className: s$
|
|
5520
|
+
className: s$b["interactable"] + " " + (!minimalAmountValid ? s$b["red"] : ""),
|
|
5481
5521
|
onClick: isLoading.current ? function () {} : function (e) {
|
|
5482
5522
|
return callHandlingErrors(handleMinimalAmountClick, e);
|
|
5483
5523
|
}
|
|
5484
5524
|
}, 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", {
|
|
5485
5525
|
className: "semi-transparent"
|
|
5486
|
-
}, " ~ " + 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", {
|
|
5487
|
-
className: s$
|
|
5526
|
+
}, " ~ " + 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", {
|
|
5527
|
+
className: s$b["swap-form-address-field"]
|
|
5488
5528
|
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
5489
5529
|
title: translations.addressFields.addressTitle
|
|
5490
5530
|
}, /*#__PURE__*/React__default["default"].createElement(Textarea, {
|
|
@@ -5530,20 +5570,20 @@ var SwapForm = function SwapForm(_ref) {
|
|
|
5530
5570
|
adaptiveHeight: true,
|
|
5531
5571
|
placeholder: translations.addressFields.extraIdPlaceholder
|
|
5532
5572
|
})) : null) : null) : null, validationContent ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5533
|
-
className: s$
|
|
5573
|
+
className: s$b["swap-form-validation-text"]
|
|
5534
5574
|
}, /*#__PURE__*/React__default["default"].createElement(Validation, {
|
|
5535
5575
|
text: validationContent
|
|
5536
5576
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5537
|
-
className: s$
|
|
5577
|
+
className: s$b["swap-form-button-container"]
|
|
5538
5578
|
}, !termsOfUseUrl || !privacyPolicyUrl ? null : /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5539
|
-
className: s$
|
|
5579
|
+
className: s$b["swap-form-button-container-consent-text"]
|
|
5540
5580
|
}, translations.consents.consentText + " ", /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5541
5581
|
href: termsOfUseUrl,
|
|
5542
|
-
className: s$
|
|
5582
|
+
className: s$b["swap-form-button-container-consent-text-link"],
|
|
5543
5583
|
target: "_blank"
|
|
5544
5584
|
}, translations.consents.termsOfUse), " " + translations.consents.and + " ", /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5545
5585
|
href: privacyPolicyUrl,
|
|
5546
|
-
className: s$
|
|
5586
|
+
className: s$b["swap-form-button-container-consent-text-link"],
|
|
5547
5587
|
target: "_blank"
|
|
5548
5588
|
}, translations.consents.privacyPolicy), "."), /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
5549
5589
|
size: "lg",
|
|
@@ -5654,7 +5694,7 @@ SwapForm.defaultProps = {
|
|
|
5654
5694
|
* @return {Promise<string>} xml string of generated svg image
|
|
5655
5695
|
*/
|
|
5656
5696
|
|
|
5657
|
-
function _catch$
|
|
5697
|
+
function _catch$e(body, recover) {
|
|
5658
5698
|
try {
|
|
5659
5699
|
var result = body();
|
|
5660
5700
|
} catch (e) {
|
|
@@ -5667,7 +5707,7 @@ function _catch$d(body, recover) {
|
|
|
5667
5707
|
}
|
|
5668
5708
|
var generateQrAndShowInCanvas = function generateQrAndShowInCanvas(encodingString) {
|
|
5669
5709
|
try {
|
|
5670
|
-
return Promise.resolve(_catch$
|
|
5710
|
+
return Promise.resolve(_catch$e(function () {
|
|
5671
5711
|
return Promise.resolve(QRCode__default["default"].toString(encodingString, {
|
|
5672
5712
|
type: "svg"
|
|
5673
5713
|
}));
|
|
@@ -5679,7 +5719,7 @@ var generateQrAndShowInCanvas = function generateQrAndShowInCanvas(encodingStrin
|
|
|
5679
5719
|
}
|
|
5680
5720
|
};
|
|
5681
5721
|
|
|
5682
|
-
var s$
|
|
5722
|
+
var s$8 = {"qr-code":"_VZ0dT","fill":"_hFE1l"};
|
|
5683
5723
|
|
|
5684
5724
|
/**
|
|
5685
5725
|
* QrCode component renders a QR code for a provided crypto address.
|
|
@@ -5692,7 +5732,7 @@ var s$6 = {"qr-code":"_VZ0dT","fill":"_hFE1l"};
|
|
|
5692
5732
|
* @returns {JSX.Element} A div containing the generated QR code.
|
|
5693
5733
|
*/
|
|
5694
5734
|
|
|
5695
|
-
function _catch$
|
|
5735
|
+
function _catch$d(body, recover) {
|
|
5696
5736
|
try {
|
|
5697
5737
|
var result = body();
|
|
5698
5738
|
} catch (e) {
|
|
@@ -5711,7 +5751,7 @@ var QrCode = function QrCode(_ref) {
|
|
|
5711
5751
|
React.useEffect(function () {
|
|
5712
5752
|
(function () {
|
|
5713
5753
|
try {
|
|
5714
|
-
return _catch$
|
|
5754
|
+
return _catch$d(function () {
|
|
5715
5755
|
var _temp = function () {
|
|
5716
5756
|
if (address) {
|
|
5717
5757
|
return Promise.resolve(generateQrAndShowInCanvas(address)).then(function (_generateQrAndShowInC) {
|
|
@@ -5729,7 +5769,7 @@ var QrCode = function QrCode(_ref) {
|
|
|
5729
5769
|
})();
|
|
5730
5770
|
}, [address]);
|
|
5731
5771
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5732
|
-
className: s$
|
|
5772
|
+
className: s$8["qr-code"] + (fill ? " " + s$8["fill"] : ""),
|
|
5733
5773
|
ref: canvasRef
|
|
5734
5774
|
});
|
|
5735
5775
|
};
|
|
@@ -5741,7 +5781,7 @@ QrCode.defaultProps = {
|
|
|
5741
5781
|
fill: false
|
|
5742
5782
|
};
|
|
5743
5783
|
|
|
5744
|
-
var s$
|
|
5784
|
+
var s$7 = {"first-line-text":"_IGz2I","wrap":"_eKd8P","break":"_mT5i4","full-text":"_PVKxC","shorted":"_wB5qV","horizontal":"_lqJz-","line":"_MGRy0","second-line-text":"_hdF64"};
|
|
5745
5785
|
|
|
5746
5786
|
/**
|
|
5747
5787
|
* Renders up to three lines of text with configurable options for horizontal layout, text wrapping, and breaking.
|
|
@@ -5779,19 +5819,19 @@ var LinesOfText = function LinesOfText(_ref) {
|
|
|
5779
5819
|
_ref$breakFirstLine = _ref.breakFirstLine,
|
|
5780
5820
|
breakFirstLine = _ref$breakFirstLine === void 0 ? false : _ref$breakFirstLine;
|
|
5781
5821
|
return defaultTextContent ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5782
|
-
className: s$
|
|
5822
|
+
className: s$7["centered-vertically"]
|
|
5783
5823
|
}, defaultTextContent) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5784
|
-
className: isHorizontal ? s$
|
|
5824
|
+
className: isHorizontal ? s$7["horizontal"] : ""
|
|
5785
5825
|
}, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
5786
|
-
className: s$
|
|
5826
|
+
className: s$7["first-line-text"]
|
|
5787
5827
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5788
|
-
className: (isFirstLineTextReducible ? s$
|
|
5828
|
+
className: (isFirstLineTextReducible ? s$7["shorted"] : s$7["full-text"]) + " " + (wrapFirstLine ? " " + s$7["wrap"] : "") + " " + (breakFirstLine ? " " + s$7["break"] : "")
|
|
5789
5829
|
}, firstLineText), "\xA0" + firstLineNotReducibleSuffix), isHorizontal ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5790
5830
|
className: "line"
|
|
5791
5831
|
}) : null, secondLineText ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5792
|
-
className: s$
|
|
5832
|
+
className: s$7["second-line-text"]
|
|
5793
5833
|
}, secondLineText) : null, thirdLineText ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5794
|
-
className: s$
|
|
5834
|
+
className: s$7["second-line-text"]
|
|
5795
5835
|
}, thirdLineText) : null);
|
|
5796
5836
|
};
|
|
5797
5837
|
LinesOfText.propTypes = {
|
|
@@ -5817,7 +5857,7 @@ LinesOfText.defaultProps = {
|
|
|
5817
5857
|
breakFirstLine: false
|
|
5818
5858
|
};
|
|
5819
5859
|
|
|
5820
|
-
var s$
|
|
5860
|
+
var s$6 = {"line-with-icon-link-icon":"_8HT4K","line-with-icon-link":"_m8MBC","line-with-icon-link-text":"_M7e-R"};
|
|
5821
5861
|
|
|
5822
5862
|
/**
|
|
5823
5863
|
* Renders a line with text and an accompanying icon that serves as a link.
|
|
@@ -5832,9 +5872,9 @@ var LineWithIconLink = function LineWithIconLink(_ref) {
|
|
|
5832
5872
|
icon = _ref.icon,
|
|
5833
5873
|
url = _ref.url;
|
|
5834
5874
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5835
|
-
className: s$
|
|
5875
|
+
className: s$6["line-with-icon-link"]
|
|
5836
5876
|
}, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
5837
|
-
className: s$
|
|
5877
|
+
className: s$6["line-with-icon-link-text"]
|
|
5838
5878
|
}, text), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
5839
5879
|
href: url,
|
|
5840
5880
|
target: "_blank",
|
|
@@ -6076,7 +6116,7 @@ TitledLineWithIconLink.propTypes = {
|
|
|
6076
6116
|
};
|
|
6077
6117
|
TitledLineWithIconLink.defaultProps = {};
|
|
6078
6118
|
|
|
6079
|
-
var s$
|
|
6119
|
+
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"};
|
|
6080
6120
|
|
|
6081
6121
|
/**
|
|
6082
6122
|
* RadioButtonWithText component with a label and optional tooltip.
|
|
@@ -6136,10 +6176,10 @@ var RadioButtonWithText = function RadioButtonWithText(_ref) {
|
|
|
6136
6176
|
}
|
|
6137
6177
|
};
|
|
6138
6178
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6139
|
-
className: s$
|
|
6179
|
+
className: s$5["radio-button-with-text-container"]
|
|
6140
6180
|
}, /*#__PURE__*/React__default["default"].createElement("label", {
|
|
6141
6181
|
htmlFor: "radio-button-with-text-" + id,
|
|
6142
|
-
className: [s$
|
|
6182
|
+
className: [s$5["radio-button-with-text"], isSwitchedOn ? s$5["selected"] : "", isLoading ? s$5["hide"] : "", isDisabled ? s$5["disabled"] : ""].join(" "),
|
|
6143
6183
|
onMouseEnter: function onMouseEnter(e) {
|
|
6144
6184
|
return handleError(_onMouseEnter, e);
|
|
6145
6185
|
},
|
|
@@ -6152,16 +6192,16 @@ var RadioButtonWithText = function RadioButtonWithText(_ref) {
|
|
|
6152
6192
|
return setShowTooltip(false);
|
|
6153
6193
|
}
|
|
6154
6194
|
}, tooltipText)) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6155
|
-
className: s$
|
|
6195
|
+
className: s$5["radio-button-with-text-dots"] + (isLoading ? s$5["show"] : "")
|
|
6156
6196
|
}, /*#__PURE__*/React__default["default"].createElement(LoadingDots, null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6157
|
-
className: s$
|
|
6197
|
+
className: s$5["radio-button-with-text-content"] + " " + ("")
|
|
6158
6198
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
6159
6199
|
id: "radio-button-with-text-" + id,
|
|
6160
6200
|
type: "checkbox",
|
|
6161
6201
|
value: isSwitchedOn,
|
|
6162
6202
|
onChange: handleChange
|
|
6163
6203
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6164
|
-
className: s$
|
|
6204
|
+
className: s$5["radio-button-with-text-wrapper"]
|
|
6165
6205
|
}, text))));
|
|
6166
6206
|
};
|
|
6167
6207
|
RadioButtonWithText.propTypes = {
|
|
@@ -6180,7 +6220,7 @@ RadioButtonWithText.defaultProps = {
|
|
|
6180
6220
|
id: ""
|
|
6181
6221
|
};
|
|
6182
6222
|
|
|
6183
|
-
var s$
|
|
6223
|
+
var s$4 = {"information-message":"_95-Ev","data-loaded":"_-kB8A","big-image":"_2LO1t","information-message-text":"_BiT68","white-text":"_-BraU"};
|
|
6184
6224
|
|
|
6185
6225
|
var InfoIcon = (function () {
|
|
6186
6226
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
@@ -6223,13 +6263,13 @@ var InformationMessage = function InformationMessage(_ref) {
|
|
|
6223
6263
|
_ref$children = _ref.children,
|
|
6224
6264
|
children = _ref$children === void 0 ? null : _ref$children;
|
|
6225
6265
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6226
|
-
className: s$
|
|
6266
|
+
className: s$4["information-message"] + (bigImage ? " " + s$4["big-image"] : "")
|
|
6227
6267
|
}, icon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6228
6268
|
src: icon,
|
|
6229
6269
|
alt: "info icon",
|
|
6230
6270
|
loading: "lazy"
|
|
6231
6271
|
}) : /*#__PURE__*/React__default["default"].createElement(InfoIcon, null), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6232
|
-
className: s$
|
|
6272
|
+
className: s$4["information-message-text"] + (whiteText ? " " + s$4["white-text"] : "")
|
|
6233
6273
|
}, text, children));
|
|
6234
6274
|
};
|
|
6235
6275
|
InformationMessage.propTypes = {
|
|
@@ -6247,7 +6287,7 @@ InformationMessage.defaultProps = {
|
|
|
6247
6287
|
children: null
|
|
6248
6288
|
};
|
|
6249
6289
|
|
|
6250
|
-
var s$
|
|
6290
|
+
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"};
|
|
6251
6291
|
|
|
6252
6292
|
/**
|
|
6253
6293
|
* Input component for forms.
|
|
@@ -6330,12 +6370,12 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6330
6370
|
}
|
|
6331
6371
|
};
|
|
6332
6372
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6333
|
-
className: [s$
|
|
6373
|
+
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(" ")
|
|
6334
6374
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
6335
6375
|
htmlFor: id,
|
|
6336
|
-
className: s$
|
|
6376
|
+
className: s$3["input-label"]
|
|
6337
6377
|
}, label) : null, clearButton ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6338
|
-
className: s$
|
|
6378
|
+
className: s$3["input-clear-button"]
|
|
6339
6379
|
}, /*#__PURE__*/React__default["default"].createElement(Close, {
|
|
6340
6380
|
onClick: handleClearButtonClick,
|
|
6341
6381
|
color: "dark-invert"
|
|
@@ -6347,7 +6387,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6347
6387
|
return handleError(_onChange, e);
|
|
6348
6388
|
},
|
|
6349
6389
|
placeholder: placeholder,
|
|
6350
|
-
className: className + (errorEncountered ? " " + s$
|
|
6390
|
+
className: className + (errorEncountered ? " " + s$3["error-encountered"] : ""),
|
|
6351
6391
|
defaultValue: defaultValue,
|
|
6352
6392
|
disabled: disabled,
|
|
6353
6393
|
onKeyUp: function onKeyUp(event) {
|
|
@@ -6363,7 +6403,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6363
6403
|
return handleError(_onChange, e);
|
|
6364
6404
|
},
|
|
6365
6405
|
placeholder: placeholder,
|
|
6366
|
-
className: className + (errorEncountered ? " " + s$
|
|
6406
|
+
className: className + (errorEncountered ? " " + s$3["error-encountered"] : ""),
|
|
6367
6407
|
value: value,
|
|
6368
6408
|
disabled: disabled,
|
|
6369
6409
|
onKeyUp: function onKeyUp(event) {
|
|
@@ -6420,12 +6460,290 @@ Input.defaultProps = {
|
|
|
6420
6460
|
errorEncountered: false
|
|
6421
6461
|
};
|
|
6422
6462
|
|
|
6423
|
-
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"};
|
|
6463
|
+
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"};
|
|
6424
6464
|
|
|
6425
6465
|
var FALLBACK_ASSET_ICON_URL = "https://rabbit.io/asset-icons/fallback.svg";
|
|
6426
6466
|
var DEFAULT_CRYPTO_DECIMAL_COUNT = 8;
|
|
6427
6467
|
|
|
6428
|
-
|
|
6468
|
+
/**
|
|
6469
|
+
* The model for cryptocurrency coins.
|
|
6470
|
+
*
|
|
6471
|
+
* WARNING: this class should not be instantiated directly. Use only predefined singleton Coin (or descendants) instances.
|
|
6472
|
+
*/
|
|
6473
|
+
var Coin = /*#__PURE__*/function () {
|
|
6474
|
+
/**
|
|
6475
|
+
* Creates new coin
|
|
6476
|
+
*
|
|
6477
|
+
* @param latinName {string} the coin name in latin symbols like "Bitcoin"
|
|
6478
|
+
* @param ticker {string} the coin symbol/ticker/code like 'BTC'. Always upper case. A unique coin identifier
|
|
6479
|
+
* @param tickerPrintable {string} ticker but in printable format. Useful for tokens based on external blockchains
|
|
6480
|
+
* like ERC20 or TRC20. It is not friendly to display USDTERC20 or BUSDTRC20 - more neat options are just
|
|
6481
|
+
* USDT and BUSD. Note that you should always care about user's understanding of what coin he/she is working
|
|
6482
|
+
* with as printable ticker for USDTERC20 and USDTTRC20 are the same.
|
|
6483
|
+
* @param digitsCountAfterComma {number} count of digits after the comma. E.g. 8 for bitcoin
|
|
6484
|
+
* @param maxValue {number|null} max possible value for cryptocurrency. Null means that the currency has no max possible value
|
|
6485
|
+
* @param atomName {string} name of the coin's atomic value. Like 'satoshi' for bitcoin
|
|
6486
|
+
* @param mainnet {Network} main network for this coin
|
|
6487
|
+
* @param testnet {Network} test network for this coin
|
|
6488
|
+
* @param minConfirmations {number} min confirmations count to treat the coin's transaction confirmed
|
|
6489
|
+
* @param payableEntityStringForFeeRate {string|null} the payable fee entity like byte for bitcoin or gas for ether if present
|
|
6490
|
+
* @param feeOptionsTimeStringsSortedDesc {string[]} array of 4 strings for fee options when sending coins. Should be sorted from the highest time to the smallest
|
|
6491
|
+
* @param feeRatesExpirationTimeMs {number} number of milliseconds to treat the fee rates as expired
|
|
6492
|
+
* @param blockchain {Blockchain} blockchain object
|
|
6493
|
+
* @param [protocol] {Protocol|null} token/coin protocol if relevant
|
|
6494
|
+
* @param [tokenAddress] {string|null} address of contract of this token (if the coin is token)
|
|
6495
|
+
* @param [doesUseLowerCaseAddresses] {boolean} flag to clarify whether we can use lower case addresses to ensure more robust comparisons
|
|
6496
|
+
* @param [doesUseOutputs=false] {boolean} true if this coin uses inputs/outputs concept and false if it uses just balances
|
|
6497
|
+
*/
|
|
6498
|
+
function Coin(latinName, ticker, tickerPrintable, digitsCountAfterComma, maxValue, atomName, mainnet, testnet, minConfirmations, payableEntityStringForFeeRate, feeOptionsTimeStringsSortedDesc, feeRatesExpirationTimeMs, blockchain, protocol, tokenAddress, doesUseLowerCaseAddresses, doesUseOutputs) {
|
|
6499
|
+
if (protocol === void 0) {
|
|
6500
|
+
protocol = null;
|
|
6501
|
+
}
|
|
6502
|
+
if (tokenAddress === void 0) {
|
|
6503
|
+
tokenAddress = null;
|
|
6504
|
+
}
|
|
6505
|
+
if (doesUseLowerCaseAddresses === void 0) {
|
|
6506
|
+
doesUseLowerCaseAddresses = true;
|
|
6507
|
+
}
|
|
6508
|
+
if (doesUseOutputs === void 0) {
|
|
6509
|
+
doesUseOutputs = false;
|
|
6510
|
+
}
|
|
6511
|
+
this.latinName = latinName;
|
|
6512
|
+
this.ticker = ticker;
|
|
6513
|
+
this.tickerPrintable = tickerPrintable;
|
|
6514
|
+
this.digits = digitsCountAfterComma;
|
|
6515
|
+
this.maxValue = maxValue;
|
|
6516
|
+
this.atomName = atomName;
|
|
6517
|
+
this.mainnet = mainnet;
|
|
6518
|
+
this.testnet = testnet;
|
|
6519
|
+
this.minConfirmations = minConfirmations;
|
|
6520
|
+
this.payableEntityStringForFeeRate = payableEntityStringForFeeRate;
|
|
6521
|
+
this.feeOptionsTimeStringsSortedDesc = feeOptionsTimeStringsSortedDesc;
|
|
6522
|
+
this.feeRatesExpirationTimeMs = feeRatesExpirationTimeMs;
|
|
6523
|
+
this.protocol = protocol;
|
|
6524
|
+
this.blockchain = blockchain;
|
|
6525
|
+
// TODO: [bug, critical] use testnet property for testnet contract address as it blocks the app work in testnets
|
|
6526
|
+
this.tokenAddress = tokenAddress;
|
|
6527
|
+
this.feeCoin = this;
|
|
6528
|
+
this._significantDigits = 8;
|
|
6529
|
+
this.doesUseLowerCaseAddresses = doesUseLowerCaseAddresses;
|
|
6530
|
+
this.doesUseOutputs = doesUseOutputs;
|
|
6531
|
+
}
|
|
6532
|
+
|
|
6533
|
+
/**
|
|
6534
|
+
* Sets fee coin
|
|
6535
|
+
*
|
|
6536
|
+
* @param feeCoin {Coin} some tokens use another coin to charge transaction fee as they work on top of some external
|
|
6537
|
+
* blockchain. So pass here the coin the token uses for fee charging. Like for ERC20 token the fee coin is ETH.
|
|
6538
|
+
* By default, the creating coin will be set as a value for this field.
|
|
6539
|
+
*/
|
|
6540
|
+
var _proto = Coin.prototype;
|
|
6541
|
+
_proto.setFeeCoin = function setFeeCoin(feeCoin) {
|
|
6542
|
+
this.feeCoin = feeCoin;
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
/**
|
|
6546
|
+
* Checks whether this coin uses another coin (blockchain) to charge fee for transactions (means works on base of
|
|
6547
|
+
* some external blockchain).
|
|
6548
|
+
*
|
|
6549
|
+
* @return {boolean} true if this coin uses external blockchain to perform transactions and charge fee
|
|
6550
|
+
*/;
|
|
6551
|
+
_proto.doesUseDifferentCoinFee = function doesUseDifferentCoinFee() {
|
|
6552
|
+
return this.feeCoin !== this;
|
|
6553
|
+
}
|
|
6554
|
+
|
|
6555
|
+
/**
|
|
6556
|
+
* Converts the given atoms string/number to string representing the same amount in coin itself - floating point number
|
|
6557
|
+
*
|
|
6558
|
+
* @param atoms {string} atoms positive integer amount
|
|
6559
|
+
* @return {string} coin amount floating point number as a string
|
|
6560
|
+
*/;
|
|
6561
|
+
_proto.atomsToCoinAmount = function atomsToCoinAmount(atoms) {
|
|
6562
|
+
throw new Error("Not implemented in base Coin");
|
|
6563
|
+
}
|
|
6564
|
+
|
|
6565
|
+
/**
|
|
6566
|
+
* Converts the given coins amount string/number to string representing the same amount in coin atoms - integer number
|
|
6567
|
+
*
|
|
6568
|
+
* @param coinsAmount {string} coins positive floating point amount
|
|
6569
|
+
* @return {string} coin atoms amount integer number as a string
|
|
6570
|
+
*/;
|
|
6571
|
+
_proto.coinAmountToAtoms = function coinAmountToAtoms(coinsAmount) {
|
|
6572
|
+
throw new Error("Not implemented in base Coin");
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6575
|
+
/**
|
|
6576
|
+
* Composes URL to view the tx with given id in the external blockchain explorer
|
|
6577
|
+
*
|
|
6578
|
+
* @param txId {string} id of transaction
|
|
6579
|
+
* @return {string} URL string
|
|
6580
|
+
*/;
|
|
6581
|
+
_proto.composeUrlToTransactionExplorer = function composeUrlToTransactionExplorer(txId) {
|
|
6582
|
+
throw new Error("Not implemented in base Coin");
|
|
6583
|
+
}
|
|
6584
|
+
|
|
6585
|
+
/**
|
|
6586
|
+
* Most of the cryptocurrencies has specific fee rate or fee price metric. This value usually has specific measure
|
|
6587
|
+
* like satoshi/byte or gWei/gas. This function adds the described denomination string to the given amount
|
|
6588
|
+
* as a suffix and returns the result string ready to be show to a user.
|
|
6589
|
+
*
|
|
6590
|
+
* @param coinAtomsString {string} coin atoms positive integer amount
|
|
6591
|
+
* @return {string} string of coin amount and fee rate units
|
|
6592
|
+
*/;
|
|
6593
|
+
_proto.coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString = function coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
|
|
6594
|
+
throw new Error("Not implemented in base Coin");
|
|
6595
|
+
}
|
|
6596
|
+
|
|
6597
|
+
/**
|
|
6598
|
+
* Check whether this coin support transaction prioritisation during the sending process.
|
|
6599
|
+
*
|
|
6600
|
+
* @return {boolean} true if support transaction prioritisation and false otherwise
|
|
6601
|
+
*/;
|
|
6602
|
+
_proto.doesSupportTransactionPrioritisation = function doesSupportTransactionPrioritisation() {
|
|
6603
|
+
return Array.isArray(this.feeOptionsTimeStringsSortedDesc);
|
|
6604
|
+
};
|
|
6605
|
+
_proto.tickerAndProtocol = function tickerAndProtocol() {
|
|
6606
|
+
try {
|
|
6607
|
+
var _ref;
|
|
6608
|
+
return "" + this.tickerPrintable + (this.protocol ? (_ref = " " + this.protocol.protocol) != null ? _ref : "" : "");
|
|
6609
|
+
} catch (e) {
|
|
6610
|
+
improveAndRethrow(e, "tickerAndProtocol");
|
|
6611
|
+
}
|
|
6612
|
+
};
|
|
6613
|
+
return Coin;
|
|
6614
|
+
}();
|
|
6615
|
+
|
|
6616
|
+
/**
|
|
6617
|
+
* A component that displays a list of coins that can be searched and filtered.
|
|
6618
|
+
*
|
|
6619
|
+
* @param {Object} props - The properties object.
|
|
6620
|
+
* @param {Coin[]} props.coinsList - The list of all available coins.
|
|
6621
|
+
* @param {Array<{coin: Coin, component: React.Component}>} props.coinsBundle - The bundle of coin components to be displayed.
|
|
6622
|
+
* @param {string} props.searchQuery - The search query to filter coins.
|
|
6623
|
+
* @param {boolean} props.partialLoadingEnabled - Determines if partial loading is enabled.
|
|
6624
|
+
* @param {number} props.partialLoadingIncrement - The increment of coins to load when loading more.
|
|
6625
|
+
* @param {Function} props.onListUpdated - Callback when the list of displayed coins is updated.
|
|
6626
|
+
* @param {Function} props.setIsListFull - Callback to set if the list is fully displayed.
|
|
6627
|
+
* @param {Function} props.setIsSearchResultEmpty - Callback to set if the search result is empty.
|
|
6628
|
+
* @param {number} props.triggerLoadMoreCoins - Triggers loading more coins.
|
|
6629
|
+
*/
|
|
6630
|
+
var SearchableCoinsList = function SearchableCoinsList(_ref) {
|
|
6631
|
+
var coinsList = _ref.coinsList,
|
|
6632
|
+
coinsBundle = _ref.coinsBundle,
|
|
6633
|
+
searchQuery = _ref.searchQuery,
|
|
6634
|
+
_ref$partialLoadingEn = _ref.partialLoadingEnabled,
|
|
6635
|
+
partialLoadingEnabled = _ref$partialLoadingEn === void 0 ? true : _ref$partialLoadingEn,
|
|
6636
|
+
_ref$partialLoadingIn = _ref.partialLoadingIncrement,
|
|
6637
|
+
partialLoadingIncrement = _ref$partialLoadingIn === void 0 ? 100 : _ref$partialLoadingIn,
|
|
6638
|
+
_ref$onListUpdated = _ref.onListUpdated,
|
|
6639
|
+
onListUpdated = _ref$onListUpdated === void 0 ? function () {} : _ref$onListUpdated,
|
|
6640
|
+
_ref$setIsListFull = _ref.setIsListFull,
|
|
6641
|
+
setIsListFull = _ref$setIsListFull === void 0 ? function () {} : _ref$setIsListFull,
|
|
6642
|
+
_ref$setIsSearchResul = _ref.setIsSearchResultEmpty,
|
|
6643
|
+
setIsSearchResultEmpty = _ref$setIsSearchResul === void 0 ? function () {} : _ref$setIsSearchResul,
|
|
6644
|
+
triggerLoadMoreCoins = _ref.triggerLoadMoreCoins;
|
|
6645
|
+
var _useState = React.useState([]),
|
|
6646
|
+
filteredCoins = _useState[0],
|
|
6647
|
+
setFilteredCoins = _useState[1];
|
|
6648
|
+
var _useReferredState = useReferredState(0),
|
|
6649
|
+
limitedCoinsNumber = _useReferredState[0],
|
|
6650
|
+
setLimitedCoinsNumber = _useReferredState[1];
|
|
6651
|
+
var _useState2 = React.useState([]),
|
|
6652
|
+
displayedCoins = _useState2[0],
|
|
6653
|
+
setDisplayedCoins = _useState2[1];
|
|
6654
|
+
var handleSearchAsset = function handleSearchAsset(value) {
|
|
6655
|
+
var searchTerm = value.trim().toLowerCase();
|
|
6656
|
+
if (searchTerm !== "") {
|
|
6657
|
+
var searchWords = searchTerm.split(/\s+/); // Split search terms on whitespace
|
|
6658
|
+
|
|
6659
|
+
var filteredAndSortedCoins = coinsList.filter(function (coin) {
|
|
6660
|
+
// Check if all search words are found in any of the given properties
|
|
6661
|
+
return searchWords.every(function (word) {
|
|
6662
|
+
var _coin$latinName, _coin$ticker, _coin$tickerPrintable;
|
|
6663
|
+
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));
|
|
6664
|
+
});
|
|
6665
|
+
}).sort(function (a, b) {
|
|
6666
|
+
// Check for exact matches
|
|
6667
|
+
var aMatch = a.latinName.toLowerCase() === searchTerm || a.ticker.toLowerCase() === searchTerm || a.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6668
|
+
var bMatch = b.latinName.toLowerCase() === searchTerm || b.ticker.toLowerCase() === searchTerm || b.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6669
|
+
if (bMatch - aMatch !== 0) {
|
|
6670
|
+
// Prioritize exact matches to the top
|
|
6671
|
+
return bMatch - aMatch;
|
|
6672
|
+
} else {
|
|
6673
|
+
// Sort remaining items alphabetically by latinName
|
|
6674
|
+
return a.latinName.toLowerCase().localeCompare(b.latinName.toLowerCase());
|
|
6675
|
+
}
|
|
6676
|
+
});
|
|
6677
|
+
setFilteredCoins(filteredAndSortedCoins);
|
|
6678
|
+
} else {
|
|
6679
|
+
setFilteredCoins(coinsList); // Reset to original list if search term is empty
|
|
6680
|
+
}
|
|
6681
|
+
};
|
|
6682
|
+
var updateDisplayedCoins = function updateDisplayedCoins() {
|
|
6683
|
+
var fullList = limitedCoinsNumber.current >= filteredCoins.length;
|
|
6684
|
+
setDisplayedCoins(fullList ? filteredCoins : filteredCoins.slice(0, limitedCoinsNumber.current));
|
|
6685
|
+
setIsListFull(fullList);
|
|
6686
|
+
};
|
|
6687
|
+
var displayMoreCoins = function displayMoreCoins() {
|
|
6688
|
+
setLimitedCoinsNumber(function (prev) {
|
|
6689
|
+
return prev + partialLoadingIncrement;
|
|
6690
|
+
});
|
|
6691
|
+
updateDisplayedCoins();
|
|
6692
|
+
};
|
|
6693
|
+
|
|
6694
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6695
|
+
React.useEffect(function () {
|
|
6696
|
+
return onListUpdated();
|
|
6697
|
+
}, [displayedCoins]);
|
|
6698
|
+
|
|
6699
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6700
|
+
React.useEffect(function () {
|
|
6701
|
+
return displayMoreCoins();
|
|
6702
|
+
}, [triggerLoadMoreCoins]);
|
|
6703
|
+
React.useEffect(function () {
|
|
6704
|
+
if ((filteredCoins == null ? void 0 : filteredCoins.length) > partialLoadingIncrement && partialLoadingEnabled) {
|
|
6705
|
+
setLimitedCoinsNumber(partialLoadingIncrement);
|
|
6706
|
+
updateDisplayedCoins();
|
|
6707
|
+
} else {
|
|
6708
|
+
setLimitedCoinsNumber(0);
|
|
6709
|
+
setDisplayedCoins(filteredCoins);
|
|
6710
|
+
setIsListFull(true);
|
|
6711
|
+
}
|
|
6712
|
+
setIsSearchResultEmpty((filteredCoins == null ? void 0 : filteredCoins.length) === 0 && searchQuery !== "");
|
|
6713
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6714
|
+
}, [filteredCoins]);
|
|
6715
|
+
React.useEffect(function () {
|
|
6716
|
+
if (coinsBundle != null) handleSearchAsset(searchQuery);
|
|
6717
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6718
|
+
}, [coinsList, searchQuery]);
|
|
6719
|
+
return displayedCoins.map(function (coin) {
|
|
6720
|
+
return coinsBundle.find(function (bundleItem) {
|
|
6721
|
+
return bundleItem.coin.ticker === coin.ticker;
|
|
6722
|
+
}).component;
|
|
6723
|
+
}).map(function (Item) {
|
|
6724
|
+
return /*#__PURE__*/React__default["default"].createElement(Item, null);
|
|
6725
|
+
});
|
|
6726
|
+
};
|
|
6727
|
+
SearchableCoinsList.propTypes = {
|
|
6728
|
+
coinsList: PropTypes.array.isRequired,
|
|
6729
|
+
coinsBundle: PropTypes.array.isRequired,
|
|
6730
|
+
searchQuery: PropTypes.string.isRequired,
|
|
6731
|
+
partialLoadingEnabled: PropTypes.bool,
|
|
6732
|
+
partialLoadingIncrement: PropTypes.number,
|
|
6733
|
+
onListUpdated: PropTypes.func,
|
|
6734
|
+
setIsListFull: PropTypes.func,
|
|
6735
|
+
setIsSearchResultEmpty: PropTypes.func,
|
|
6736
|
+
triggerLoadMoreCoins: PropTypes.number
|
|
6737
|
+
};
|
|
6738
|
+
SearchableCoinsList.defaultProps = {
|
|
6739
|
+
partialLoadingEnabled: true,
|
|
6740
|
+
partialLoadingIncrement: 100,
|
|
6741
|
+
onListUpdated: function onListUpdated() {},
|
|
6742
|
+
setIsListFull: function setIsListFull() {},
|
|
6743
|
+
setIsSearchResultEmpty: function setIsSearchResultEmpty() {}
|
|
6744
|
+
};
|
|
6745
|
+
|
|
6746
|
+
function _catch$c(body, recover) {
|
|
6429
6747
|
try {
|
|
6430
6748
|
var result = body();
|
|
6431
6749
|
} catch (e) {
|
|
@@ -6526,39 +6844,36 @@ var CoinPicker = function CoinPicker(_ref) {
|
|
|
6526
6844
|
var _useState = React.useState(null),
|
|
6527
6845
|
coins = _useState[0],
|
|
6528
6846
|
setCoins = _useState[1];
|
|
6529
|
-
var _useState2 = React.useState([]),
|
|
6530
|
-
filteredCoins = _useState2[0],
|
|
6531
|
-
setFilteredCoins = _useState2[1];
|
|
6532
6847
|
var _useReferredState = useReferredState({}),
|
|
6533
6848
|
initiallyEnabledCoins = _useReferredState[0],
|
|
6534
6849
|
setInitiallyEnabledCoins = _useReferredState[1];
|
|
6535
6850
|
var _useReferredState2 = useReferredState({}),
|
|
6536
6851
|
currentlyEnabledCoins = _useReferredState2[0],
|
|
6537
6852
|
setCurrentlyEnabledCoins = _useReferredState2[1];
|
|
6853
|
+
var _useState2 = React.useState(""),
|
|
6854
|
+
searchFieldValue = _useState2[0],
|
|
6855
|
+
setSearchFieldValue = _useState2[1];
|
|
6538
6856
|
var _useState3 = React.useState(""),
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
var _useState4 = React.useState(
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
var _useState5 = React.useState(
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
var _useState6 = React.useState(
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
var _useState7 = React.useState(
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
var _useState8 = React.useState(
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
var _useState9 = React.useState(
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
var _useState10 = React.useState(true),
|
|
6560
|
-
isListFull = _useState10[0],
|
|
6561
|
-
setIsListFull = _useState10[1];
|
|
6857
|
+
scrollWrapperClass = _useState3[0],
|
|
6858
|
+
setScrollWrapperClass = _useState3[1];
|
|
6859
|
+
var _useState4 = React.useState(false),
|
|
6860
|
+
searchEnabled = _useState4[0],
|
|
6861
|
+
setSearchEnabled = _useState4[1];
|
|
6862
|
+
var _useState5 = React.useState(null),
|
|
6863
|
+
coinsContent = _useState5[0],
|
|
6864
|
+
setCoinsContent = _useState5[1];
|
|
6865
|
+
var _useState6 = React.useState(false),
|
|
6866
|
+
isCoinsDataReloadable = _useState6[0],
|
|
6867
|
+
setIsCoinsDataReloadable = _useState6[1];
|
|
6868
|
+
var _useState7 = React.useState(true),
|
|
6869
|
+
isListFull = _useState7[0],
|
|
6870
|
+
setIsListFull = _useState7[1];
|
|
6871
|
+
var _useState8 = React.useState(false),
|
|
6872
|
+
isSearchResultEmpty = _useState8[0],
|
|
6873
|
+
setIsSearchResultEmpty = _useState8[1];
|
|
6874
|
+
var _useState9 = React.useState(0),
|
|
6875
|
+
triggerLoadMoreCoins = _useState9[0],
|
|
6876
|
+
setTriggerLoadMoreCoins = _useState9[1];
|
|
6562
6877
|
var searchRef = React.useRef();
|
|
6563
6878
|
var scrollContainerRef = React.useRef();
|
|
6564
6879
|
var skeletonItemsCount = (initiallyEnabledCoinsList == null ? void 0 : initiallyEnabledCoinsList.length) || (partialLoadingEnabled ? partialLoadingIncrement : 6);
|
|
@@ -6616,43 +6931,12 @@ var CoinPicker = function CoinPicker(_ref) {
|
|
|
6616
6931
|
if (mode === COIN_PICKER_MODES.CHECKBOX) handleToggleClick(coin.ticker);
|
|
6617
6932
|
handleClick(coin.ticker);
|
|
6618
6933
|
};
|
|
6619
|
-
var handleSearchAsset = function handleSearchAsset(value) {
|
|
6620
|
-
// TODO: [refactoring, high] use unified search function. task_id=be0475316f374dd4a926c948d969e704
|
|
6621
|
-
setSearchFieldValue(value); // Trim the input to handle leading/trailing spaces
|
|
6622
|
-
var searchTerm = value.trim().toLowerCase();
|
|
6623
|
-
if (searchTerm !== "") {
|
|
6624
|
-
var searchWords = searchTerm.split(/\s+/); // Split search terms on whitespace
|
|
6625
|
-
|
|
6626
|
-
var filteredAndSortedCoins = coins.filter(function (coin) {
|
|
6627
|
-
// Check if all search words are found in any of the given properties
|
|
6628
|
-
return searchWords.every(function (word) {
|
|
6629
|
-
var _coin$latinName, _coin$ticker, _coin$tickerPrintable;
|
|
6630
|
-
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));
|
|
6631
|
-
});
|
|
6632
|
-
}).sort(function (a, b) {
|
|
6633
|
-
// Check for exact matches
|
|
6634
|
-
var aMatch = a.latinName.toLowerCase() === searchTerm || a.ticker.toLowerCase() === searchTerm || a.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6635
|
-
var bMatch = b.latinName.toLowerCase() === searchTerm || b.ticker.toLowerCase() === searchTerm || b.tickerPrintable.toLowerCase() === searchTerm ? 1 : 0;
|
|
6636
|
-
if (bMatch - aMatch !== 0) {
|
|
6637
|
-
// Prioritize exact matches to the top
|
|
6638
|
-
return bMatch - aMatch;
|
|
6639
|
-
} else {
|
|
6640
|
-
// Sort remaining items alphabetically by latinName
|
|
6641
|
-
return a.latinName.toLowerCase().localeCompare(b.latinName.toLowerCase());
|
|
6642
|
-
}
|
|
6643
|
-
});
|
|
6644
|
-
setFilteredCoins(filteredAndSortedCoins);
|
|
6645
|
-
} else {
|
|
6646
|
-
setFilteredCoins(coins); // Reset to original list if search term is empty
|
|
6647
|
-
}
|
|
6648
|
-
};
|
|
6649
6934
|
var loadCoinsAndSaveToState = function loadCoinsAndSaveToState() {
|
|
6650
6935
|
(function () {
|
|
6651
6936
|
try {
|
|
6652
|
-
var _temp = _catch$
|
|
6937
|
+
var _temp = _catch$c(function () {
|
|
6653
6938
|
return Promise.resolve(loadCoinsAndContent ? loadCoinsAndContent() : defaultLoadCoinsAndContent()).then(function (data) {
|
|
6654
6939
|
setCoins(data.coins);
|
|
6655
|
-
setFilteredCoins(data.coins);
|
|
6656
6940
|
setCoinsContent(data.content);
|
|
6657
6941
|
setIsCoinsDataReloadable(!!data.isCoinsDataReloadable);
|
|
6658
6942
|
});
|
|
@@ -6700,45 +6984,22 @@ var CoinPicker = function CoinPicker(_ref) {
|
|
|
6700
6984
|
setSearchEnabled(search ? true : searchAdaptive && initiallyEnabledCoinsList ? initiallyEnabledCoinsList.length > 6 : false);
|
|
6701
6985
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6702
6986
|
}, [search, searchAdaptive, coins]);
|
|
6703
|
-
React.useEffect(function () {
|
|
6704
|
-
if ((filteredCoins == null ? void 0 : filteredCoins.length) > partialLoadingIncrement && partialLoadingEnabled) {
|
|
6705
|
-
setLimitedCoinsNumber(partialLoadingIncrement);
|
|
6706
|
-
} else {
|
|
6707
|
-
setLimitedCoinsNumber(0);
|
|
6708
|
-
setDisplayedCoins(filteredCoins);
|
|
6709
|
-
setIsListFull(true);
|
|
6710
|
-
}
|
|
6711
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6712
|
-
}, [filteredCoins]);
|
|
6713
|
-
React.useEffect(function () {
|
|
6714
|
-
if (limitedCoinsNumber > 0) {
|
|
6715
|
-
var coinsToDisplay = filteredCoins.slice(0, limitedCoinsNumber);
|
|
6716
|
-
setDisplayedCoins(coinsToDisplay);
|
|
6717
|
-
setIsListFull(coinsToDisplay.length === filteredCoins.length);
|
|
6718
|
-
}
|
|
6719
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6720
|
-
}, [limitedCoinsNumber]);
|
|
6721
|
-
var displayMoreCoins = function displayMoreCoins() {
|
|
6722
|
-
setLimitedCoinsNumber(function (prev) {
|
|
6723
|
-
return prev + partialLoadingIncrement;
|
|
6724
|
-
});
|
|
6725
|
-
};
|
|
6726
6987
|
var skeleton = function skeleton() {
|
|
6727
6988
|
var skeletonItems = [];
|
|
6728
6989
|
for (var i = 0; i < skeletonItemsCount; i++) {
|
|
6729
6990
|
skeletonItems.push( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6730
|
-
className: s["item"],
|
|
6991
|
+
className: s$2["item"],
|
|
6731
6992
|
key: "coin-picker-skeleton-" + i
|
|
6732
6993
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6733
|
-
className: s["link"] + " " + s["loading"]
|
|
6994
|
+
className: s$2["link"] + " " + s$2["loading"]
|
|
6734
6995
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6735
|
-
className: s["icon"] + " " + "skeleton-dark"
|
|
6996
|
+
className: s$2["icon"] + " " + "skeleton-dark"
|
|
6736
6997
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6737
|
-
className: s["content"]
|
|
6998
|
+
className: s$2["content"]
|
|
6738
6999
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6739
|
-
className: s["name"] + " " + "skeleton-dark"
|
|
7000
|
+
className: s$2["name"] + " " + "skeleton-dark"
|
|
6740
7001
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6741
|
-
className: s["amount"] + " " + "skeleton-dark"
|
|
7002
|
+
className: s$2["amount"] + " " + "skeleton-dark"
|
|
6742
7003
|
})))));
|
|
6743
7004
|
}
|
|
6744
7005
|
return skeletonItems;
|
|
@@ -6746,24 +7007,27 @@ var CoinPicker = function CoinPicker(_ref) {
|
|
|
6746
7007
|
var handleScroll = function handleScroll() {
|
|
6747
7008
|
var _scrollContainerRef$c, _scrollContainerRef$c2, _scrollContainerRef$c3, _scrollContainerRef$c4, _scrollContainerRef$c5, _scrollContainerRef$c6, _scrollContainerRef$c7;
|
|
6748
7009
|
if (scrollWrapperClass !== "") setScrollWrapperClass("");
|
|
6749
|
-
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"] : ""));
|
|
6750
|
-
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"]);
|
|
7010
|
+
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"] : ""));
|
|
7011
|
+
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"]);
|
|
7012
|
+
};
|
|
7013
|
+
var displayMoreCoins = function displayMoreCoins() {
|
|
7014
|
+
return setTriggerLoadMoreCoins(function (prev) {
|
|
7015
|
+
return prev + 1;
|
|
7016
|
+
});
|
|
6751
7017
|
};
|
|
6752
7018
|
|
|
6753
7019
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6754
7020
|
React.useEffect(handleScroll, []);
|
|
6755
|
-
|
|
6756
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6757
|
-
React.useEffect(handleScroll, [filteredCoins]);
|
|
6758
7021
|
var shouldShowSkeleton = coins == null;
|
|
6759
7022
|
return coins ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6760
|
-
className: s["coin-picker"] + (shouldShowSkeleton ? " " + s["loading"] : "")
|
|
7023
|
+
className: s$2["coin-picker"] + (shouldShowSkeleton ? " " + s$2["loading"] : "")
|
|
6761
7024
|
}, searchEnabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6762
|
-
className: s["coin-picker-search"]
|
|
7025
|
+
className: s$2["coin-picker-search"]
|
|
6763
7026
|
}, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6764
7027
|
value: searchFieldValue,
|
|
6765
7028
|
onChange: function onChange(e) {
|
|
6766
|
-
|
|
7029
|
+
setSearchFieldValue(e.target.value);
|
|
7030
|
+
handleScroll();
|
|
6767
7031
|
},
|
|
6768
7032
|
placeholder: texts.searchPlaceholder,
|
|
6769
7033
|
isSmallHeight: true,
|
|
@@ -6771,71 +7035,88 @@ var CoinPicker = function CoinPicker(_ref) {
|
|
|
6771
7035
|
ref: searchRef,
|
|
6772
7036
|
disabled: shouldShowSkeleton
|
|
6773
7037
|
})) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6774
|
-
className: s["coin-picker-wrapper"] + " " + scrollWrapperClass + (searchEnabled ? " " + s["fixed-height"] : "")
|
|
7038
|
+
className: s$2["coin-picker-wrapper"] + " " + scrollWrapperClass + (searchEnabled ? " " + s$2["fixed-height"] : "")
|
|
6775
7039
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6776
|
-
className: s["coin-picker-wrapper-content"] + (searchEnabled ? " " + s["fixed-height"] : ""),
|
|
7040
|
+
className: s$2["coin-picker-wrapper-content"] + (searchEnabled ? " " + s$2["fixed-height"] : ""),
|
|
6777
7041
|
ref: scrollContainerRef,
|
|
6778
7042
|
onScroll: handleScroll
|
|
6779
7043
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6780
|
-
className: s["coin-picker-wrapper-content-assets"]
|
|
6781
|
-
}, shouldShowSkeleton ? skeleton() :
|
|
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
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
7044
|
+
className: s$2["coin-picker-wrapper-content-assets"]
|
|
7045
|
+
}, shouldShowSkeleton ? skeleton() : /*#__PURE__*/React__default["default"].createElement(SearchableCoinsList, {
|
|
7046
|
+
searchQuery: searchFieldValue,
|
|
7047
|
+
onListUpdated: function onListUpdated() {
|
|
7048
|
+
return handleScroll();
|
|
7049
|
+
},
|
|
7050
|
+
setIsListFull: setIsListFull,
|
|
7051
|
+
setIsSearchResultEmpty: setIsSearchResultEmpty,
|
|
7052
|
+
triggerLoadMoreCoins: triggerLoadMoreCoins,
|
|
7053
|
+
coinsList: allCoins,
|
|
7054
|
+
coinsBundle: allCoins.map(function (coin, index) {
|
|
7055
|
+
return {
|
|
7056
|
+
coin: coin,
|
|
7057
|
+
component: function component() {
|
|
7058
|
+
var _coinsContent$find$su, _coinsContent$find;
|
|
7059
|
+
var _coinToIconPaths = coinToIconPaths(coin),
|
|
7060
|
+
assetIconSrc = _coinToIconPaths.assetIconSrc,
|
|
7061
|
+
assetIconProtocolSrc = _coinToIconPaths.assetIconProtocolSrc;
|
|
7062
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7063
|
+
className: s$2["item"],
|
|
7064
|
+
key: "picker-" + coin.ticker + "-" + index,
|
|
7065
|
+
onClick: function onClick(e) {
|
|
7066
|
+
return handleError(function () {
|
|
7067
|
+
return handleCoinClick(coin);
|
|
7068
|
+
}, e);
|
|
7069
|
+
}
|
|
7070
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7071
|
+
className: s$2["link"] + (currentlyEnabledCoins.current[coin.ticker] !== initiallyEnabledCoins.current[coin.ticker] ? " " + s$2["outline"] : "")
|
|
7072
|
+
}, /*#__PURE__*/React__default["default"].createElement(AssetIcon, {
|
|
7073
|
+
assetIconSrc: assetIconSrc,
|
|
7074
|
+
assetIconProtocolSrc: assetIconProtocolSrc,
|
|
7075
|
+
fallbackSrc: FALLBACK_ASSET_ICON_URL
|
|
7076
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7077
|
+
className: s$2["content"],
|
|
7078
|
+
key: coin.ticker
|
|
7079
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7080
|
+
className: s$2["name"]
|
|
7081
|
+
}, coin.latinName), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7082
|
+
className: s$2["amount"]
|
|
7083
|
+
}, (_coinsContent$find$su = coinsContent == null || (_coinsContent$find = coinsContent.find(function (i) {
|
|
7084
|
+
return i.coin === coin;
|
|
7085
|
+
})) == null ? void 0 : _coinsContent$find.subtitle) != null ? _coinsContent$find$su : "")), mode === COIN_PICKER_MODES.BUTTON ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7086
|
+
className: s$2["arrow"]
|
|
7087
|
+
}, /*#__PURE__*/React__default["default"].createElement(ArrowIcon, null)) : mode === COIN_PICKER_MODES.CHECKBOX ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7088
|
+
className: s$2["toggle-container"]
|
|
7089
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonWithText, {
|
|
7090
|
+
onStateChange: function onStateChange(resetButtonLoader) {
|
|
7091
|
+
return handleToggleClick(coin.ticker, resetButtonLoader);
|
|
7092
|
+
},
|
|
7093
|
+
isSwitchedOn: currentlyEnabledCoins.current[coin.ticker],
|
|
7094
|
+
id: index
|
|
7095
|
+
})) : ""));
|
|
7096
|
+
}
|
|
7097
|
+
};
|
|
7098
|
+
})
|
|
7099
|
+
})), isSearchResultEmpty ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7100
|
+
className: s$2["coin-picker-wrapper-content-asset-not-found"]
|
|
6822
7101
|
}, /*#__PURE__*/React__default["default"].createElement("h6", null, texts.noAssetsMessage)) : "", partialLoadingEnabled && !isListFull ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6823
|
-
className: s["coin-picker-wrapper-content-load-more-button"]
|
|
7102
|
+
className: s$2["coin-picker-wrapper-content-load-more-button"]
|
|
6824
7103
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
6825
7104
|
mode: "primary-transparent",
|
|
6826
7105
|
size: "sm",
|
|
6827
7106
|
loader: false,
|
|
6828
7107
|
content: texts.loadMoreButton,
|
|
6829
|
-
onClick:
|
|
7108
|
+
onClick: function onClick() {
|
|
7109
|
+
return displayMoreCoins();
|
|
7110
|
+
},
|
|
6830
7111
|
handleError: handleError
|
|
6831
7112
|
})) : "", searchEnabled && showRequestMissingCoinsInfoMessage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6832
|
-
className: s["coin-picker-wrapper-content-bottom-message"]
|
|
7113
|
+
className: s$2["coin-picker-wrapper-content-bottom-message"]
|
|
6833
7114
|
}, /*#__PURE__*/React__default["default"].createElement(InformationMessage, {
|
|
6834
7115
|
text: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, texts.assetSuggestionMessage.part1, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
6835
7116
|
target: "_blank",
|
|
6836
7117
|
rel: "noreferrer",
|
|
6837
7118
|
href: supportUrl,
|
|
6838
|
-
className: s["coin-picker-wrapper-content-bottom-message-link"]
|
|
7119
|
+
className: s$2["coin-picker-wrapper-content-bottom-message-link"]
|
|
6839
7120
|
}, " " + texts.assetSuggestionMessage.part2 + " "), texts.assetSuggestionMessage.part3)
|
|
6840
7121
|
})) : "")))) : /*#__PURE__*/React__default["default"].createElement(LoadingDots, null);
|
|
6841
7122
|
};
|
|
@@ -6920,34 +7201,433 @@ var CoinPickerDialogStep = function CoinPickerDialogStep(_ref) {
|
|
|
6920
7201
|
texts = _ref.texts;
|
|
6921
7202
|
return /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
6922
7203
|
controls: controls,
|
|
6923
|
-
stepName: stepName,
|
|
6924
|
-
title: title,
|
|
6925
|
-
subtitle: subtitle,
|
|
6926
|
-
cornerBackButtonTitle: cornerBackButtonTitle,
|
|
6927
|
-
cornerBackButtonClick: cornerBackButtonClick,
|
|
6928
|
-
confirmButtonText: confirmButtonText,
|
|
6929
|
-
confirmButtonClick: confirmButtonClick,
|
|
6930
|
-
showCornerBackButton: showCornerBackButton,
|
|
6931
|
-
headerTitleLeft: true,
|
|
7204
|
+
stepName: stepName,
|
|
7205
|
+
title: title,
|
|
7206
|
+
subtitle: subtitle,
|
|
7207
|
+
cornerBackButtonTitle: cornerBackButtonTitle,
|
|
7208
|
+
cornerBackButtonClick: cornerBackButtonClick,
|
|
7209
|
+
confirmButtonText: confirmButtonText,
|
|
7210
|
+
confirmButtonClick: confirmButtonClick,
|
|
7211
|
+
showCornerBackButton: showCornerBackButton,
|
|
7212
|
+
headerTitleLeft: true,
|
|
7213
|
+
subtitleSmallMargin: true,
|
|
7214
|
+
width: controls ? DIALOG_SIZES.largePlus.width : null
|
|
7215
|
+
}, /*#__PURE__*/React__default["default"].createElement(CoinPicker, {
|
|
7216
|
+
mode: mode,
|
|
7217
|
+
allCoins: allCoins,
|
|
7218
|
+
initiallyEnabledCoinsList: initiallyEnabledCoinsList,
|
|
7219
|
+
handleClick: function handleClick(ticker) {
|
|
7220
|
+
return handleCoinSelection(ticker);
|
|
7221
|
+
},
|
|
7222
|
+
triggerToReloadData: triggerToReloadData,
|
|
7223
|
+
search: search,
|
|
7224
|
+
searchAdaptive: searchAdaptive,
|
|
7225
|
+
loadCoinsAndContent: loadCoinsAndContent,
|
|
7226
|
+
showRequestMissingCoinsInfoMessage: showRequestMissingCoinsInfoMessage,
|
|
7227
|
+
coinToIconPaths: coinToIconPaths,
|
|
7228
|
+
supportUrl: supportUrl,
|
|
7229
|
+
texts: texts
|
|
7230
|
+
}));
|
|
7231
|
+
};
|
|
7232
|
+
|
|
7233
|
+
var s$1 = {"colored-notice":"_ZE1ju","colored-notice-text":"_aN0LH"};
|
|
7234
|
+
|
|
7235
|
+
/**
|
|
7236
|
+
* ColoredNotice component displays a notice with optional text and a button.
|
|
7237
|
+
*
|
|
7238
|
+
* @component
|
|
7239
|
+
* @param {Object} props - The component props.
|
|
7240
|
+
* @param {string} [props.text] - The text to be displayed in the notice.
|
|
7241
|
+
* @param {string} [props.buttonTitle] - The title of the button.
|
|
7242
|
+
* @param {function} [props.onButtonClick] - Callback function to be called when the button is clicked.
|
|
7243
|
+
* @returns {JSX.Element} The ColoredNotice component.
|
|
7244
|
+
*/
|
|
7245
|
+
var ColoredNotice = function ColoredNotice(_ref) {
|
|
7246
|
+
var _ref$text = _ref.text,
|
|
7247
|
+
text = _ref$text === void 0 ? "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor." : _ref$text,
|
|
7248
|
+
buttonTitle = _ref.buttonTitle,
|
|
7249
|
+
_ref$onButtonClick = _ref.onButtonClick,
|
|
7250
|
+
onButtonClick = _ref$onButtonClick === void 0 ? function () {} : _ref$onButtonClick;
|
|
7251
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7252
|
+
className: s$1["colored-notice"]
|
|
7253
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7254
|
+
className: s$1["colored-notice-text"]
|
|
7255
|
+
}, text), buttonTitle ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
7256
|
+
mode: "primary",
|
|
7257
|
+
size: "sm",
|
|
7258
|
+
content: buttonTitle,
|
|
7259
|
+
loader: false,
|
|
7260
|
+
onClick: onButtonClick
|
|
7261
|
+
}) : null);
|
|
7262
|
+
};
|
|
7263
|
+
ColoredNotice.propTypes = {
|
|
7264
|
+
text: PropTypes.string,
|
|
7265
|
+
buttonTitle: PropTypes.string,
|
|
7266
|
+
onButtonClick: PropTypes.func
|
|
7267
|
+
};
|
|
7268
|
+
ColoredNotice.defaultProps = {
|
|
7269
|
+
text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.",
|
|
7270
|
+
onButtonClick: function onButtonClick() {}
|
|
7271
|
+
};
|
|
7272
|
+
|
|
7273
|
+
var messageIcon = (function () {
|
|
7274
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
7275
|
+
width: "130",
|
|
7276
|
+
height: "130",
|
|
7277
|
+
viewBox: "0 0 130 130",
|
|
7278
|
+
fill: "none",
|
|
7279
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7280
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7281
|
+
"fill-rule": "evenodd",
|
|
7282
|
+
"clip-rule": "evenodd",
|
|
7283
|
+
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",
|
|
7284
|
+
fill: "#2294F0"
|
|
7285
|
+
}), /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
7286
|
+
id: "mask0",
|
|
7287
|
+
style: {
|
|
7288
|
+
maskType: "alpha"
|
|
7289
|
+
},
|
|
7290
|
+
maskUnits: "userSpaceOnUse",
|
|
7291
|
+
x: "0",
|
|
7292
|
+
y: "0",
|
|
7293
|
+
width: "130",
|
|
7294
|
+
height: "130"
|
|
7295
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7296
|
+
"fill-rule": "evenodd",
|
|
7297
|
+
"clip-rule": "evenodd",
|
|
7298
|
+
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",
|
|
7299
|
+
fill: "white"
|
|
7300
|
+
})), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
7301
|
+
mask: "url(#mask0)"
|
|
7302
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7303
|
+
opacity: "0.3",
|
|
7304
|
+
x: "3.25",
|
|
7305
|
+
y: "150.776",
|
|
7306
|
+
width: "227.136",
|
|
7307
|
+
height: "25.2373",
|
|
7308
|
+
transform: "rotate(-45 3.25 150.776)",
|
|
7309
|
+
fill: "white"
|
|
7310
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7311
|
+
opacity: "0.3",
|
|
7312
|
+
x: "-48.4546",
|
|
7313
|
+
y: "126.52",
|
|
7314
|
+
width: "227.136",
|
|
7315
|
+
height: "25.2373",
|
|
7316
|
+
transform: "rotate(-45 -48.4546 126.52)",
|
|
7317
|
+
fill: "white"
|
|
7318
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7319
|
+
x: "27.75",
|
|
7320
|
+
y: "29.5",
|
|
7321
|
+
width: "74.5",
|
|
7322
|
+
height: "81.5",
|
|
7323
|
+
rx: "12",
|
|
7324
|
+
fill: "white"
|
|
7325
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7326
|
+
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",
|
|
7327
|
+
fill: "white"
|
|
7328
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7329
|
+
"fill-rule": "evenodd",
|
|
7330
|
+
"clip-rule": "evenodd",
|
|
7331
|
+
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",
|
|
7332
|
+
fill: "#2294F0"
|
|
7333
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7334
|
+
d: "M50.072 49.088H52.03V54.5H50.072V49.088ZM52.074 46.382V48.153H50.028V46.382H52.074Z",
|
|
7335
|
+
fill: "white"
|
|
7336
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7337
|
+
opacity: "0.2",
|
|
7338
|
+
d: "M41 74.5H63",
|
|
7339
|
+
stroke: "#2294F0",
|
|
7340
|
+
"stroke-width": "4",
|
|
7341
|
+
"stroke-linecap": "round",
|
|
7342
|
+
"stroke-linejoin": "round"
|
|
7343
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7344
|
+
opacity: "0.2",
|
|
7345
|
+
d: "M41 84.6157H84.1426",
|
|
7346
|
+
stroke: "#2294F0",
|
|
7347
|
+
"stroke-width": "4",
|
|
7348
|
+
"stroke-linecap": "round",
|
|
7349
|
+
"stroke-linejoin": "round"
|
|
7350
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7351
|
+
opacity: "0.2",
|
|
7352
|
+
d: "M41 94.7314H84.1426",
|
|
7353
|
+
stroke: "#2294F0",
|
|
7354
|
+
"stroke-width": "4",
|
|
7355
|
+
"stroke-linecap": "round",
|
|
7356
|
+
"stroke-linejoin": "round"
|
|
7357
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7358
|
+
opacity: "0.2",
|
|
7359
|
+
d: "M41 104.731H84.1426",
|
|
7360
|
+
stroke: "#2294F0",
|
|
7361
|
+
"stroke-width": "4",
|
|
7362
|
+
"stroke-linecap": "round",
|
|
7363
|
+
"stroke-linejoin": "round"
|
|
7364
|
+
})));
|
|
7365
|
+
});
|
|
7366
|
+
|
|
7367
|
+
var supportDialogImage = (function () {
|
|
7368
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
7369
|
+
width: "130",
|
|
7370
|
+
height: "130",
|
|
7371
|
+
viewBox: "0 0 130 130",
|
|
7372
|
+
fill: "none",
|
|
7373
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7374
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7375
|
+
"fill-rule": "evenodd",
|
|
7376
|
+
"clip-rule": "evenodd",
|
|
7377
|
+
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",
|
|
7378
|
+
fill: "#AFEBC3"
|
|
7379
|
+
}), /*#__PURE__*/React__default["default"].createElement("mask", {
|
|
7380
|
+
id: "mask0",
|
|
7381
|
+
"mask-type": "alpha",
|
|
7382
|
+
maskUnits: "userSpaceOnUse",
|
|
7383
|
+
x: "0",
|
|
7384
|
+
y: "0",
|
|
7385
|
+
width: "130",
|
|
7386
|
+
height: "130"
|
|
7387
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7388
|
+
"fill-rule": "evenodd",
|
|
7389
|
+
"clip-rule": "evenodd",
|
|
7390
|
+
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",
|
|
7391
|
+
fill: "white"
|
|
7392
|
+
})), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
7393
|
+
mask: "url(#mask0)"
|
|
7394
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7395
|
+
opacity: "0.3",
|
|
7396
|
+
x: "3.25",
|
|
7397
|
+
y: "150.776",
|
|
7398
|
+
width: "227.136",
|
|
7399
|
+
height: "25.2373",
|
|
7400
|
+
transform: "rotate(-45 3.25 150.776)",
|
|
7401
|
+
fill: "white"
|
|
7402
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
7403
|
+
opacity: "0.3",
|
|
7404
|
+
x: "-48.4545",
|
|
7405
|
+
y: "126.52",
|
|
7406
|
+
width: "227.136",
|
|
7407
|
+
height: "25.2373",
|
|
7408
|
+
transform: "rotate(-45 -48.4545 126.52)",
|
|
7409
|
+
fill: "white"
|
|
7410
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7411
|
+
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",
|
|
7412
|
+
fill: "#14A957"
|
|
7413
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7414
|
+
d: "M30.9045 51.8818H97.9136V117.118H30.9045V51.8818Z",
|
|
7415
|
+
fill: "white"
|
|
7416
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7417
|
+
opacity: "0.1",
|
|
7418
|
+
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",
|
|
7419
|
+
fill: "#24BE6A"
|
|
7420
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7421
|
+
d: "M58.2093 83.4849L63.0246 88.3002L71.3036 79.047",
|
|
7422
|
+
stroke: "#24BE6A",
|
|
7423
|
+
"stroke-width": "3.76358",
|
|
7424
|
+
"stroke-linecap": "round",
|
|
7425
|
+
"stroke-linejoin": "round"
|
|
7426
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
7427
|
+
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",
|
|
7428
|
+
fill: "#24BE6A"
|
|
7429
|
+
})));
|
|
7430
|
+
});
|
|
7431
|
+
|
|
7432
|
+
/**
|
|
7433
|
+
* Saves a user's subscription to receive notifications about a specific coin.
|
|
7434
|
+
* This function sends an email to subscribe the user to notifications for the specified coin.
|
|
7435
|
+
*
|
|
7436
|
+
* @function
|
|
7437
|
+
* @name saveSubscription
|
|
7438
|
+
* @param {Coin} coin - The coin object containing information about the coin, including its ticker symbol.
|
|
7439
|
+
* @param {string} address - The email address of the user who wishes to subscribe.
|
|
7440
|
+
* @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.
|
|
7441
|
+
*/
|
|
7442
|
+
|
|
7443
|
+
/**
|
|
7444
|
+
* WaitlistSubscription component handles user subscription to a waitlist for coin notifications.
|
|
7445
|
+
* It displays a notice with a button to open a dialog where the user can enter their email to subscribe.
|
|
7446
|
+
*
|
|
7447
|
+
* @component
|
|
7448
|
+
* @param {Object} props - The component props.
|
|
7449
|
+
* @param {Coin} props.coin - The coin object containing information about the coin.
|
|
7450
|
+
* @param {Object} props.translations - The text translations for the component.
|
|
7451
|
+
* @param {saveSubscription} props.saveSubscription - Function to handle/save the subscription.
|
|
7452
|
+
* @returns {JSX.Element} The WaitlistSubscription component.
|
|
7453
|
+
*/
|
|
7454
|
+
|
|
7455
|
+
function _catch$b(body, recover) {
|
|
7456
|
+
try {
|
|
7457
|
+
var result = body();
|
|
7458
|
+
} catch (e) {
|
|
7459
|
+
return recover(e);
|
|
7460
|
+
}
|
|
7461
|
+
if (result && result.then) {
|
|
7462
|
+
return result.then(void 0, recover);
|
|
7463
|
+
}
|
|
7464
|
+
return result;
|
|
7465
|
+
}
|
|
7466
|
+
var WaitlistSubscription = function WaitlistSubscription(_ref) {
|
|
7467
|
+
var coin = _ref.coin,
|
|
7468
|
+
translations = _ref.translations,
|
|
7469
|
+
saveSubscription = _ref.saveSubscription;
|
|
7470
|
+
var _useState = React.useState(),
|
|
7471
|
+
controls = _useState[0],
|
|
7472
|
+
_initControls = _useState[1];
|
|
7473
|
+
var _useState2 = React.useState(false),
|
|
7474
|
+
showDialog = _useState2[0],
|
|
7475
|
+
setShowDialog = _useState2[1];
|
|
7476
|
+
var _useState3 = React.useState(""),
|
|
7477
|
+
inputValue = _useState3[0],
|
|
7478
|
+
setInputValue = _useState3[1];
|
|
7479
|
+
var _useState4 = React.useState(false),
|
|
7480
|
+
isEmailValid = _useState4[0],
|
|
7481
|
+
setIsEmailValid = _useState4[1];
|
|
7482
|
+
var _useState5 = React.useState(false),
|
|
7483
|
+
errorEncountered = _useState5[0],
|
|
7484
|
+
setErrorEncountered = _useState5[1];
|
|
7485
|
+
var defaultTranslations = {
|
|
7486
|
+
coloredNotice: {
|
|
7487
|
+
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!",
|
|
7488
|
+
buttonTitle: "Subscribe for updates"
|
|
7489
|
+
},
|
|
7490
|
+
signUpStep: {
|
|
7491
|
+
title: coin.latinName + " (" + coin.ticker + ") listing notification",
|
|
7492
|
+
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.",
|
|
7493
|
+
actionButtonTitle: "Subscribe",
|
|
7494
|
+
inputTitle: "Your email address:",
|
|
7495
|
+
error: "Something went wrong. Please try again later."
|
|
7496
|
+
},
|
|
7497
|
+
successStep: {
|
|
7498
|
+
title: "Subscribed successfully!",
|
|
7499
|
+
subtitle: "We’ll notify you as soon as " + coin.latinName + " becomes available for swaps. Keep an eye on your inbox for the update.",
|
|
7500
|
+
actionButtonTitle: "Close"
|
|
7501
|
+
}
|
|
7502
|
+
};
|
|
7503
|
+
var t = translations != null ? translations : defaultTranslations;
|
|
7504
|
+
var STEPS = {
|
|
7505
|
+
signUp: "signUp",
|
|
7506
|
+
success: "success"
|
|
7507
|
+
};
|
|
7508
|
+
var subscribe = function subscribe(resetButtonLoader) {
|
|
7509
|
+
try {
|
|
7510
|
+
var _temp = _catch$b(function () {
|
|
7511
|
+
setErrorEncountered(false);
|
|
7512
|
+
return Promise.resolve(saveSubscription(coin, inputValue)).then(function (result) {
|
|
7513
|
+
if (result) {
|
|
7514
|
+
controls == null || controls.goToStep(STEPS.success);
|
|
7515
|
+
} else {
|
|
7516
|
+
setErrorEncountered(true);
|
|
7517
|
+
}
|
|
7518
|
+
resetButtonLoader();
|
|
7519
|
+
});
|
|
7520
|
+
}, function (e) {
|
|
7521
|
+
resetButtonLoader();
|
|
7522
|
+
logErrorOrOutputToConsole(e);
|
|
7523
|
+
setShowDialog(false);
|
|
7524
|
+
});
|
|
7525
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
7526
|
+
} catch (e) {
|
|
7527
|
+
return Promise.reject(e);
|
|
7528
|
+
}
|
|
7529
|
+
};
|
|
7530
|
+
var openDialog = function openDialog() {
|
|
7531
|
+
setErrorEncountered(false);
|
|
7532
|
+
setInputValue("");
|
|
7533
|
+
setIsEmailValid(false);
|
|
7534
|
+
controls == null || controls.toFirstStep(false);
|
|
7535
|
+
setShowDialog(true);
|
|
7536
|
+
};
|
|
7537
|
+
React.useEffect(function () {
|
|
7538
|
+
setIsEmailValid(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(inputValue));
|
|
7539
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7540
|
+
}, [inputValue]);
|
|
7541
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Dialog, {
|
|
7542
|
+
initControls: function initControls(controls) {
|
|
7543
|
+
return _initControls(controls);
|
|
7544
|
+
},
|
|
7545
|
+
showDialog: showDialog,
|
|
7546
|
+
onClose: function onClose() {
|
|
7547
|
+
return setShowDialog(false);
|
|
7548
|
+
}
|
|
7549
|
+
}, /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
7550
|
+
stepName: STEPS.signUp,
|
|
7551
|
+
controls: controls,
|
|
7552
|
+
title: t.signUpStep.title,
|
|
7553
|
+
subtitle: t.signUpStep.subtitle,
|
|
7554
|
+
confirmButtonClick: subscribe,
|
|
7555
|
+
confirmButtonEnabled: isEmailValid,
|
|
7556
|
+
confirmButtonText: t.signUpStep.actionButtonTitle,
|
|
7557
|
+
primaryButtonLoader: true,
|
|
6932
7558
|
subtitleSmallMargin: true,
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
7559
|
+
showBackgroundTitle: false,
|
|
7560
|
+
ImageRaw: messageIcon
|
|
7561
|
+
}, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
|
|
7562
|
+
title: t.signUpStep.inputTitle
|
|
7563
|
+
}, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
7564
|
+
type: "text",
|
|
7565
|
+
onChange: function onChange(e) {
|
|
7566
|
+
return setInputValue(e.target.value);
|
|
6940
7567
|
},
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
7568
|
+
value: inputValue
|
|
7569
|
+
}), errorEncountered ? /*#__PURE__*/React__default["default"].createElement(Validation, {
|
|
7570
|
+
text: t.signUpStep.error
|
|
7571
|
+
}) : null)), /*#__PURE__*/React__default["default"].createElement(DialogStep, {
|
|
7572
|
+
stepName: STEPS.success,
|
|
7573
|
+
controls: controls,
|
|
7574
|
+
title: t.successStep.title,
|
|
7575
|
+
subtitle: t.successStep.subtitle,
|
|
7576
|
+
confirmButtonClick: function confirmButtonClick() {
|
|
7577
|
+
return setShowDialog(false);
|
|
7578
|
+
},
|
|
7579
|
+
confirmButtonText: t.successStep.actionButtonTitle,
|
|
7580
|
+
showBackgroundTitle: false,
|
|
7581
|
+
ImageRaw: supportDialogImage,
|
|
7582
|
+
showCornerBackButton: false,
|
|
7583
|
+
subtitleSmallMargin: true
|
|
7584
|
+
})), /*#__PURE__*/React__default["default"].createElement(ColoredNotice, {
|
|
7585
|
+
text: t.coloredNotice.text,
|
|
7586
|
+
buttonTitle: t.coloredNotice.buttonTitle,
|
|
7587
|
+
onButtonClick: openDialog
|
|
7588
|
+
}));
|
|
7589
|
+
};
|
|
7590
|
+
WaitlistSubscription.propTypes = {
|
|
7591
|
+
coin: PropTypes.object.isRequired,
|
|
7592
|
+
translations: PropTypes.object
|
|
7593
|
+
};
|
|
7594
|
+
|
|
7595
|
+
var s = {"logo-carousel":"_CgRBd","logo-carousel-slide":"_hIh2D","slide":"_Gu7XN"};
|
|
7596
|
+
|
|
7597
|
+
/**
|
|
7598
|
+
* LogoCarousel component renders a set of logos in a sliding carousel.
|
|
7599
|
+
*
|
|
7600
|
+
* @component
|
|
7601
|
+
*
|
|
7602
|
+
* @param {Object} props - The props object for this component.
|
|
7603
|
+
* @param {Array<{logo: string, url: string}>} props.logos - Array of objects representing logos and their corresponding URLs.
|
|
7604
|
+
*/
|
|
7605
|
+
var LogoCarousel = function LogoCarousel(_ref) {
|
|
7606
|
+
var logos = _ref.logos;
|
|
7607
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7608
|
+
className: s["logo-carousel"]
|
|
7609
|
+
}, [].concat(Array(2)).map(function (z, i) {
|
|
7610
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7611
|
+
className: s["logo-carousel-slide"],
|
|
7612
|
+
key: "logo-carousel-slide-" + i
|
|
7613
|
+
}, logos.map(function (item, index) {
|
|
7614
|
+
return /*#__PURE__*/React__default["default"].createElement("a", {
|
|
7615
|
+
key: "logo-carousel-slide-" + i + "-" + index,
|
|
7616
|
+
href: item.url,
|
|
7617
|
+
target: "_blank"
|
|
7618
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7619
|
+
src: item.logo,
|
|
7620
|
+
alt: "logo"
|
|
7621
|
+
}));
|
|
7622
|
+
}));
|
|
6949
7623
|
}));
|
|
6950
7624
|
};
|
|
7625
|
+
LogoCarousel.propTypes = {
|
|
7626
|
+
logos: PropTypes.arrayOf(PropTypes.shape({
|
|
7627
|
+
logo: PropTypes.string.isRequired,
|
|
7628
|
+
url: PropTypes.string.isRequired
|
|
7629
|
+
})).isRequired
|
|
7630
|
+
};
|
|
6951
7631
|
|
|
6952
7632
|
var PARAMETER_VALUES_SEPARATOR = "|*|"; // Sting that with high probability will not be in the user's data
|
|
6953
7633
|
|
|
@@ -7041,154 +7721,6 @@ var Protocol = function Protocol(protocolName) {
|
|
|
7041
7721
|
this.protocol = protocolName;
|
|
7042
7722
|
};
|
|
7043
7723
|
|
|
7044
|
-
/**
|
|
7045
|
-
* The model for cryptocurrency coins.
|
|
7046
|
-
*
|
|
7047
|
-
* WARNING: this class should not be instantiated directly. Use only predefined singleton Coin (or descendants) instances.
|
|
7048
|
-
*/
|
|
7049
|
-
var Coin = /*#__PURE__*/function () {
|
|
7050
|
-
/**
|
|
7051
|
-
* Creates new coin
|
|
7052
|
-
*
|
|
7053
|
-
* @param latinName {string} the coin name in latin symbols like "Bitcoin"
|
|
7054
|
-
* @param ticker {string} the coin symbol/ticker/code like 'BTC'. Always upper case. A unique coin identifier
|
|
7055
|
-
* @param tickerPrintable {string} ticker but in printable format. Useful for tokens based on external blockchains
|
|
7056
|
-
* like ERC20 or TRC20. It is not friendly to display USDTERC20 or BUSDTRC20 - more neat options are just
|
|
7057
|
-
* USDT and BUSD. Note that you should always care about user's understanding of what coin he/she is working
|
|
7058
|
-
* with as printable ticker for USDTERC20 and USDTTRC20 are the same.
|
|
7059
|
-
* @param digitsCountAfterComma {number} count of digits after the comma. E.g. 8 for bitcoin
|
|
7060
|
-
* @param maxValue {number|null} max possible value for cryptocurrency. Null means that the currency has no max possible value
|
|
7061
|
-
* @param atomName {string} name of the coin's atomic value. Like 'satoshi' for bitcoin
|
|
7062
|
-
* @param mainnet {Network} main network for this coin
|
|
7063
|
-
* @param testnet {Network} test network for this coin
|
|
7064
|
-
* @param minConfirmations {number} min confirmations count to treat the coin's transaction confirmed
|
|
7065
|
-
* @param payableEntityStringForFeeRate {string|null} the payable fee entity like byte for bitcoin or gas for ether if present
|
|
7066
|
-
* @param feeOptionsTimeStringsSortedDesc {string[]} array of 4 strings for fee options when sending coins. Should be sorted from the highest time to the smallest
|
|
7067
|
-
* @param feeRatesExpirationTimeMs {number} number of milliseconds to treat the fee rates as expired
|
|
7068
|
-
* @param blockchain {Blockchain} blockchain object
|
|
7069
|
-
* @param [protocol] {Protocol|null} token/coin protocol if relevant
|
|
7070
|
-
* @param [tokenAddress] {string|null} address of contract of this token (if the coin is token)
|
|
7071
|
-
* @param [doesUseLowerCaseAddresses] {boolean} flag to clarify whether we can use lower case addresses to ensure more robust comparisons
|
|
7072
|
-
* @param [doesUseOutputs=false] {boolean} true if this coin uses inputs/outputs concept and false if it uses just balances
|
|
7073
|
-
*/
|
|
7074
|
-
function Coin(latinName, ticker, tickerPrintable, digitsCountAfterComma, maxValue, atomName, mainnet, testnet, minConfirmations, payableEntityStringForFeeRate, feeOptionsTimeStringsSortedDesc, feeRatesExpirationTimeMs, blockchain, protocol, tokenAddress, doesUseLowerCaseAddresses, doesUseOutputs) {
|
|
7075
|
-
if (protocol === void 0) {
|
|
7076
|
-
protocol = null;
|
|
7077
|
-
}
|
|
7078
|
-
if (tokenAddress === void 0) {
|
|
7079
|
-
tokenAddress = null;
|
|
7080
|
-
}
|
|
7081
|
-
if (doesUseLowerCaseAddresses === void 0) {
|
|
7082
|
-
doesUseLowerCaseAddresses = true;
|
|
7083
|
-
}
|
|
7084
|
-
if (doesUseOutputs === void 0) {
|
|
7085
|
-
doesUseOutputs = false;
|
|
7086
|
-
}
|
|
7087
|
-
this.latinName = latinName;
|
|
7088
|
-
this.ticker = ticker;
|
|
7089
|
-
this.tickerPrintable = tickerPrintable;
|
|
7090
|
-
this.digits = digitsCountAfterComma;
|
|
7091
|
-
this.maxValue = maxValue;
|
|
7092
|
-
this.atomName = atomName;
|
|
7093
|
-
this.mainnet = mainnet;
|
|
7094
|
-
this.testnet = testnet;
|
|
7095
|
-
this.minConfirmations = minConfirmations;
|
|
7096
|
-
this.payableEntityStringForFeeRate = payableEntityStringForFeeRate;
|
|
7097
|
-
this.feeOptionsTimeStringsSortedDesc = feeOptionsTimeStringsSortedDesc;
|
|
7098
|
-
this.feeRatesExpirationTimeMs = feeRatesExpirationTimeMs;
|
|
7099
|
-
this.protocol = protocol;
|
|
7100
|
-
this.blockchain = blockchain;
|
|
7101
|
-
// TODO: [bug, critical] use testnet property for testnet contract address as it blocks the app work in testnets
|
|
7102
|
-
this.tokenAddress = tokenAddress;
|
|
7103
|
-
this.feeCoin = this;
|
|
7104
|
-
this._significantDigits = 8;
|
|
7105
|
-
this.doesUseLowerCaseAddresses = doesUseLowerCaseAddresses;
|
|
7106
|
-
this.doesUseOutputs = doesUseOutputs;
|
|
7107
|
-
}
|
|
7108
|
-
|
|
7109
|
-
/**
|
|
7110
|
-
* Sets fee coin
|
|
7111
|
-
*
|
|
7112
|
-
* @param feeCoin {Coin} some tokens use another coin to charge transaction fee as they work on top of some external
|
|
7113
|
-
* blockchain. So pass here the coin the token uses for fee charging. Like for ERC20 token the fee coin is ETH.
|
|
7114
|
-
* By default, the creating coin will be set as a value for this field.
|
|
7115
|
-
*/
|
|
7116
|
-
var _proto = Coin.prototype;
|
|
7117
|
-
_proto.setFeeCoin = function setFeeCoin(feeCoin) {
|
|
7118
|
-
this.feeCoin = feeCoin;
|
|
7119
|
-
}
|
|
7120
|
-
|
|
7121
|
-
/**
|
|
7122
|
-
* Checks whether this coin uses another coin (blockchain) to charge fee for transactions (means works on base of
|
|
7123
|
-
* some external blockchain).
|
|
7124
|
-
*
|
|
7125
|
-
* @return {boolean} true if this coin uses external blockchain to perform transactions and charge fee
|
|
7126
|
-
*/;
|
|
7127
|
-
_proto.doesUseDifferentCoinFee = function doesUseDifferentCoinFee() {
|
|
7128
|
-
return this.feeCoin !== this;
|
|
7129
|
-
}
|
|
7130
|
-
|
|
7131
|
-
/**
|
|
7132
|
-
* Converts the given atoms string/number to string representing the same amount in coin itself - floating point number
|
|
7133
|
-
*
|
|
7134
|
-
* @param atoms {string} atoms positive integer amount
|
|
7135
|
-
* @return {string} coin amount floating point number as a string
|
|
7136
|
-
*/;
|
|
7137
|
-
_proto.atomsToCoinAmount = function atomsToCoinAmount(atoms) {
|
|
7138
|
-
throw new Error("Not implemented in base Coin");
|
|
7139
|
-
}
|
|
7140
|
-
|
|
7141
|
-
/**
|
|
7142
|
-
* Converts the given coins amount string/number to string representing the same amount in coin atoms - integer number
|
|
7143
|
-
*
|
|
7144
|
-
* @param coinsAmount {string} coins positive floating point amount
|
|
7145
|
-
* @return {string} coin atoms amount integer number as a string
|
|
7146
|
-
*/;
|
|
7147
|
-
_proto.coinAmountToAtoms = function coinAmountToAtoms(coinsAmount) {
|
|
7148
|
-
throw new Error("Not implemented in base Coin");
|
|
7149
|
-
}
|
|
7150
|
-
|
|
7151
|
-
/**
|
|
7152
|
-
* Composes URL to view the tx with given id in the external blockchain explorer
|
|
7153
|
-
*
|
|
7154
|
-
* @param txId {string} id of transaction
|
|
7155
|
-
* @return {string} URL string
|
|
7156
|
-
*/;
|
|
7157
|
-
_proto.composeUrlToTransactionExplorer = function composeUrlToTransactionExplorer(txId) {
|
|
7158
|
-
throw new Error("Not implemented in base Coin");
|
|
7159
|
-
}
|
|
7160
|
-
|
|
7161
|
-
/**
|
|
7162
|
-
* Most of the cryptocurrencies has specific fee rate or fee price metric. This value usually has specific measure
|
|
7163
|
-
* like satoshi/byte or gWei/gas. This function adds the described denomination string to the given amount
|
|
7164
|
-
* as a suffix and returns the result string ready to be show to a user.
|
|
7165
|
-
*
|
|
7166
|
-
* @param coinAtomsString {string} coin atoms positive integer amount
|
|
7167
|
-
* @return {string} string of coin amount and fee rate units
|
|
7168
|
-
*/;
|
|
7169
|
-
_proto.coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString = function coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
|
|
7170
|
-
throw new Error("Not implemented in base Coin");
|
|
7171
|
-
}
|
|
7172
|
-
|
|
7173
|
-
/**
|
|
7174
|
-
* Check whether this coin support transaction prioritisation during the sending process.
|
|
7175
|
-
*
|
|
7176
|
-
* @return {boolean} true if support transaction prioritisation and false otherwise
|
|
7177
|
-
*/;
|
|
7178
|
-
_proto.doesSupportTransactionPrioritisation = function doesSupportTransactionPrioritisation() {
|
|
7179
|
-
return Array.isArray(this.feeOptionsTimeStringsSortedDesc);
|
|
7180
|
-
};
|
|
7181
|
-
_proto.tickerAndProtocol = function tickerAndProtocol() {
|
|
7182
|
-
try {
|
|
7183
|
-
var _ref;
|
|
7184
|
-
return "" + this.tickerPrintable + (this.protocol ? (_ref = " " + this.protocol.protocol) != null ? _ref : "" : "");
|
|
7185
|
-
} catch (e) {
|
|
7186
|
-
improveAndRethrow(e, "tickerAndProtocol");
|
|
7187
|
-
}
|
|
7188
|
-
};
|
|
7189
|
-
return Coin;
|
|
7190
|
-
}();
|
|
7191
|
-
|
|
7192
7724
|
/**
|
|
7193
7725
|
* TODO: [tests, critical] Ued by payments logic
|
|
7194
7726
|
*
|
|
@@ -10290,6 +10822,13 @@ var SwapProvider = /*#__PURE__*/function () {
|
|
|
10290
10822
|
}
|
|
10291
10823
|
}
|
|
10292
10824
|
return coinName;
|
|
10825
|
+
}
|
|
10826
|
+
|
|
10827
|
+
/**
|
|
10828
|
+
* @return {Promise<Partner[]>}
|
|
10829
|
+
*/;
|
|
10830
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
10831
|
+
return Promise.resolve([]);
|
|
10293
10832
|
};
|
|
10294
10833
|
return SwapProvider;
|
|
10295
10834
|
}();
|
|
@@ -10310,6 +10849,7 @@ SwapProvider.SWAP_STATUSES = {
|
|
|
10310
10849
|
WAITING_FOR_PAYMENT: "waiting_for_payment",
|
|
10311
10850
|
CONFIRMING: "confirming",
|
|
10312
10851
|
PAYMENT_RECEIVED: "payment_received",
|
|
10852
|
+
VERIFYING: "verifying",
|
|
10313
10853
|
EXCHANGING: "exchanging",
|
|
10314
10854
|
COMPLETED: "completed",
|
|
10315
10855
|
REFUNDED: "refunded",
|
|
@@ -10317,6 +10857,12 @@ SwapProvider.SWAP_STATUSES = {
|
|
|
10317
10857
|
FAILED: "failed"
|
|
10318
10858
|
};
|
|
10319
10859
|
|
|
10860
|
+
var Partner = function Partner(name, url, logoUrl) {
|
|
10861
|
+
this.name = name;
|
|
10862
|
+
this.url = url;
|
|
10863
|
+
this.logoUrl = logoUrl;
|
|
10864
|
+
};
|
|
10865
|
+
|
|
10320
10866
|
function _catch$3(body, recover) {
|
|
10321
10867
|
try {
|
|
10322
10868
|
var result = body();
|
|
@@ -10726,7 +11272,7 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
|
|
|
10726
11272
|
case "finished":
|
|
10727
11273
|
return SwapProvider.SWAP_STATUSES.COMPLETED;
|
|
10728
11274
|
case "verifying":
|
|
10729
|
-
return SwapProvider.SWAP_STATUSES.
|
|
11275
|
+
return SwapProvider.SWAP_STATUSES.VERIFYING;
|
|
10730
11276
|
case "refunded":
|
|
10731
11277
|
return SwapProvider.SWAP_STATUSES.REFUNDED;
|
|
10732
11278
|
case "expired":
|
|
@@ -10818,6 +11364,29 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
|
|
|
10818
11364
|
return Promise.reject(e);
|
|
10819
11365
|
}
|
|
10820
11366
|
};
|
|
11367
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
11368
|
+
try {
|
|
11369
|
+
var _this7 = this;
|
|
11370
|
+
return Promise.resolve(_catch$3(function () {
|
|
11371
|
+
return Promise.resolve(_this7._fetchPartnersListIfNeeded()).then(function () {
|
|
11372
|
+
return _this7._partners.filter(function (p) {
|
|
11373
|
+
return !BANNED_PARTNERS.find(function (banned) {
|
|
11374
|
+
return banned === p.path;
|
|
11375
|
+
});
|
|
11376
|
+
}).map(function (p) {
|
|
11377
|
+
var _p$image;
|
|
11378
|
+
return new Partner(p.name, null,
|
|
11379
|
+
// No data in swapspace
|
|
11380
|
+
p != null && (_p$image = p.image) != null && _p$image["default"] ? "https://storage.swapspace.co" + p.image["default"] : null);
|
|
11381
|
+
});
|
|
11382
|
+
});
|
|
11383
|
+
}, function (e) {
|
|
11384
|
+
improveAndRethrow(e, "swapspace.getPartnersList");
|
|
11385
|
+
}));
|
|
11386
|
+
} catch (e) {
|
|
11387
|
+
return Promise.reject(e);
|
|
11388
|
+
}
|
|
11389
|
+
};
|
|
10821
11390
|
return SwapspaceSwapProvider;
|
|
10822
11391
|
}(SwapProvider);
|
|
10823
11392
|
|
|
@@ -11598,6 +12167,13 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
|
|
|
11598
12167
|
throw new Error("Unknown LetsExchange status: " + status);
|
|
11599
12168
|
}
|
|
11600
12169
|
};
|
|
12170
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
12171
|
+
try {
|
|
12172
|
+
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")]);
|
|
12173
|
+
} catch (e) {
|
|
12174
|
+
return Promise.reject(e);
|
|
12175
|
+
}
|
|
12176
|
+
};
|
|
11601
12177
|
return LetsExchangeSwapProvider;
|
|
11602
12178
|
}(SwapProvider);
|
|
11603
12179
|
LetsExchangeSwapProvider.AFFILIATE_ID = "0zbj9hf7xg7jgdgv";
|
|
@@ -12303,6 +12879,39 @@ var PublicSwapService = /*#__PURE__*/function () {
|
|
|
12303
12879
|
improveAndRethrow(e, "getExtraIdNameIfPresentForAsset");
|
|
12304
12880
|
}
|
|
12305
12881
|
};
|
|
12882
|
+
_proto.getPartnersList = function getPartnersList() {
|
|
12883
|
+
try {
|
|
12884
|
+
var _temp17 = function _temp17(_result15) {
|
|
12885
|
+
return _exit4 ? _result15 : [];
|
|
12886
|
+
};
|
|
12887
|
+
var _exit4;
|
|
12888
|
+
var _this13 = this;
|
|
12889
|
+
var _temp16 = _catch(function () {
|
|
12890
|
+
var allPartners = [_this13._swapProvider, _this13._fixedSwapProvider].map(function (provider) {
|
|
12891
|
+
return provider.getPartnersList();
|
|
12892
|
+
});
|
|
12893
|
+
return Promise.resolve(Promise.all(allPartners)).then(function (_Promise$all) {
|
|
12894
|
+
allPartners = _Promise$all;
|
|
12895
|
+
allPartners = allPartners.flat().flat();
|
|
12896
|
+
var _allPartners$reduce = allPartners.reduce(function (prev, cur) {
|
|
12897
|
+
if (!prev.find(function (partner) {
|
|
12898
|
+
return partner.name.toLowerCase() === cur.name.toLowerCase();
|
|
12899
|
+
})) {
|
|
12900
|
+
prev.push(cur);
|
|
12901
|
+
}
|
|
12902
|
+
return prev;
|
|
12903
|
+
}, []);
|
|
12904
|
+
_exit4 = 1;
|
|
12905
|
+
return _allPartners$reduce;
|
|
12906
|
+
});
|
|
12907
|
+
}, function (e) {
|
|
12908
|
+
Logger.logError(e, "getPartnersList");
|
|
12909
|
+
});
|
|
12910
|
+
return Promise.resolve(_temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16));
|
|
12911
|
+
} catch (e) {
|
|
12912
|
+
return Promise.reject(e);
|
|
12913
|
+
}
|
|
12914
|
+
};
|
|
12306
12915
|
return PublicSwapService;
|
|
12307
12916
|
}();
|
|
12308
12917
|
PublicSwapService.PUBLIC_SWAP_CREATED_ANALYTICS_EVENT = "public_swap_created_event";
|
|
@@ -12340,6 +12949,7 @@ exports.Close = Close;
|
|
|
12340
12949
|
exports.Coin = Coin;
|
|
12341
12950
|
exports.CoinPicker = CoinPicker;
|
|
12342
12951
|
exports.CoinPickerDialogStep = CoinPickerDialogStep;
|
|
12952
|
+
exports.ColoredNotice = ColoredNotice;
|
|
12343
12953
|
exports.ConcurrentCalculationsMetadataHolder = ConcurrentCalculationsMetadataHolder;
|
|
12344
12954
|
exports.DEFAULT_CRYPTO_DECIMAL_COUNT = DEFAULT_CRYPTO_DECIMAL_COUNT;
|
|
12345
12955
|
exports.DIALOG_SIZES = DIALOG_SIZES;
|
|
@@ -12366,6 +12976,7 @@ exports.LinesOfText = LinesOfText;
|
|
|
12366
12976
|
exports.LinkButton = LinkButton;
|
|
12367
12977
|
exports.LoadingDots = LoadingDots;
|
|
12368
12978
|
exports.Logger = Logger;
|
|
12979
|
+
exports.LogoCarousel = LogoCarousel;
|
|
12369
12980
|
exports.LogsStorage = LogsStorage;
|
|
12370
12981
|
exports.MixpanelAdapter = MixpanelAdapter;
|
|
12371
12982
|
exports.NoticeIcon = NoticeIcon;
|
|
@@ -12374,6 +12985,7 @@ exports.PublicSwapService = PublicSwapService;
|
|
|
12374
12985
|
exports.QrCode = QrCode;
|
|
12375
12986
|
exports.RadioButtonWithText = RadioButtonWithText;
|
|
12376
12987
|
exports.RobustExternalAPICallerService = RobustExternalAPICallerService;
|
|
12988
|
+
exports.SearchableCoinsList = SearchableCoinsList;
|
|
12377
12989
|
exports.SupportChat = SupportChat;
|
|
12378
12990
|
exports.SwapForm = SwapForm;
|
|
12379
12991
|
exports.SwapProvider = SwapProvider;
|
|
@@ -12385,6 +12997,7 @@ exports.TitleBox = TitleBox;
|
|
|
12385
12997
|
exports.TitledLineWithIconLink = TitledLineWithIconLink;
|
|
12386
12998
|
exports.Tooltip = Tooltip;
|
|
12387
12999
|
exports.Validation = Validation;
|
|
13000
|
+
exports.WaitlistSubscription = WaitlistSubscription;
|
|
12388
13001
|
exports.copyBrowserTextToClipboard = copyBrowserTextToClipboard;
|
|
12389
13002
|
exports.getQueryParameterSingleValue = getQueryParameterSingleValue;
|
|
12390
13003
|
exports.getQueryParameterValues = getQueryParameterValues;
|