@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
|
@@ -17,11 +17,12 @@ export const AmountInput = React.forwardRef(
|
|
|
17
17
|
(
|
|
18
18
|
{
|
|
19
19
|
label = "",
|
|
20
|
-
handleCoinAmountChange =
|
|
21
|
-
handleFiatAmountChange =
|
|
20
|
+
handleCoinAmountChange = btcAmount => {},
|
|
21
|
+
handleFiatAmountChange = fiatAmount => {},
|
|
22
22
|
handleChangeAssetClick = () => {},
|
|
23
|
-
handleBalanceValidationChange =
|
|
23
|
+
handleBalanceValidationChange = isValid => {},
|
|
24
24
|
disabled,
|
|
25
|
+
locked,
|
|
25
26
|
alertText,
|
|
26
27
|
predefinedValue,
|
|
27
28
|
children,
|
|
@@ -72,26 +73,21 @@ export const AmountInput = React.forwardRef(
|
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
useEffect(() => {
|
|
75
|
-
if (updateAssetInputTo !== null)
|
|
76
|
-
handleChangeAmount(updateAssetInputTo?.toString(), false);
|
|
76
|
+
if (updateAssetInputTo !== null) handleChangeAmount(updateAssetInputTo?.toString(), false);
|
|
77
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
78
|
}, [updateAssetInputTo]);
|
|
79
79
|
|
|
80
80
|
const handleChangeAmount = (newAmountString, handlerEnabled = true) => {
|
|
81
81
|
(async () => {
|
|
82
82
|
try {
|
|
83
|
-
const correctedAmount =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
);
|
|
83
|
+
const correctedAmount = InputValuesProviders.provideFormatOfFloatValueByInputString(
|
|
84
|
+
newAmountString,
|
|
85
|
+
assetDecimalPlaces
|
|
86
|
+
);
|
|
88
87
|
setCoinAmountValue(correctedAmount);
|
|
89
88
|
if (handlerEnabled) handleCoinAmountChange(correctedAmount);
|
|
90
89
|
|
|
91
|
-
if (
|
|
92
|
-
correctedAmount !== "" &&
|
|
93
|
-
cryptoAssetToFiatRate != null
|
|
94
|
-
) {
|
|
90
|
+
if (correctedAmount !== "" && cryptoAssetToFiatRate != null) {
|
|
95
91
|
const fiatAmount = BigNumber(correctedAmount)
|
|
96
92
|
.times(cryptoAssetToFiatRate)
|
|
97
93
|
.toFixed(fiatCurrencyDecimals);
|
|
@@ -108,27 +104,22 @@ export const AmountInput = React.forwardRef(
|
|
|
108
104
|
setInteractedWith(true);
|
|
109
105
|
};
|
|
110
106
|
|
|
111
|
-
const handleChangeAmountFiat =
|
|
107
|
+
const handleChangeAmountFiat = newAmountString => {
|
|
112
108
|
if (cryptoAssetToFiatRate == null) return;
|
|
113
109
|
(async () => {
|
|
114
110
|
try {
|
|
115
|
-
const correctedFiatAmount =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
);
|
|
111
|
+
const correctedFiatAmount = InputValuesProviders.provideFormatOfFloatValueByInputString(
|
|
112
|
+
newAmountString,
|
|
113
|
+
fiatCurrencyDecimals
|
|
114
|
+
);
|
|
120
115
|
setFiatAmountValue(correctedFiatAmount);
|
|
121
116
|
handleFiatAmountChange(correctedFiatAmount);
|
|
122
117
|
|
|
123
118
|
const coinAmount =
|
|
124
119
|
correctedFiatAmount !== ""
|
|
125
|
-
? BigNumber(correctedFiatAmount)
|
|
126
|
-
.div(cryptoAssetToFiatRate)
|
|
127
|
-
.toFixed(assetDecimalPlaces)
|
|
120
|
+
? BigNumber(correctedFiatAmount).div(cryptoAssetToFiatRate).toFixed(assetDecimalPlaces)
|
|
128
121
|
: "0";
|
|
129
|
-
const coinsAmount = BigNumber(coinAmount).isZero()
|
|
130
|
-
? ""
|
|
131
|
-
: coinAmount;
|
|
122
|
+
const coinsAmount = BigNumber(coinAmount).isZero() ? "" : coinAmount;
|
|
132
123
|
setCoinAmountValue(coinsAmount);
|
|
133
124
|
handleCoinAmountChange(coinsAmount);
|
|
134
125
|
} catch (e) {
|
|
@@ -138,11 +129,11 @@ export const AmountInput = React.forwardRef(
|
|
|
138
129
|
})();
|
|
139
130
|
};
|
|
140
131
|
|
|
141
|
-
const placeholderByDecimalCount =
|
|
132
|
+
const placeholderByDecimalCount = decimalCount =>
|
|
142
133
|
"0" + (decimalCount > 0 ? "." + "0".repeat(decimalCount) : "");
|
|
143
134
|
|
|
144
135
|
const handleFiatInteraction = () => {
|
|
145
|
-
if (disabled) return;
|
|
136
|
+
if (disabled || locked) return;
|
|
146
137
|
setFiatAmountAutoFocus(true);
|
|
147
138
|
setInteractedWith(true);
|
|
148
139
|
};
|
|
@@ -154,9 +145,7 @@ export const AmountInput = React.forwardRef(
|
|
|
154
145
|
|
|
155
146
|
useEffect(() => {
|
|
156
147
|
try {
|
|
157
|
-
setCoinAmountPlaceholder(
|
|
158
|
-
placeholderByDecimalCount(assetDecimalPlaces)
|
|
159
|
-
);
|
|
148
|
+
setCoinAmountPlaceholder(placeholderByDecimalCount(assetDecimalPlaces));
|
|
160
149
|
} catch (e) {
|
|
161
150
|
logErrorOrOutputToConsole(e);
|
|
162
151
|
}
|
|
@@ -166,12 +155,9 @@ export const AmountInput = React.forwardRef(
|
|
|
166
155
|
|
|
167
156
|
// Check if input & balance highlights are needed after a change in either the asset amount or the balance
|
|
168
157
|
useEffect(() => {
|
|
169
|
-
if (!showBalanceValidation || assetBalance?.assetAmount == null)
|
|
170
|
-
return;
|
|
158
|
+
if (!showBalanceValidation || assetBalance?.assetAmount == null) return;
|
|
171
159
|
|
|
172
|
-
let enableHighlight = BigNumber(coinAmountValue).gt(
|
|
173
|
-
assetBalance?.assetAmount
|
|
174
|
-
);
|
|
160
|
+
let enableHighlight = BigNumber(coinAmountValue).gt(assetBalance?.assetAmount);
|
|
175
161
|
|
|
176
162
|
handleBalanceValidationChange(enableHighlight);
|
|
177
163
|
setHighlightBalance(enableHighlight);
|
|
@@ -181,46 +167,30 @@ export const AmountInput = React.forwardRef(
|
|
|
181
167
|
}, [coinAmountValue, assetBalance]);
|
|
182
168
|
|
|
183
169
|
// Clearing the custom focus upon disabling or enabling the form
|
|
184
|
-
useEffect(() => setIsInFocus(false), [disabled]);
|
|
170
|
+
useEffect(() => setIsInFocus(false), [disabled, locked]);
|
|
185
171
|
|
|
186
172
|
return (
|
|
187
173
|
<>
|
|
188
174
|
<TitleBox
|
|
189
175
|
title={label}
|
|
190
|
-
linkText={
|
|
191
|
-
isSendAll !== null
|
|
192
|
-
? isSendAll
|
|
193
|
-
? linkButtonActiveText
|
|
194
|
-
: linkButtonInactiveText
|
|
195
|
-
: null
|
|
196
|
-
}
|
|
176
|
+
linkText={isSendAll !== null ? (isSendAll ? linkButtonActiveText : linkButtonInactiveText) : null}
|
|
197
177
|
linkButtonClick={handleSendAllClick}
|
|
198
178
|
>
|
|
199
179
|
<div
|
|
200
180
|
className={[
|
|
201
181
|
s["amount-input-container"],
|
|
202
182
|
isInFocus ? s["focus"] : "",
|
|
203
|
-
errorEncountered || highlightInput
|
|
204
|
-
? s["error-encountered"]
|
|
205
|
-
: "",
|
|
183
|
+
errorEncountered || highlightInput ? s["error-encountered"] : "",
|
|
206
184
|
upperFormPosition ? s["upper-form-position"] : "",
|
|
207
185
|
lowerFormPosition ? s["lower-form-position"] : "",
|
|
208
186
|
].join(" ")}
|
|
209
187
|
>
|
|
210
188
|
<div
|
|
211
|
-
className={`${
|
|
212
|
-
s["amount-input-container-input-wrapper"]
|
|
213
|
-
} ${disabled ? s["disabled"] : ""}
|
|
189
|
+
className={`${s["amount-input-container-input-wrapper"]} ${disabled ? s["disabled"] : ""}
|
|
214
190
|
${children ? s["bottom-margin"] : ""}`}
|
|
215
191
|
>
|
|
216
192
|
{showBalance ? (
|
|
217
|
-
<div
|
|
218
|
-
className={
|
|
219
|
-
s["asset-balance"] +
|
|
220
|
-
" " +
|
|
221
|
-
(highlightBalance ? s["red"] : "")
|
|
222
|
-
}
|
|
223
|
-
>
|
|
193
|
+
<div className={s["asset-balance"] + " " + (highlightBalance ? s["red"] : "")}>
|
|
224
194
|
<WalletIcon />
|
|
225
195
|
<p>
|
|
226
196
|
{assetBalance?.assetAmount != null &&
|
|
@@ -235,10 +205,7 @@ export const AmountInput = React.forwardRef(
|
|
|
235
205
|
)}
|
|
236
206
|
<span>
|
|
237
207
|
{" ~ " +
|
|
238
|
-
AmountUtils.fiat(
|
|
239
|
-
assetBalance.fiatAmount,
|
|
240
|
-
fiatCurrencyCode
|
|
241
|
-
)}
|
|
208
|
+
AmountUtils.fiat(assetBalance.fiatAmount, fiatCurrencyCode)}
|
|
242
209
|
</span>
|
|
243
210
|
</>
|
|
244
211
|
) : (
|
|
@@ -251,55 +218,26 @@ export const AmountInput = React.forwardRef(
|
|
|
251
218
|
)}
|
|
252
219
|
|
|
253
220
|
<div className={s["requested-amount-coin"]}>
|
|
254
|
-
<span
|
|
255
|
-
|
|
256
|
-
s["requested-amount-coin-currency"]
|
|
257
|
-
}
|
|
258
|
-
>
|
|
259
|
-
{tickerPrintable
|
|
260
|
-
? (estimateAmount ? "~ " : "") +
|
|
261
|
-
tickerPrintable
|
|
262
|
-
: ""}
|
|
221
|
+
<span className={s["requested-amount-coin-currency"]}>
|
|
222
|
+
{tickerPrintable ? (estimateAmount ? "~ " : "") + tickerPrintable : ""}
|
|
263
223
|
</span>
|
|
264
224
|
{!isLoading ? (
|
|
265
225
|
<input
|
|
266
226
|
type="text"
|
|
267
227
|
inputMode="decimal"
|
|
268
228
|
value={coinAmountValue}
|
|
269
|
-
onChange={(e)
|
|
270
|
-
handleChangeAmount(e.target.value)
|
|
271
|
-
}
|
|
229
|
+
onChange={e => handleChangeAmount(e.target.value)}
|
|
272
230
|
placeholder={coinAmountPlaceholder}
|
|
273
|
-
className={
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
onFocus={(e) =>
|
|
278
|
-
callHandlingErrors(
|
|
279
|
-
() => setIsInFocus(true),
|
|
280
|
-
e
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
|
-
onBlur={(e) =>
|
|
284
|
-
callHandlingErrors(
|
|
285
|
-
() => setIsInFocus(false),
|
|
286
|
-
e
|
|
287
|
-
)
|
|
288
|
-
}
|
|
231
|
+
className={s["requested-amount-coin-input"]}
|
|
232
|
+
disabled={disabled || locked}
|
|
233
|
+
onFocus={e => callHandlingErrors(() => setIsInFocus(true), e)}
|
|
234
|
+
onBlur={e => callHandlingErrors(() => setIsInFocus(false), e)}
|
|
289
235
|
/>
|
|
290
236
|
) : (
|
|
291
|
-
<div
|
|
292
|
-
className={
|
|
293
|
-
s["requested-amount-coin-skeleton"]
|
|
294
|
-
}
|
|
295
|
-
>
|
|
237
|
+
<div className={s["requested-amount-coin-skeleton"]}>
|
|
296
238
|
<span
|
|
297
239
|
className={
|
|
298
|
-
s[
|
|
299
|
-
"requested-amount-coin-skeleton-content"
|
|
300
|
-
] +
|
|
301
|
-
" " +
|
|
302
|
-
s["skeleton-dark"]
|
|
240
|
+
s["requested-amount-coin-skeleton-content"] + " " + s["skeleton-dark"]
|
|
303
241
|
}
|
|
304
242
|
></span>
|
|
305
243
|
</div>
|
|
@@ -309,81 +247,31 @@ export const AmountInput = React.forwardRef(
|
|
|
309
247
|
<>
|
|
310
248
|
<div
|
|
311
249
|
className={
|
|
312
|
-
s["requested-amount-fiat"] +
|
|
313
|
-
(interactedWith
|
|
314
|
-
? " " + s["interacted"]
|
|
315
|
-
: "")
|
|
250
|
+
s["requested-amount-fiat"] + (interactedWith ? " " + s["interacted"] : "")
|
|
316
251
|
}
|
|
317
252
|
>
|
|
318
253
|
{interactedWith ? (
|
|
319
254
|
<>
|
|
320
|
-
<span
|
|
321
|
-
|
|
322
|
-
s[
|
|
323
|
-
"requested-amount-fiat-currency"
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
>
|
|
327
|
-
{(estimateAmount
|
|
328
|
-
? "~ "
|
|
329
|
-
: "") +
|
|
330
|
-
fiatCurrencyCode}
|
|
255
|
+
<span className={s["requested-amount-fiat-currency"]}>
|
|
256
|
+
{(estimateAmount ? "~ " : "") + fiatCurrencyCode}
|
|
331
257
|
</span>
|
|
332
258
|
<input
|
|
333
259
|
type="text"
|
|
334
260
|
inputMode="decimal"
|
|
335
|
-
className={
|
|
336
|
-
s[
|
|
337
|
-
"requested-amount-fiat-input"
|
|
338
|
-
]
|
|
339
|
-
}
|
|
261
|
+
className={s["requested-amount-fiat-input"]}
|
|
340
262
|
value={fiatAmountValue}
|
|
341
|
-
disabled={disabled}
|
|
342
|
-
onChange={(e)
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
placeholder={placeholderByDecimalCount(
|
|
348
|
-
fiatCurrencyDecimals
|
|
349
|
-
)}
|
|
350
|
-
autoFocus={
|
|
351
|
-
fiatAmountAutoFocus
|
|
352
|
-
}
|
|
353
|
-
onFocus={(e) =>
|
|
354
|
-
callHandlingErrors(
|
|
355
|
-
() =>
|
|
356
|
-
setIsInFocus(
|
|
357
|
-
true
|
|
358
|
-
),
|
|
359
|
-
e
|
|
360
|
-
)
|
|
361
|
-
}
|
|
362
|
-
onBlur={(e) =>
|
|
363
|
-
callHandlingErrors(
|
|
364
|
-
() =>
|
|
365
|
-
setIsInFocus(
|
|
366
|
-
false
|
|
367
|
-
),
|
|
368
|
-
e
|
|
369
|
-
)
|
|
370
|
-
}
|
|
263
|
+
disabled={disabled || locked}
|
|
264
|
+
onChange={e => handleChangeAmountFiat(e.target.value)}
|
|
265
|
+
placeholder={placeholderByDecimalCount(fiatCurrencyDecimals)}
|
|
266
|
+
autoFocus={fiatAmountAutoFocus}
|
|
267
|
+
onFocus={e => callHandlingErrors(() => setIsInFocus(true), e)}
|
|
268
|
+
onBlur={e => callHandlingErrors(() => setIsInFocus(false), e)}
|
|
371
269
|
/>
|
|
372
270
|
</>
|
|
373
271
|
) : (
|
|
374
272
|
<span
|
|
375
|
-
className={
|
|
376
|
-
|
|
377
|
-
"requested-amount-fiat-placeholder"
|
|
378
|
-
]
|
|
379
|
-
}
|
|
380
|
-
onClick={(e) =>
|
|
381
|
-
callHandlingErrors(
|
|
382
|
-
() =>
|
|
383
|
-
handleFiatInteraction(),
|
|
384
|
-
e
|
|
385
|
-
)
|
|
386
|
-
}
|
|
273
|
+
className={s["requested-amount-fiat-placeholder"]}
|
|
274
|
+
onClick={e => callHandlingErrors(() => handleFiatInteraction(), e)}
|
|
387
275
|
>
|
|
388
276
|
{fiatInputPlaceholderText}
|
|
389
277
|
</span>
|
|
@@ -393,12 +281,7 @@ export const AmountInput = React.forwardRef(
|
|
|
393
281
|
) : null}
|
|
394
282
|
</div>
|
|
395
283
|
{showChangeAssetButton && ticker ? (
|
|
396
|
-
<div
|
|
397
|
-
className={
|
|
398
|
-
s["amount-input-container-button-wrapper"]
|
|
399
|
-
}
|
|
400
|
-
ref={buttonForwardRef}
|
|
401
|
-
>
|
|
284
|
+
<div className={s["amount-input-container-button-wrapper"]} ref={buttonForwardRef}>
|
|
402
285
|
<AssetSelection
|
|
403
286
|
assetIconSrc={assetIconSrc}
|
|
404
287
|
assetIconProtocolSrc={assetIconProtocolSrc}
|