@rabbitio/ui-kit 1.0.0-beta.64 → 1.0.0-beta.66
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/clover.xml +6325 -4201
- package/coverage/coverage-final.json +160 -99
- package/coverage/index.html +444 -189
- package/coverage/{rabbit-ui-kit → ui-kit}/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/index.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html → ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html} +8 -29
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html → ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html} +9 -24
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/arrowWhite.jsx.html +7 -25
- package/coverage/ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html +106 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/determinedError.jsx.html +9 -42
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html → ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html} +28 -31
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/index.html +25 -25
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html → ui-kit/src/assets/wrappedImages/infoIcon.jsx.html} +13 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/noticeQuestionIcon.jsx.html +7 -25
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/walletIcon.jsx.html → ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html} +23 -59
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/infoIcon.jsx.html → ui-kit/src/assets/wrappedImages/walletIcon.jsx.html} +16 -16
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/qrUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/amountUtils.js.html +44 -308
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/errorUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/apiGroups.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/index.html +14 -14
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/ipAddressProviders.js.html +31 -178
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/fiatCurrenciesService.js.html +12 -36
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/index.html +20 -20
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/blockchain.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/coin.js.html +10 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/protocol.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/cache.js.html +23 -101
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/emailAPI.js.html +9 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/index.html +19 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/index.html +9 -9
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logger.js.html +14 -35
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/postponeExecution.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/safeStringify.js.html +29 -29
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetIcon/AssetIcon.jsx.html +11 -41
- package/coverage/ui-kit/src/components/atoms/AssetIcon/index.html +116 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/AssetSelection.jsx.html +9 -33
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +8 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/InformationMessage.jsx.html +8 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/Input.jsx.html +15 -63
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/index.html +7 -7
- package/coverage/ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +196 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/RateSelector → ui-kit/src/components/atoms/LoadingDots}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/NoticeIcon/NoticeIcon.jsx.html +10 -40
- package/coverage/{rabbit-ui-kit/src/components/atoms/AssetIcon → ui-kit/src/components/atoms/NoticeIcon}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/QrCode.jsx.html +8 -26
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/RateSelector/RateSelector.jsx.html +10 -34
- package/coverage/ui-kit/src/components/atoms/RateSelector/index.html +116 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/SupportChat.jsx.html +7 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/Textarea.jsx.html +17 -53
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/TitleBox.jsx.html +13 -82
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/Tooltip.jsx.html +12 -18
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +12 -30
- package/coverage/{rabbit-ui-kit/src/components/atoms/NoticeIcon → ui-kit/src/components/atoms/TwoLinesOfText}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/Validation.jsx.html +19 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/Button.jsx.html +23 -113
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/Close.jsx.html +9 -27
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/LinkButton.jsx.html +11 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +13 -67
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useCallHandlingErrors.js.html +7 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useReferredState.js.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/AmountInput.jsx.html +56 -407
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/CoinPicker.jsx.html +67 -466
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +7 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +9 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/Dialog.jsx.html +44 -194
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +63 -525
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/SwapForm.jsx.html +145 -670
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/index.html +20 -20
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/inputValueProviders.js.html +11 -35
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/textUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/uiUtils.js.html +7 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/urlQueryUtils.js.html +18 -93
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/close.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/linkButton.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/tooltip.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/globalConstants.jsx.html +7 -10
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/dialogStep.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/dialog.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +8 -26
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js.html +30 -222
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js.html +24 -147
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cancelProcessing.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js.html +19 -103
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalApiProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalServicesStatsCollector.js.html +11 -23
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/index.html +38 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/robustExternalAPICallerService.js.html +53 -305
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +24 -24
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +10 -28
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +277 -1009
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +9 -27
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/publicSwapService.js.html +53 -374
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +32 -179
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +3 -3
- package/dist/index.cjs +65 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +43 -28
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +65 -49
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +65 -49
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -3
- package/src/assets/wrappedImages/arrowIcon.jsx +1 -7
- package/src/assets/wrappedImages/arrowTosca.jsx +1 -7
- package/src/assets/wrappedImages/arrowWhite.jsx +1 -7
- package/src/assets/wrappedImages/darkRectangle.jsx +2 -13
- package/src/assets/wrappedImages/determinedError.jsx +2 -13
- package/src/assets/wrappedImages/failedValidationIcon.jsx +2 -16
- package/src/assets/wrappedImages/infoIcon.jsx +1 -7
- package/src/assets/wrappedImages/noticeQuestionIcon.jsx +1 -7
- package/src/assets/wrappedImages/successfulValidationIcon.jsx +2 -16
- package/src/assets/wrappedImages/walletIcon.jsx +3 -19
- package/src/common/amountUtils.js +36 -124
- package/src/common/external-apis/ipAddressProviders.js +22 -71
- package/src/common/fiatCurrenciesService.js +4 -12
- package/src/common/models/coin.js +2 -6
- package/src/common/tests/amountUtils/composeRateText.test.js +12 -69
- package/src/common/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +1 -3
- package/src/common/utils/cache.js +10 -36
- package/src/common/utils/emailAPI.js +1 -3
- package/src/common/utils/logging/logger.js +5 -12
- package/src/components/atoms/AssetIcon/AssetIcon.jsx +4 -14
- package/src/components/atoms/AssetSelection/AssetSelection.jsx +3 -11
- package/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx +2 -12
- package/src/components/atoms/InformationMessage/InformationMessage.jsx +2 -12
- package/src/components/atoms/InformationMessage/information-message.module.scss +4 -2
- package/src/components/atoms/Input/Input.jsx +9 -25
- package/src/components/atoms/LoadingDots/LoadingDots.jsx +8 -28
- package/src/components/atoms/NoticeIcon/NoticeIcon.jsx +4 -14
- package/src/components/atoms/QrCode/QrCode.jsx +2 -8
- package/src/components/atoms/RateSelector/RateSelector.jsx +4 -12
- package/src/components/atoms/SupportChat/SupportChat.jsx +1 -6
- package/src/components/atoms/Textarea/Textarea.jsx +11 -23
- package/src/components/atoms/TitleBox/TitleBox.jsx +7 -30
- package/src/components/atoms/TitleBox/title-box.module.scss +2 -0
- package/src/components/atoms/Tooltip/Tooltip.jsx +6 -8
- package/src/components/atoms/TwoLinesOfText/LinesOfText.jsx +5 -11
- package/src/components/atoms/Validation/Validation.jsx +9 -7
- package/src/components/atoms/buttons/Button/Button.jsx +17 -47
- package/src/components/atoms/buttons/Close/Close.jsx +3 -9
- package/src/components/atoms/buttons/LinkButton/LinkButton.jsx +5 -14
- package/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx +7 -25
- package/src/components/hooks/useCallHandlingErrors.js +1 -5
- package/src/components/hooks/useReferredState.js +1 -1
- package/src/components/molecules/AmountInput/AmountInput.jsx +50 -167
- package/src/components/molecules/CoinPicker/CoinPicker.jsx +61 -194
- package/src/components/molecules/CoinPicker/coin-picker.module.scss +1 -4
- package/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx +1 -6
- package/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx +3 -5
- package/src/components/organisms/Dialog/Dialog.jsx +38 -88
- package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +57 -211
- package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +2 -4
- package/src/components/organisms/SwapForm/SwapForm.jsx +139 -314
- package/src/components/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +5 -12
- package/src/components/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +3 -9
- package/src/components/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +11 -51
- package/src/components/utils/inputValueProviders.js +3 -11
- package/src/components/utils/uiUtils.js +1 -3
- package/src/components/utils/urlQueryUtils.js +10 -35
- package/src/constants/globalConstants.jsx +1 -2
- package/src/index.js +2 -8
- package/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js +22 -86
- package/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js +15 -56
- package/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js +11 -39
- package/src/robustExteranlApiCallerService/externalServicesStatsCollector.js +3 -7
- package/src/robustExteranlApiCallerService/robustExternalAPICallerService.js +45 -129
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +76 -330
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +57 -270
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +3 -15
- package/src/swaps-lib/external-apis/swapProvider.js +1 -7
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +117 -361
- package/src/swaps-lib/models/existingSwapWithFiatData.js +1 -7
- package/src/swaps-lib/services/publicSwapService.js +47 -154
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +33 -118
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +23 -85
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getAllSupportedCurrencies.test.js +4 -14
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getDepositCurrencies.test.js +3 -9
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +148 -460
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getWithdrawalCurrencies.test.js +5 -11
- package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +2 -10
- package/src/swaps-lib/utils/swapUtils.js +24 -73
- package/coverage/rabbit-ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html +0 -244
- package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +0 -256
- package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/TwoLinesOfText/index.html +0 -116
package/dist/index.modern.js
CHANGED
|
@@ -1951,13 +1951,13 @@ const Validation = ({
|
|
|
1951
1951
|
}) => {
|
|
1952
1952
|
return /*#__PURE__*/React.createElement("div", {
|
|
1953
1953
|
className: s$h["validation"]
|
|
1954
|
-
}, isSuccessAlert ?
|
|
1954
|
+
}, /*#__PURE__*/React.createElement("div", null, isSuccessAlert ?
|
|
1955
1955
|
/*#__PURE__*/
|
|
1956
1956
|
// <img src={successfulValidationIcon} alt="validation icon" />
|
|
1957
1957
|
React.createElement(SuccessfulValidationIcon, null) :
|
|
1958
1958
|
/*#__PURE__*/
|
|
1959
1959
|
// <img src={failedValidationIcon} alt="validation icon" />
|
|
1960
|
-
React.createElement(FailedValidationIcon, null), /*#__PURE__*/React.createElement("span", {
|
|
1960
|
+
React.createElement(FailedValidationIcon, null)), /*#__PURE__*/React.createElement("span", {
|
|
1961
1961
|
className: s$h["validation-text"]
|
|
1962
1962
|
}, _text));
|
|
1963
1963
|
};
|
|
@@ -2588,10 +2588,10 @@ const DialogStep = ({
|
|
|
2588
2588
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2589
2589
|
}, []);
|
|
2590
2590
|
const handleTransitionEnd = event => {
|
|
2591
|
-
if (isMultiStep && isCurrentStep(_stepName) && event.propertyName === "opacity" && event.target.classList[0] === DIALOG_STEP_CLASS) {
|
|
2591
|
+
if (isMultiStep && isCurrentStep(_stepName) && event.propertyName === "opacity" && event.target.classList[0] === s$f[DIALOG_STEP_CLASS]) {
|
|
2592
2592
|
disableAnimation(animationConfiguration.animateHeightTransitionEnabled);
|
|
2593
2593
|
}
|
|
2594
|
-
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === DIALOG_STEP_CLASS) {
|
|
2594
|
+
if (isMultiStep && unmountOnAnimationEndTrigger && event.propertyName === "opacity" && event.target.classList[0] === s$f[DIALOG_STEP_CLASS]) {
|
|
2595
2595
|
clearButtonsConfiguration();
|
|
2596
2596
|
scrollDialogToTop();
|
|
2597
2597
|
setStepMounted(false);
|
|
@@ -3646,6 +3646,7 @@ const AmountInput = /*#__PURE__*/React.forwardRef(({
|
|
|
3646
3646
|
handleChangeAssetClick: _handleChangeAssetClick = () => {},
|
|
3647
3647
|
handleBalanceValidationChange: _handleBalanceValidationChange = isValid => {},
|
|
3648
3648
|
disabled,
|
|
3649
|
+
locked,
|
|
3649
3650
|
alertText,
|
|
3650
3651
|
predefinedValue,
|
|
3651
3652
|
children,
|
|
@@ -3736,7 +3737,7 @@ const AmountInput = /*#__PURE__*/React.forwardRef(({
|
|
|
3736
3737
|
};
|
|
3737
3738
|
const placeholderByDecimalCount = decimalCount => "0" + (decimalCount > 0 ? "." + "0".repeat(decimalCount) : "");
|
|
3738
3739
|
const handleFiatInteraction = () => {
|
|
3739
|
-
if (disabled) return;
|
|
3740
|
+
if (disabled || locked) return;
|
|
3740
3741
|
setFiatAmountAutoFocus(true);
|
|
3741
3742
|
setInteractedWith(true);
|
|
3742
3743
|
};
|
|
@@ -3766,7 +3767,7 @@ const AmountInput = /*#__PURE__*/React.forwardRef(({
|
|
|
3766
3767
|
}, [coinAmountValue, _assetBalance]);
|
|
3767
3768
|
|
|
3768
3769
|
// Clearing the custom focus upon disabling or enabling the form
|
|
3769
|
-
useEffect(() => setIsInFocus(false), [disabled]);
|
|
3770
|
+
useEffect(() => setIsInFocus(false), [disabled, locked]);
|
|
3770
3771
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TitleBox, {
|
|
3771
3772
|
title: _label,
|
|
3772
3773
|
linkText: _isSendAll !== null ? _isSendAll ? _linkButtonActiveText : _linkButtonInactiveText : null,
|
|
@@ -3789,7 +3790,7 @@ const AmountInput = /*#__PURE__*/React.forwardRef(({
|
|
|
3789
3790
|
onChange: e => handleChangeAmount(e.target.value),
|
|
3790
3791
|
placeholder: coinAmountPlaceholder,
|
|
3791
3792
|
className: s$a["requested-amount-coin-input"],
|
|
3792
|
-
disabled: disabled,
|
|
3793
|
+
disabled: disabled || locked,
|
|
3793
3794
|
onFocus: e => callHandlingErrors(() => setIsInFocus(true), e),
|
|
3794
3795
|
onBlur: e => callHandlingErrors(() => setIsInFocus(false), e)
|
|
3795
3796
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -3805,7 +3806,7 @@ const AmountInput = /*#__PURE__*/React.forwardRef(({
|
|
|
3805
3806
|
inputMode: "decimal",
|
|
3806
3807
|
className: s$a["requested-amount-fiat-input"],
|
|
3807
3808
|
value: fiatAmountValue,
|
|
3808
|
-
disabled: disabled,
|
|
3809
|
+
disabled: disabled || locked,
|
|
3809
3810
|
onChange: e => handleChangeAmountFiat(e.target.value),
|
|
3810
3811
|
placeholder: placeholderByDecimalCount(_fiatCurrencyDecimals),
|
|
3811
3812
|
autoFocus: fiatAmountAutoFocus,
|
|
@@ -4028,6 +4029,21 @@ const RateSelector = ({
|
|
|
4028
4029
|
* @return {void}
|
|
4029
4030
|
*/
|
|
4030
4031
|
|
|
4032
|
+
/**
|
|
4033
|
+
* Handler for the confirm button click. You should implement errors handling inside it.
|
|
4034
|
+
*
|
|
4035
|
+
* @function
|
|
4036
|
+
* @name handleConfirmButtonClick
|
|
4037
|
+
* @param {function} resetButtonLoader - callback resetting the confirm button loader
|
|
4038
|
+
* @param {function} setValidationContent - Function to set the validation error message on the form.
|
|
4039
|
+
* @param {function} setBalanceValid - Function to set the balance validity, accepts a boolean.
|
|
4040
|
+
* @param {function} setMinimalAmountValid - Function to set the minimal amount validity, accepts a boolean.
|
|
4041
|
+
* @param {function} setMaximumAmountValid - Function to set the maximum amount validity, accepts a boolean.
|
|
4042
|
+
* @param {function} setIsPairSupported - Function to set the pair support status, accepts a boolean.
|
|
4043
|
+
* @param {function} setIsSameCoins - Function to set the status if the same coins are used, accepts a boolean.
|
|
4044
|
+
* @return {void}
|
|
4045
|
+
*/
|
|
4046
|
+
|
|
4031
4047
|
/**
|
|
4032
4048
|
* Async function that retrieves swap creation info by given params.
|
|
4033
4049
|
*
|
|
@@ -4095,7 +4111,7 @@ const RateSelector = ({
|
|
|
4095
4111
|
* @param {string} [props.receivingAssetBalance] - Balance of the receiving asset.
|
|
4096
4112
|
* @param {handleClick} props.handleChangeSendingAssetClick - Function to handle clicking on the change sending asset button.
|
|
4097
4113
|
* @param {handleClick} props.handleChangeReceivingAssetClick - Function to handle clicking on the change receiving asset button.
|
|
4098
|
-
* @param {
|
|
4114
|
+
* @param {handleConfirmButtonClick} props.handleConfirmButtonClick - Function to handle clicking on the confirm button.
|
|
4099
4115
|
* @param {composeConfirmButtonTo} props.composeConfirmButtonTo - Function to compose the URL for the confirm button.
|
|
4100
4116
|
* @param {setSwapCreationEstimation} props.setSwapCreationEstimation - Function to set the swap creation estimation.
|
|
4101
4117
|
* @param {handleUnexpectedError} props.handleUnexpectedError - Function to handle unexpected errors.
|
|
@@ -4140,7 +4156,7 @@ const SwapForm = ({
|
|
|
4140
4156
|
receivingAssetBalance,
|
|
4141
4157
|
handleChangeSendingAssetClick,
|
|
4142
4158
|
handleChangeReceivingAssetClick,
|
|
4143
|
-
handleConfirmButtonClick: _handleConfirmButtonClick = () => {},
|
|
4159
|
+
handleConfirmButtonClick: _handleConfirmButtonClick = (resetButtonLoader, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins) => {},
|
|
4144
4160
|
composeConfirmButtonTo: _composeConfirmButtonTo = (fromTicker, toTicker, fromAmount) => "",
|
|
4145
4161
|
setSwapCreationEstimation: _setSwapCreationEstimation = details => {},
|
|
4146
4162
|
handleUnexpectedError: _handleUnexpectedError = error => {},
|
|
@@ -4187,7 +4203,6 @@ const SwapForm = ({
|
|
|
4187
4203
|
},
|
|
4188
4204
|
addressFields: {
|
|
4189
4205
|
addressTitle: "Recepient address",
|
|
4190
|
-
addressPlaceholder: "Example: 1XPTgDRh...",
|
|
4191
4206
|
extraIdTitle: "Extra ID (optional)",
|
|
4192
4207
|
extraIdPlaceholder: "Example: ABC123",
|
|
4193
4208
|
extraIdNotice: "Please check if your recipient address requires a 'Memo' or 'Destination Tag' - sometimes called a tag, ID, label, or a note. Exchanges may require such ID for the deposit. Including this identifier is crucial when required, as omitting or misentering it can result in lost assets."
|
|
@@ -4207,11 +4222,11 @@ const SwapForm = ({
|
|
|
4207
4222
|
setRecepientAddress,
|
|
4208
4223
|
setRecepientAddressExtraId,
|
|
4209
4224
|
recepientAddressExtraIdAvailable: _recepientAddressExtraIdAvailable = false,
|
|
4210
|
-
displayRateSelector: _displayRateSelector = false
|
|
4211
|
-
dispatchRateModeChanged: _dispatchRateModeChanged = isFixed => {}
|
|
4225
|
+
displayRateSelector: _displayRateSelector = false
|
|
4212
4226
|
}) => {
|
|
4213
|
-
var _maximumAmount$curren4, _maximumAmount$curren5, _maximumAmount$curren6, _minimalAmount$curren5;
|
|
4227
|
+
var _isFixedRate$current2, _maximumAmount$curren4, _maximumAmount$curren5, _maximumAmount$curren6, _minimalAmount$curren5, _isFixedRate$current3;
|
|
4214
4228
|
const DETAIL_REFRESH_INTERVAL_MS = 1.5 * 60000;
|
|
4229
|
+
const IS_FIXED_BY_DEFAULT = false;
|
|
4215
4230
|
|
|
4216
4231
|
// Updating the states below will insert the new value into the send or receive input field
|
|
4217
4232
|
const [updateSendInputTo, setUpdateSendInputTo] = useState(_preservedAmount != null ? _preservedAmount : null);
|
|
@@ -4232,7 +4247,7 @@ const SwapForm = ({
|
|
|
4232
4247
|
const [isAmountZero, setIsAmountZero] = useState(_preservedAmount == null || String(_preservedAmount) === "0");
|
|
4233
4248
|
const [isLoading, setIsLoading] = useReferredState(false); // Whether the form is in the progress of loading some data (new rates, for example)
|
|
4234
4249
|
const [isAddressFieldEnabled, setIsAddressFieldEnabled] = useState(false);
|
|
4235
|
-
const [isFixedRate, setIsFixedRate] =
|
|
4250
|
+
const [isFixedRate, setIsFixedRate] = useReferredState(null);
|
|
4236
4251
|
const [confirmButtonTo, setConfirmButtonTo] = useState(_composeConfirmButtonTo(sendingAssetTicker, receivingAssetTicker, _preservedAmount));
|
|
4237
4252
|
const [transactionFee, setTransactionFee] = useState();
|
|
4238
4253
|
const [balanceValid, setBalanceValid] = useState(true); // Whether the amount is less than total balance
|
|
@@ -4338,7 +4353,7 @@ const SwapForm = ({
|
|
|
4338
4353
|
const loadFullEstimation = (amount, isForPreserved = false) => {
|
|
4339
4354
|
(async () => {
|
|
4340
4355
|
try {
|
|
4341
|
-
var _minimalAmount$curren4, _maximumAmount$curren3;
|
|
4356
|
+
var _minimalAmount$curren4, _maximumAmount$curren3, _isFixedRate$current;
|
|
4342
4357
|
const dataMemento = {
|
|
4343
4358
|
rate: swapRate,
|
|
4344
4359
|
min: (_minimalAmount$curren4 = minimalAmount.current) == null ? void 0 : _minimalAmount$curren4.crypto,
|
|
@@ -4355,7 +4370,7 @@ const SwapForm = ({
|
|
|
4355
4370
|
setIsSameCoins(false);
|
|
4356
4371
|
setIsPairSupported(true);
|
|
4357
4372
|
setIsSwapCalculated(false);
|
|
4358
|
-
const response = await _retrieveSwapDetails(sendingAssetTicker, receivingAssetTicker, amount, isSwapAll.current, isFixedRate);
|
|
4373
|
+
const response = await _retrieveSwapDetails(sendingAssetTicker, receivingAssetTicker, amount, isSwapAll.current, (_isFixedRate$current = isFixedRate.current) != null ? _isFixedRate$current : IS_FIXED_BY_DEFAULT);
|
|
4359
4374
|
if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null ? _preservedAmount : sendAssetAmount.current)) {
|
|
4360
4375
|
// Means amount changed and we no more need to do this exact calculation
|
|
4361
4376
|
return;
|
|
@@ -4429,7 +4444,6 @@ const SwapForm = ({
|
|
|
4429
4444
|
};
|
|
4430
4445
|
const handleRateModeChanged = isFixed => {
|
|
4431
4446
|
setIsFixedRate(isFixed);
|
|
4432
|
-
_dispatchRateModeChanged(isFixed);
|
|
4433
4447
|
requestDataRefresh(sendAssetAmount.current, true);
|
|
4434
4448
|
};
|
|
4435
4449
|
useEffect(() => {
|
|
@@ -4587,6 +4601,7 @@ const SwapForm = ({
|
|
|
4587
4601
|
assetIconProtocolSrc: _receivingAssetProtocolIconSrc,
|
|
4588
4602
|
fallbackAssetIconSrc: _fallBackAssetIconSrc,
|
|
4589
4603
|
disabled: isSwapAll.current || sendingAssetTicker === null || receivingAssetTicker === null,
|
|
4604
|
+
locked: !_formHasBalance,
|
|
4590
4605
|
handleCoinAmountChange: handleReceiveAssetAmountChange,
|
|
4591
4606
|
handleChangeAssetClick: handleChangeReceivingAssetClick,
|
|
4592
4607
|
updateAssetInputTo: updateReceiveInputTo,
|
|
@@ -4594,7 +4609,7 @@ const SwapForm = ({
|
|
|
4594
4609
|
changeAssetButtonProtocol: receivingAssetProtocol,
|
|
4595
4610
|
showBalance: _formHasBalance,
|
|
4596
4611
|
lowerFormPosition: true,
|
|
4597
|
-
estimateAmount:
|
|
4612
|
+
estimateAmount: !isFixedRate,
|
|
4598
4613
|
ref: _toAssetSelectionButtonRef,
|
|
4599
4614
|
isLoading: isLoading.current,
|
|
4600
4615
|
cryptoAssetToFiatRate: _receivingAssetToFiatRate,
|
|
@@ -4606,7 +4621,7 @@ const SwapForm = ({
|
|
|
4606
4621
|
className: s$9["swap-form-information-field"]
|
|
4607
4622
|
}, /*#__PURE__*/React.createElement("p", null, !isPairSupported ? _translations.informationBlock.pairNotAvailable : transactionFee && minimalAmountValid ? /*#__PURE__*/React.createElement(React.Fragment, null, _translations.informationBlock.transactionFee, /*#__PURE__*/React.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.createElement("span", {
|
|
4608
4623
|
className: s$9["semi-transparent"]
|
|
4609
|
-
}, " ~ " + AmountUtils.fiat(transactionFee == null ? void 0 : transactionFee.fiat, _fiatCurrencyCode)) : "") : isSwapCalculated ? /*#__PURE__*/React.createElement(React.Fragment, null, _translations.informationBlock.swapRate, /*#__PURE__*/React.createElement("span", null, AmountUtils.composeRateText(sendingAssetTickerPrintable, receivingAssetTickerPrintable, swapRate, _receivingAssetDecimalCount, isFixedRate))) : minimalAmount.current ? !maximumAmountValid && maximumAmount.current != null ? /*#__PURE__*/React.createElement(React.Fragment, null, _translations.informationBlock.maximumAmount, /*#__PURE__*/React.createElement("span", {
|
|
4624
|
+
}, " ~ " + AmountUtils.fiat(transactionFee == null ? void 0 : transactionFee.fiat, _fiatCurrencyCode)) : "") : isSwapCalculated || !minimalAmount.current && swapRate ? /*#__PURE__*/React.createElement(React.Fragment, null, _translations.informationBlock.swapRate, /*#__PURE__*/React.createElement("span", null, AmountUtils.composeRateText(sendingAssetTickerPrintable, receivingAssetTickerPrintable, swapRate, _receivingAssetDecimalCount, (_isFixedRate$current2 = isFixedRate.current) != null ? _isFixedRate$current2 : IS_FIXED_BY_DEFAULT))) : minimalAmount.current || maximumAmount.current ? !maximumAmountValid && maximumAmount.current != null ? /*#__PURE__*/React.createElement(React.Fragment, null, _translations.informationBlock.maximumAmount, /*#__PURE__*/React.createElement("span", {
|
|
4610
4625
|
className: s$9["interactable"] + " " + s$9["red"],
|
|
4611
4626
|
onClick: isLoading.current ? () => {} : e => callHandlingErrors(handleMaximumAmountClick, e)
|
|
4612
4627
|
}, AmountUtils.crypto((_maximumAmount$curren4 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren4.crypto, sendingAssetTickerPrintable)), ((_maximumAmount$curren5 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren5.fiat) != null && ((_maximumAmount$curren6 = maximumAmount.current) == null ? void 0 : _maximumAmount$curren6.fiat) !== "" ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -4625,8 +4640,7 @@ const SwapForm = ({
|
|
|
4625
4640
|
onChange: e => setRecepientAddress(e.target.value),
|
|
4626
4641
|
value: recepientAddress,
|
|
4627
4642
|
adaptiveHeight: true,
|
|
4628
|
-
errorEncountered: !_recepientAddressValid && recepientAddress !== ""
|
|
4629
|
-
placeholder: _translations.addressFields.addressPlaceholder
|
|
4643
|
+
errorEncountered: !_recepientAddressValid && recepientAddress !== ""
|
|
4630
4644
|
})), _recepientAddressExtraIdAvailable ? /*#__PURE__*/React.createElement(TitleBox, {
|
|
4631
4645
|
title: _translations.addressFields.extraIdTitle,
|
|
4632
4646
|
titleNoticeText: _translations.addressFields.extraIdNotice,
|
|
@@ -4641,8 +4655,8 @@ const SwapForm = ({
|
|
|
4641
4655
|
})) : "") : "", _displayRateSelector ? /*#__PURE__*/React.createElement("div", {
|
|
4642
4656
|
className: s$9["swap-form-rate-selector"]
|
|
4643
4657
|
}, /*#__PURE__*/React.createElement(RateSelector, {
|
|
4644
|
-
isFixed: isFixedRate,
|
|
4645
|
-
setIsFixed: handleRateModeChanged,
|
|
4658
|
+
isFixed: (_isFixedRate$current3 = isFixedRate.current) != null ? _isFixedRate$current3 : IS_FIXED_BY_DEFAULT,
|
|
4659
|
+
setIsFixed: !isLoading.current ? handleRateModeChanged : () => {},
|
|
4646
4660
|
translations: _translations.rateSelector
|
|
4647
4661
|
})) : "", validationContent ? /*#__PURE__*/React.createElement("div", {
|
|
4648
4662
|
className: s$9["swap-form-validation-text"]
|
|
@@ -4664,11 +4678,11 @@ const SwapForm = ({
|
|
|
4664
4678
|
size: "lg",
|
|
4665
4679
|
mode: "primary",
|
|
4666
4680
|
content: _translations.confirmButtonText,
|
|
4667
|
-
onClick: _handleConfirmButtonClick,
|
|
4681
|
+
onClick: resetButtonLoader => _handleConfirmButtonClick(resetButtonLoader, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins),
|
|
4668
4682
|
fullWidthOnMobiles: true,
|
|
4669
4683
|
isDisabled: !readyToSwap,
|
|
4670
4684
|
to: _formHasBalance ? "" : confirmButtonTo,
|
|
4671
|
-
loader:
|
|
4685
|
+
loader: true,
|
|
4672
4686
|
handleError: callHandlingErrors
|
|
4673
4687
|
}))));
|
|
4674
4688
|
};
|
|
@@ -4719,7 +4733,7 @@ SwapForm.defaultProps = {
|
|
|
4719
4733
|
sendingAssetProtocolIconSrc: null,
|
|
4720
4734
|
receivingAssetProtocolIconSrc: null,
|
|
4721
4735
|
fallBackAssetIconSrc: null,
|
|
4722
|
-
handleConfirmButtonClick: () => {},
|
|
4736
|
+
handleConfirmButtonClick: (resetButtonLoader, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins) => {},
|
|
4723
4737
|
composeConfirmButtonTo: (fromTicker, toTicker, fromAmount) => "",
|
|
4724
4738
|
setSwapCreationEstimation: details => {},
|
|
4725
4739
|
handleUnexpectedError: error => {},
|
|
@@ -8120,7 +8134,8 @@ class SwapspaceSwapProvider extends SwapProvider {
|
|
|
8120
8134
|
const response = await axios.get(`${this._URL}/api/v2/amounts?fromCurrency=${fromCoinSwapspaceDetails.code}&fromNetwork=${fromCoinSwapspaceDetails.network}&toNetwork=${toCoinSwapspaceDetails.network}&toCurrency=${toCoinSwapspaceDetails.code}&amount=${amountCoins}&estimated=false`);
|
|
8121
8135
|
Logger.log(`Retrieved ${response == null || (_response$data = response.data) == null ? void 0 : _response$data.length} options`, loggerSource);
|
|
8122
8136
|
const options = Array.isArray(response.data) ? response.data : [];
|
|
8123
|
-
|
|
8137
|
+
// TODO: [feature, high] remove if possible over-engineering about toAmount = 0 options treating as supported but not available. task_id=404ae30d9a7743238af3cc0d3bae9239
|
|
8138
|
+
let exchangesSupportingThePairDespiteFixedOrFloating = options.filter(exchange => (exchange == null ? void 0 : exchange.exists) && !BANNED_PARTNERS.find(bannedPartner => bannedPartner === (exchange == null ? void 0 : exchange.partner)) && ((exchange == null ? void 0 : exchange.fixed) === false || (exchange == null ? void 0 : exchange.fixed) === true) && typeof exchange.min === "number" && typeof exchange.max === "number" && typeof exchange.toAmount === "number" && exchange.toAmount > 0 && (exchange.min === 0 || exchange.max === 0 || exchange.max > exchange.min));
|
|
8124
8139
|
let exchangesSupportingThePair = exchangesSupportingThePairDespiteFixedOrFloating;
|
|
8125
8140
|
if (fixed != null) {
|
|
8126
8141
|
exchangesSupportingThePair = exchangesSupportingThePairDespiteFixedOrFloating.filter(option => option.fixed === fixed);
|