@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
|
@@ -70,7 +70,7 @@ export const CoinPicker = ({
|
|
|
70
70
|
mode = COIN_PICKER_MODES.BUTTON,
|
|
71
71
|
allCoins,
|
|
72
72
|
initiallyEnabledCoinsList,
|
|
73
|
-
handleClick =
|
|
73
|
+
handleClick = ticker => {},
|
|
74
74
|
triggerToReloadData,
|
|
75
75
|
search = false,
|
|
76
76
|
searchAdaptive = true,
|
|
@@ -79,7 +79,7 @@ export const CoinPicker = ({
|
|
|
79
79
|
loadCoinsAndContent = null,
|
|
80
80
|
showRequestMissingCoinsInfoMessage = true,
|
|
81
81
|
supportUrl = null,
|
|
82
|
-
coinToIconPaths =
|
|
82
|
+
coinToIconPaths = coin => ({
|
|
83
83
|
assetIconSrc: undefined,
|
|
84
84
|
assetIconProtocolSrc: undefined,
|
|
85
85
|
}),
|
|
@@ -91,12 +91,8 @@ export const CoinPicker = ({
|
|
|
91
91
|
|
|
92
92
|
const [coins, setCoins] = useState(null);
|
|
93
93
|
const [filteredCoins, setFilteredCoins] = useState([]);
|
|
94
|
-
const [initiallyEnabledCoins, setInitiallyEnabledCoins] = useReferredState(
|
|
95
|
-
|
|
96
|
-
);
|
|
97
|
-
const [currentlyEnabledCoins, setCurrentlyEnabledCoins] = useReferredState(
|
|
98
|
-
{}
|
|
99
|
-
);
|
|
94
|
+
const [initiallyEnabledCoins, setInitiallyEnabledCoins] = useReferredState({});
|
|
95
|
+
const [currentlyEnabledCoins, setCurrentlyEnabledCoins] = useReferredState({});
|
|
100
96
|
const [searchFieldValue, setSearchFieldValue] = useState("");
|
|
101
97
|
const [scrollWrapperClass, setScrollWrapperClass] = useState("");
|
|
102
98
|
|
|
@@ -111,17 +107,13 @@ export const CoinPicker = ({
|
|
|
111
107
|
const searchRef = useRef();
|
|
112
108
|
const scrollContainerRef = useRef();
|
|
113
109
|
const skeletonItemsCount =
|
|
114
|
-
initiallyEnabledCoinsList?.length ||
|
|
115
|
-
(partialLoadingEnabled ? partialLoadingIncrement : 6);
|
|
110
|
+
initiallyEnabledCoinsList?.length || (partialLoadingEnabled ? partialLoadingIncrement : 6);
|
|
116
111
|
|
|
117
112
|
const defaultLoadCoinsAndContent = async () => {
|
|
118
|
-
const allCoinsSorted = sortCoinsArrayByAlphabet(
|
|
119
|
-
allCoins,
|
|
120
|
-
composeEnabledCoinsObject(allCoins)
|
|
121
|
-
);
|
|
113
|
+
const allCoinsSorted = sortCoinsArrayByAlphabet(allCoins, composeEnabledCoinsObject(allCoins));
|
|
122
114
|
return {
|
|
123
115
|
coins: allCoinsSorted,
|
|
124
|
-
content: allCoinsSorted.map(
|
|
116
|
+
content: allCoinsSorted.map(c => ({
|
|
125
117
|
coin: c,
|
|
126
118
|
subtitle: c.blockchain?.name,
|
|
127
119
|
})),
|
|
@@ -132,28 +124,20 @@ export const CoinPicker = ({
|
|
|
132
124
|
const sortCoinsArrayByAlphabet = (coinsToSort, enabledCoinsObject) => {
|
|
133
125
|
return [
|
|
134
126
|
...coinsToSort
|
|
135
|
-
.filter(
|
|
136
|
-
.sort(
|
|
137
|
-
(a, b) =>
|
|
138
|
-
a.latinName.toUpperCase() > b.latinName.toUpperCase()
|
|
139
|
-
),
|
|
127
|
+
.filter(coin => enabledCoinsObject[coin.ticker])
|
|
128
|
+
.sort((a, b) => a.latinName.toUpperCase() > b.latinName.toUpperCase()),
|
|
140
129
|
...coinsToSort
|
|
141
|
-
.filter(
|
|
142
|
-
.sort(
|
|
143
|
-
(a, b) =>
|
|
144
|
-
a.latinName.toUpperCase() > b.latinName.toUpperCase()
|
|
145
|
-
),
|
|
130
|
+
.filter(coin => !enabledCoinsObject[coin.ticker])
|
|
131
|
+
.sort((a, b) => a.latinName.toUpperCase() > b.latinName.toUpperCase()),
|
|
146
132
|
];
|
|
147
133
|
};
|
|
148
134
|
|
|
149
|
-
const composeEnabledCoinsObject =
|
|
135
|
+
const composeEnabledCoinsObject = coins => {
|
|
150
136
|
if (mode === COIN_PICKER_MODES.CHECKBOX) {
|
|
151
137
|
return coins.reduce((prev, coin) => {
|
|
152
138
|
return {
|
|
153
139
|
...prev,
|
|
154
|
-
[coin.ticker]: !!initiallyEnabledCoinsList.find(
|
|
155
|
-
(enabledCoin) => enabledCoin.ticker === coin.ticker
|
|
156
|
-
),
|
|
140
|
+
[coin.ticker]: !!initiallyEnabledCoinsList.find(enabledCoin => enabledCoin.ticker === coin.ticker),
|
|
157
141
|
};
|
|
158
142
|
}, {});
|
|
159
143
|
}
|
|
@@ -162,17 +146,17 @@ export const CoinPicker = ({
|
|
|
162
146
|
|
|
163
147
|
const handleToggleClick = (ticker, resetButtonLoader = () => {}) => {
|
|
164
148
|
resetButtonLoader && resetButtonLoader();
|
|
165
|
-
setCurrentlyEnabledCoins(
|
|
149
|
+
setCurrentlyEnabledCoins(prev => {
|
|
166
150
|
return { ...prev, [ticker]: !prev[ticker] };
|
|
167
151
|
});
|
|
168
152
|
};
|
|
169
153
|
|
|
170
|
-
const handleCoinClick =
|
|
154
|
+
const handleCoinClick = coin => {
|
|
171
155
|
if (mode === COIN_PICKER_MODES.CHECKBOX) handleToggleClick(coin.ticker);
|
|
172
156
|
handleClick(coin.ticker);
|
|
173
157
|
};
|
|
174
158
|
|
|
175
|
-
const handleSearchAsset =
|
|
159
|
+
const handleSearchAsset = value => {
|
|
176
160
|
// TODO: [refactoring, high] use unified search function. task_id=be0475316f374dd4a926c948d969e704
|
|
177
161
|
setSearchFieldValue(value); // Trim the input to handle leading/trailing spaces
|
|
178
162
|
const searchTerm = value.trim().toLowerCase();
|
|
@@ -180,10 +164,10 @@ export const CoinPicker = ({
|
|
|
180
164
|
const searchWords = searchTerm.split(/\s+/); // Split search terms on whitespace
|
|
181
165
|
|
|
182
166
|
const filteredAndSortedCoins = coins
|
|
183
|
-
.filter(
|
|
167
|
+
.filter(coin => {
|
|
184
168
|
// Check if all search words are found in any of the given properties
|
|
185
169
|
return searchWords.every(
|
|
186
|
-
|
|
170
|
+
word =>
|
|
187
171
|
coin?.latinName?.toLowerCase().includes(word) ||
|
|
188
172
|
coin?.ticker?.toLowerCase().includes(word) ||
|
|
189
173
|
coin?.tickerPrintable?.toLowerCase().includes(word)
|
|
@@ -208,9 +192,7 @@ export const CoinPicker = ({
|
|
|
208
192
|
return bMatch - aMatch;
|
|
209
193
|
} else {
|
|
210
194
|
// Sort remaining items alphabetically by latinName
|
|
211
|
-
return a.latinName
|
|
212
|
-
.toLowerCase()
|
|
213
|
-
.localeCompare(b.latinName.toLowerCase());
|
|
195
|
+
return a.latinName.toLowerCase().localeCompare(b.latinName.toLowerCase());
|
|
214
196
|
}
|
|
215
197
|
});
|
|
216
198
|
|
|
@@ -223,9 +205,7 @@ export const CoinPicker = ({
|
|
|
223
205
|
const loadCoinsAndSaveToState = () => {
|
|
224
206
|
(async () => {
|
|
225
207
|
try {
|
|
226
|
-
const data = loadCoinsAndContent
|
|
227
|
-
? await loadCoinsAndContent()
|
|
228
|
-
: await defaultLoadCoinsAndContent();
|
|
208
|
+
const data = loadCoinsAndContent ? await loadCoinsAndContent() : await defaultLoadCoinsAndContent();
|
|
229
209
|
setCoins(data.coins);
|
|
230
210
|
setFilteredCoins(data.coins);
|
|
231
211
|
setCoinsContent(data.content);
|
|
@@ -258,13 +238,10 @@ export const CoinPicker = ({
|
|
|
258
238
|
useEffect(() => {
|
|
259
239
|
const enabled = currentlyEnabledCoins.current;
|
|
260
240
|
if (enabled) {
|
|
261
|
-
const enabledCoinsTickers = Object.keys(enabled).filter(
|
|
262
|
-
(ticker) => enabled[ticker]
|
|
263
|
-
);
|
|
241
|
+
const enabledCoinsTickers = Object.keys(enabled).filter(ticker => enabled[ticker]);
|
|
264
242
|
setCoinPickerValue(enabledCoinsTickers);
|
|
265
243
|
setCoinPickerListChanged(
|
|
266
|
-
JSON.stringify(initiallyEnabledCoins.current) !==
|
|
267
|
-
JSON.stringify(currentlyEnabledCoins.current)
|
|
244
|
+
JSON.stringify(initiallyEnabledCoins.current) !== JSON.stringify(currentlyEnabledCoins.current)
|
|
268
245
|
);
|
|
269
246
|
}
|
|
270
247
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -272,20 +249,13 @@ export const CoinPicker = ({
|
|
|
272
249
|
|
|
273
250
|
useEffect(() => {
|
|
274
251
|
setSearchEnabled(
|
|
275
|
-
search
|
|
276
|
-
? true
|
|
277
|
-
: searchAdaptive && initiallyEnabledCoinsList
|
|
278
|
-
? initiallyEnabledCoinsList.length > 6
|
|
279
|
-
: false
|
|
252
|
+
search ? true : searchAdaptive && initiallyEnabledCoinsList ? initiallyEnabledCoinsList.length > 6 : false
|
|
280
253
|
);
|
|
281
254
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
282
255
|
}, [search, searchAdaptive, coins]);
|
|
283
256
|
|
|
284
257
|
useEffect(() => {
|
|
285
|
-
if (
|
|
286
|
-
filteredCoins?.length > partialLoadingIncrement &&
|
|
287
|
-
partialLoadingEnabled
|
|
288
|
-
) {
|
|
258
|
+
if (filteredCoins?.length > partialLoadingIncrement && partialLoadingEnabled) {
|
|
289
259
|
setLimitedCoinsNumber(partialLoadingIncrement);
|
|
290
260
|
} else {
|
|
291
261
|
setLimitedCoinsNumber(0);
|
|
@@ -305,7 +275,7 @@ export const CoinPicker = ({
|
|
|
305
275
|
}, [limitedCoinsNumber]);
|
|
306
276
|
|
|
307
277
|
const displayMoreCoins = () => {
|
|
308
|
-
setLimitedCoinsNumber(
|
|
278
|
+
setLimitedCoinsNumber(prev => prev + partialLoadingIncrement);
|
|
309
279
|
};
|
|
310
280
|
|
|
311
281
|
const skeleton = () => {
|
|
@@ -314,18 +284,10 @@ export const CoinPicker = ({
|
|
|
314
284
|
skeletonItems.push(
|
|
315
285
|
<div className={s["item"]} key={"coin-picker-skeleton-" + i}>
|
|
316
286
|
<div className={s["link"] + " " + s["loading"]}>
|
|
317
|
-
<div
|
|
318
|
-
className={s["icon"] + " " + s["skeleton-dark"]}
|
|
319
|
-
></div>
|
|
287
|
+
<div className={s["icon"] + " " + s["skeleton-dark"]}></div>
|
|
320
288
|
<div className={s["content"]}>
|
|
321
|
-
<div
|
|
322
|
-
|
|
323
|
-
></div>
|
|
324
|
-
<div
|
|
325
|
-
className={
|
|
326
|
-
s["amount"] + " " + s["skeleton-dark"]
|
|
327
|
-
}
|
|
328
|
-
></div>
|
|
289
|
+
<div className={s["name"] + " " + s["skeleton-dark"]}></div>
|
|
290
|
+
<div className={s["amount"] + " " + s["skeleton-dark"]}></div>
|
|
329
291
|
</div>
|
|
330
292
|
</div>
|
|
331
293
|
</div>
|
|
@@ -340,9 +302,7 @@ export const CoinPicker = ({
|
|
|
340
302
|
if (scrollContainerRef.current?.scrollTop === 0)
|
|
341
303
|
setScrollWrapperClass(
|
|
342
304
|
s["reached-top"] +
|
|
343
|
-
(scrollContainerRef.current?.scrollHeight -
|
|
344
|
-
scrollContainerRef.current?.clientHeight ===
|
|
345
|
-
0
|
|
305
|
+
(scrollContainerRef.current?.scrollHeight - scrollContainerRef.current?.clientHeight === 0
|
|
346
306
|
? " " + s["reached-bottom"]
|
|
347
307
|
: "")
|
|
348
308
|
);
|
|
@@ -350,8 +310,7 @@ export const CoinPicker = ({
|
|
|
350
310
|
if (
|
|
351
311
|
scrollContainerRef.current?.scrollTop > 0 &&
|
|
352
312
|
scrollContainerRef.current?.scrollTop ===
|
|
353
|
-
scrollContainerRef.current?.scrollHeight -
|
|
354
|
-
scrollContainerRef.current?.clientHeight
|
|
313
|
+
scrollContainerRef.current?.scrollHeight - scrollContainerRef.current?.clientHeight
|
|
355
314
|
)
|
|
356
315
|
setScrollWrapperClass(s["reached-bottom"]);
|
|
357
316
|
};
|
|
@@ -366,17 +325,12 @@ export const CoinPicker = ({
|
|
|
366
325
|
|
|
367
326
|
return coins ? (
|
|
368
327
|
<>
|
|
369
|
-
<div
|
|
370
|
-
className={
|
|
371
|
-
s["coin-picker"] +
|
|
372
|
-
(shouldShowSkeleton ? " " + s["loading"] : "")
|
|
373
|
-
}
|
|
374
|
-
>
|
|
328
|
+
<div className={s["coin-picker"] + (shouldShowSkeleton ? " " + s["loading"] : "")}>
|
|
375
329
|
{searchEnabled ? (
|
|
376
330
|
<div className={s["coin-picker-search"]}>
|
|
377
331
|
<Input
|
|
378
332
|
value={searchFieldValue}
|
|
379
|
-
onChange={
|
|
333
|
+
onChange={e => handleSearchAsset(e.target.value)}
|
|
380
334
|
placeholder={texts.searchPlaceholder}
|
|
381
335
|
isSmallHeight={true}
|
|
382
336
|
clearButton
|
|
@@ -396,111 +350,53 @@ export const CoinPicker = ({
|
|
|
396
350
|
}
|
|
397
351
|
>
|
|
398
352
|
<div
|
|
399
|
-
className={
|
|
400
|
-
s["coin-picker-wrapper-content"] +
|
|
401
|
-
(searchEnabled ? " " + s["fixed-height"] : "")
|
|
402
|
-
}
|
|
353
|
+
className={s["coin-picker-wrapper-content"] + (searchEnabled ? " " + s["fixed-height"] : "")}
|
|
403
354
|
ref={scrollContainerRef}
|
|
404
355
|
onScroll={handleScroll}
|
|
405
356
|
>
|
|
406
|
-
<div
|
|
407
|
-
className={s["coin-picker-wrapper-content-assets"]}
|
|
408
|
-
>
|
|
357
|
+
<div className={s["coin-picker-wrapper-content-assets"]}>
|
|
409
358
|
{shouldShowSkeleton
|
|
410
359
|
? skeleton()
|
|
411
360
|
: displayedCoins.map((coin, index) => {
|
|
412
|
-
const {
|
|
413
|
-
assetIconSrc,
|
|
414
|
-
assetIconProtocolSrc,
|
|
415
|
-
} = coinToIconPaths(coin);
|
|
361
|
+
const { assetIconSrc, assetIconProtocolSrc } = coinToIconPaths(coin);
|
|
416
362
|
|
|
417
363
|
return (
|
|
418
364
|
<div
|
|
419
365
|
className={s["item"]}
|
|
420
366
|
key={`picker-${coin.ticker}-${index}`}
|
|
421
|
-
onClick={(
|
|
422
|
-
handleError(
|
|
423
|
-
() =>
|
|
424
|
-
handleCoinClick(coin),
|
|
425
|
-
e
|
|
426
|
-
)
|
|
427
|
-
}
|
|
367
|
+
onClick={e => handleError(() => handleCoinClick(coin), e)}
|
|
428
368
|
>
|
|
429
369
|
<div
|
|
430
370
|
className={
|
|
431
371
|
s["link"] +
|
|
432
|
-
(currentlyEnabledCoins
|
|
433
|
-
|
|
434
|
-
coin.ticker
|
|
435
|
-
] !==
|
|
436
|
-
initiallyEnabledCoins
|
|
437
|
-
.current[coin.ticker]
|
|
372
|
+
(currentlyEnabledCoins.current[coin.ticker] !==
|
|
373
|
+
initiallyEnabledCoins.current[coin.ticker]
|
|
438
374
|
? " " + s["outline"]
|
|
439
375
|
: "")
|
|
440
376
|
}
|
|
441
377
|
>
|
|
442
378
|
<AssetIcon
|
|
443
|
-
assetIconSrc={
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
assetIconProtocolSrc={
|
|
447
|
-
assetIconProtocolSrc
|
|
448
|
-
}
|
|
449
|
-
fallbackSrc={
|
|
450
|
-
FALLBACK_ASSET_ICON_URL
|
|
451
|
-
}
|
|
379
|
+
assetIconSrc={assetIconSrc}
|
|
380
|
+
assetIconProtocolSrc={assetIconProtocolSrc}
|
|
381
|
+
fallbackSrc={FALLBACK_ASSET_ICON_URL}
|
|
452
382
|
/>
|
|
453
|
-
<div
|
|
454
|
-
className={s["
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
<p className={s["name"]}>
|
|
458
|
-
{coin.latinName}
|
|
459
|
-
</p>
|
|
460
|
-
<p
|
|
461
|
-
className={
|
|
462
|
-
s["amount"]
|
|
463
|
-
}
|
|
464
|
-
>
|
|
465
|
-
{coinsContent?.find(
|
|
466
|
-
(i) =>
|
|
467
|
-
i.coin ===
|
|
468
|
-
coin
|
|
469
|
-
)?.subtitle ?? ""}
|
|
383
|
+
<div className={s["content"]} key={coin.ticker}>
|
|
384
|
+
<p className={s["name"]}>{coin.latinName}</p>
|
|
385
|
+
<p className={s["amount"]}>
|
|
386
|
+
{coinsContent?.find(i => i.coin === coin)?.subtitle ?? ""}
|
|
470
387
|
</p>
|
|
471
388
|
</div>
|
|
472
|
-
{mode ===
|
|
473
|
-
|
|
474
|
-
<div
|
|
475
|
-
className={s["arrow"]}
|
|
476
|
-
>
|
|
389
|
+
{mode === COIN_PICKER_MODES.BUTTON ? (
|
|
390
|
+
<div className={s["arrow"]}>
|
|
477
391
|
<ArrowIcon />
|
|
478
392
|
</div>
|
|
479
|
-
) : mode ===
|
|
480
|
-
|
|
481
|
-
<div
|
|
482
|
-
className={
|
|
483
|
-
s[
|
|
484
|
-
"toggle-container"
|
|
485
|
-
]
|
|
486
|
-
}
|
|
487
|
-
>
|
|
393
|
+
) : mode === COIN_PICKER_MODES.CHECKBOX ? (
|
|
394
|
+
<div className={s["toggle-container"]}>
|
|
488
395
|
<RadioButtonWithText
|
|
489
|
-
onStateChange={
|
|
490
|
-
resetButtonLoader
|
|
491
|
-
) =>
|
|
492
|
-
handleToggleClick(
|
|
493
|
-
coin.ticker,
|
|
494
|
-
resetButtonLoader
|
|
495
|
-
)
|
|
496
|
-
}
|
|
497
|
-
isSwitchedOn={
|
|
498
|
-
currentlyEnabledCoins
|
|
499
|
-
.current[
|
|
500
|
-
coin
|
|
501
|
-
.ticker
|
|
502
|
-
]
|
|
396
|
+
onStateChange={resetButtonLoader =>
|
|
397
|
+
handleToggleClick(coin.ticker, resetButtonLoader)
|
|
503
398
|
}
|
|
399
|
+
isSwitchedOn={currentlyEnabledCoins.current[coin.ticker]}
|
|
504
400
|
id={index}
|
|
505
401
|
/>
|
|
506
402
|
</div>
|
|
@@ -513,28 +409,15 @@ export const CoinPicker = ({
|
|
|
513
409
|
})}
|
|
514
410
|
</div>
|
|
515
411
|
|
|
516
|
-
{filteredCoins?.length === 0 &&
|
|
517
|
-
|
|
518
|
-
<div
|
|
519
|
-
className={
|
|
520
|
-
s[
|
|
521
|
-
"coin-picker-wrapper-content-asset-not-found"
|
|
522
|
-
]
|
|
523
|
-
}
|
|
524
|
-
>
|
|
412
|
+
{filteredCoins?.length === 0 && searchFieldValue !== "" ? (
|
|
413
|
+
<div className={s["coin-picker-wrapper-content-asset-not-found"]}>
|
|
525
414
|
<h6>{texts.noAssetsMessage}</h6>
|
|
526
415
|
</div>
|
|
527
416
|
) : (
|
|
528
417
|
""
|
|
529
418
|
)}
|
|
530
419
|
{partialLoadingEnabled && !isListFull ? (
|
|
531
|
-
<div
|
|
532
|
-
className={
|
|
533
|
-
s[
|
|
534
|
-
"coin-picker-wrapper-content-load-more-button"
|
|
535
|
-
]
|
|
536
|
-
}
|
|
537
|
-
>
|
|
420
|
+
<div className={s["coin-picker-wrapper-content-load-more-button"]}>
|
|
538
421
|
<Button
|
|
539
422
|
mode="primary-transparent"
|
|
540
423
|
size="sm"
|
|
@@ -548,13 +431,7 @@ export const CoinPicker = ({
|
|
|
548
431
|
""
|
|
549
432
|
)}
|
|
550
433
|
{searchEnabled && showRequestMissingCoinsInfoMessage ? (
|
|
551
|
-
<div
|
|
552
|
-
className={
|
|
553
|
-
s[
|
|
554
|
-
"coin-picker-wrapper-content-bottom-message"
|
|
555
|
-
]
|
|
556
|
-
}
|
|
557
|
-
>
|
|
434
|
+
<div className={s["coin-picker-wrapper-content-bottom-message"]}>
|
|
558
435
|
<InformationMessage
|
|
559
436
|
text={
|
|
560
437
|
<>
|
|
@@ -563,16 +440,9 @@ export const CoinPicker = ({
|
|
|
563
440
|
target="_blank"
|
|
564
441
|
rel="noreferrer"
|
|
565
442
|
href={supportUrl}
|
|
566
|
-
className={
|
|
567
|
-
s[
|
|
568
|
-
"coin-picker-wrapper-content-bottom-message-link"
|
|
569
|
-
]
|
|
570
|
-
}
|
|
443
|
+
className={s["coin-picker-wrapper-content-bottom-message-link"]}
|
|
571
444
|
>
|
|
572
|
-
{" " +
|
|
573
|
-
texts.assetSuggestionMessage
|
|
574
|
-
.part2 +
|
|
575
|
-
" "}
|
|
445
|
+
{" " + texts.assetSuggestionMessage.part2 + " "}
|
|
576
446
|
</a>
|
|
577
447
|
{texts.assetSuggestionMessage.part3}
|
|
578
448
|
</>
|
|
@@ -592,10 +462,7 @@ export const CoinPicker = ({
|
|
|
592
462
|
};
|
|
593
463
|
|
|
594
464
|
CoinPicker.propTypes = {
|
|
595
|
-
mode: PropTypes.oneOf([
|
|
596
|
-
COIN_PICKER_MODES.BUTTON,
|
|
597
|
-
COIN_PICKER_MODES.CHECKBOX,
|
|
598
|
-
]),
|
|
465
|
+
mode: PropTypes.oneOf([COIN_PICKER_MODES.BUTTON, COIN_PICKER_MODES.CHECKBOX]),
|
|
599
466
|
allCoins: PropTypes.array,
|
|
600
467
|
initiallyEnabledCoinsList: PropTypes.array,
|
|
601
468
|
handleClick: PropTypes.func,
|
|
@@ -624,7 +491,7 @@ CoinPicker.propTypes = {
|
|
|
624
491
|
|
|
625
492
|
CoinPicker.defaultProps = {
|
|
626
493
|
mode: COIN_PICKER_MODES.BUTTON,
|
|
627
|
-
handleClick:
|
|
494
|
+
handleClick: ticker => {},
|
|
628
495
|
search: false,
|
|
629
496
|
searchAdaptive: true,
|
|
630
497
|
setCoinPickerValue: () => {},
|
|
@@ -632,7 +499,7 @@ CoinPicker.defaultProps = {
|
|
|
632
499
|
loadCoinsAndContent: null,
|
|
633
500
|
showRequestMissingCoinsInfoMessage: true,
|
|
634
501
|
supportUrl: null,
|
|
635
|
-
coinToIconPaths:
|
|
502
|
+
coinToIconPaths: coin => ({
|
|
636
503
|
assetIconSrc: undefined,
|
|
637
504
|
assetIconProtocolSrc: undefined,
|
|
638
505
|
}),
|
|
@@ -32,10 +32,7 @@
|
|
|
32
32
|
position: absolute;
|
|
33
33
|
width: 100%;
|
|
34
34
|
height: 20px;
|
|
35
|
-
background: linear-gradient(
|
|
36
|
-
rgba(SolidColor("dark"), 0.05),
|
|
37
|
-
rgba(255, 255, 255, 0)
|
|
38
|
-
);
|
|
35
|
+
background: linear-gradient(rgba(SolidColor("dark"), 0.05), rgba(255, 255, 255, 0));
|
|
39
36
|
left: 0;
|
|
40
37
|
z-index: 1;
|
|
41
38
|
transition: 0.2s opacity ease;
|
|
@@ -15,12 +15,7 @@ export const LineWithIconLink = ({ text, icon, url }) => {
|
|
|
15
15
|
return (
|
|
16
16
|
<div className={s["line-with-icon-link"]}>
|
|
17
17
|
<h5 className={s["line-with-icon-link-text"]}>{text}</h5>
|
|
18
|
-
<a
|
|
19
|
-
href={url}
|
|
20
|
-
target="_blank"
|
|
21
|
-
rel="noopener noreferrer"
|
|
22
|
-
className={"line-with-icon-link-icon"}
|
|
23
|
-
>
|
|
18
|
+
<a href={url} target="_blank" rel="noopener noreferrer" className={"line-with-icon-link-icon"}>
|
|
24
19
|
<img src={icon} alt="Link Icon" />
|
|
25
20
|
</a>
|
|
26
21
|
</div>
|
|
@@ -23,7 +23,7 @@ export const CoinPickerDialogStep = ({
|
|
|
23
23
|
searchAdaptive,
|
|
24
24
|
loadCoinsAndContent,
|
|
25
25
|
showRequestMissingCoinsInfoMessage,
|
|
26
|
-
coinToIconPaths =
|
|
26
|
+
coinToIconPaths = coin => ({
|
|
27
27
|
assetIconSrc: undefined,
|
|
28
28
|
assetIconProtocolSrc: undefined,
|
|
29
29
|
}),
|
|
@@ -49,14 +49,12 @@ export const CoinPickerDialogStep = ({
|
|
|
49
49
|
mode={mode}
|
|
50
50
|
allCoins={allCoins}
|
|
51
51
|
initiallyEnabledCoinsList={initiallyEnabledCoinsList}
|
|
52
|
-
handleClick={
|
|
52
|
+
handleClick={ticker => handleCoinSelection(ticker)}
|
|
53
53
|
triggerToReloadData={triggerToReloadData}
|
|
54
54
|
search={search}
|
|
55
55
|
searchAdaptive={searchAdaptive}
|
|
56
56
|
loadCoinsAndContent={loadCoinsAndContent}
|
|
57
|
-
showRequestMissingCoinsInfoMessage={
|
|
58
|
-
showRequestMissingCoinsInfoMessage
|
|
59
|
-
}
|
|
57
|
+
showRequestMissingCoinsInfoMessage={showRequestMissingCoinsInfoMessage}
|
|
60
58
|
coinToIconPaths={coinToIconPaths}
|
|
61
59
|
supportUrl={supportUrl}
|
|
62
60
|
texts={texts}
|