@rabbitio/ui-kit 1.0.0-beta.71 → 1.0.0-beta.73
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 +12889 -8253
- package/coverage/coverage-final.json +157 -99
- package/coverage/index.html +385 -220
- 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/common → ui-kit/src/common-apis}/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/adapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/adapters/qrUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/amountUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/errorUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/external-apis/apiGroups.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/external-apis/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/external-apis/ipAddressProviders.js.html +5 -5
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/fiatCurrenciesService.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/constants → ui-kit/src/common-apis}/globalConstants.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/index.html +22 -7
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/models/blockchain.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/models/coin.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/models/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/models/protocol.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/cache.js.html +8 -8
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/emailAPI.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/logging/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/logging/logger.js.html +6 -6
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/postponeExecution.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/common → ui-kit/src/common-apis}/utils/safeStringify.js.html +29 -29
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +68 -80
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/cacheAndConcurrentRequestsResolver.js.html +5 -5
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/cachedRobustExternalApiCallerService.js.html +6 -6
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/cancelProcessing.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/concurrentCalculationsMetadataHolder.js.html +4 -4
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/externalApiProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/externalServicesStatsCollector.js.html +5 -5
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/robustExteranlApiCallerService → ui-kit/src/robust-api-caller}/robustExternalAPICallerService.js.html +8 -8
- package/coverage/ui-kit/src/swaps-lib/external-apis/index.html +146 -0
- package/coverage/ui-kit/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +1456 -0
- package/coverage/ui-kit/src/swaps-lib/external-apis/swapProvider.js.html +1390 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +182 -662
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +16 -7
- 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 +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +9 -9
- 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 +243 -57
- 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 +127 -52
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/arrowIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/arrowTosca.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/arrowWhite.jsx.html +11 -11
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/darkRectangle.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/determinedError.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/failedValidationIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/index.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/infoIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/noticeQuestionIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/successfulValidationIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/assets/wrappedImages/walletIcon.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/AssetIcon/AssetIcon.jsx.html +20 -17
- package/coverage/{rabbit-ui-kit/src/components/atoms/buttons/Button → ui-kit/src/ui-kit/components/atoms/AssetIcon}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/AssetSelection/AssetSelection.jsx.html +23 -20
- package/coverage/{rabbit-ui-kit/src/components/atoms/buttons/LinkButton → ui-kit/src/ui-kit/components/atoms/AssetSelection}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +10 -10
- package/coverage/ui-kit/src/ui-kit/components/atoms/BackgroundTitle/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/InformationMessage/InformationMessage.jsx.html +21 -18
- package/coverage/ui-kit/src/ui-kit/components/atoms/InformationMessage/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/Input/Input.jsx.html +38 -35
- package/coverage/{rabbit-ui-kit/src/components/atoms/buttons/Close → ui-kit/src/ui-kit/components/atoms/Input}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/LoadingDots/LoadingDots.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src/constants/organisms/dialog/DialogStep → ui-kit/src/ui-kit/components/atoms/LoadingDots}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/NoticeIcon/NoticeIcon.jsx.html +19 -22
- package/coverage/ui-kit/src/ui-kit/components/atoms/NoticeIcon/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/QrCode/QrCode.jsx.html +63 -15
- package/coverage/ui-kit/src/ui-kit/components/atoms/QrCode/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/RateSelector/RateSelector.jsx.html +16 -13
- package/coverage/ui-kit/src/ui-kit/components/atoms/RateSelector/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/SupportChat/SupportChat.jsx.html +16 -13
- package/coverage/ui-kit/src/ui-kit/components/atoms/SupportChat/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/Textarea/Textarea.jsx.html +36 -30
- package/coverage/ui-kit/src/ui-kit/components/atoms/Textarea/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/TitleBox/TitleBox.jsx.html +29 -29
- package/coverage/ui-kit/src/ui-kit/components/atoms/TitleBox/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/Tooltip/Tooltip.jsx.html +48 -21
- package/coverage/ui-kit/src/ui-kit/components/atoms/Tooltip/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +29 -23
- package/coverage/ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/Validation/Validation.jsx.html +13 -13
- package/coverage/ui-kit/src/ui-kit/components/atoms/Validation/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/buttons/Button/Button.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src/components/atoms/AssetSelection → ui-kit/src/ui-kit/components/atoms/buttons/Button}/index.html +15 -15
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/buttons/Close/Close.jsx.html +30 -15
- package/coverage/{rabbit-ui-kit/src/components/atoms/BackgroundTitle → ui-kit/src/ui-kit/components/atoms/buttons/Close}/index.html +15 -15
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/buttons/LinkButton/LinkButton.jsx.html +34 -16
- package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +11 -11
- package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/molecules/AmountInput/AmountInput.jsx.html +20 -17
- package/coverage/ui-kit/src/ui-kit/components/molecules/AmountInput/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/molecules/CoinPicker/CoinPicker.jsx.html +44 -38
- package/coverage/ui-kit/src/ui-kit/components/molecules/CoinPicker/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +10 -10
- package/coverage/{rabbit-ui-kit/src/components/organisms/Dialog/DialogStep → ui-kit/src/ui-kit/components/molecules/LineWithIconLink}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +25 -19
- package/coverage/{rabbit-ui-kit/src/components/atoms/buttons/RadioButtonWithText → ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +20 -14
- package/coverage/{rabbit-ui-kit/src/components/organisms/Dialog/DialogButtons → ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep}/index.html +8 -8
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/organisms/Dialog/Dialog.jsx.html +106 -19
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +13 -13
- package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +66 -60
- package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +116 -0
- package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/organisms/SwapForm/SwapForm.jsx.html +470 -98
- package/coverage/ui-kit/src/ui-kit/components/organisms/SwapForm/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src → ui-kit/src/ui-kit}/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +12 -12
- package/coverage/ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +116 -0
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/hooks/index.html +22 -7
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/hooks/useCallHandlingErrors.js.html +4 -4
- package/coverage/ui-kit/src/ui-kit/hooks/useIsHydrated.js.html +121 -0
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/hooks/useReferredState.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/utils/inputValueProviders.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/utils/textUtils.js.html +4 -4
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/utils/uiUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/components → ui-kit/src/ui-kit}/utils/urlQueryUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +6 -6
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +29 -92
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +9 -12
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +15 -9
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +11 -11
- 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 +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +4 -4
- 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 +15 -81
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +5 -5
- 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 +6 -6
- 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 +7 -7
- 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 +9 -12
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +7 -7
- package/coverage/ui-kit/storybook-static/124.c2d01e5e.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/138.56b7edc4.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/312.6f62bbd9.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/341.57a15f57.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/370.73bb343e.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/595.2e40d981.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/607.3ea32459.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/609.8c79ec77.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/666.09fdc1d7.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/797.c87cdf19.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/822.4bc0ebce.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/833.08e3ebb6.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/862.bf6bfe62.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/87.0a1bfeb1.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/893.4b09f929.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/996.846a677b.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-BackgroundTitle-stories.1a5386a1.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-LinesOfText-stories.7043a48b.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-LoadingDots-stories.091245c7.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-QrCode-stories.e10363b6.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-RateSelector-stories.af208e9a.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-Validation-stories.d561b311.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-buttons-Button-stories.e8e6b930.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-buttons-Close-stories.0a902a7c.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-buttons-LinkButton-stories.ca93ab6b.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/index.html +596 -0
- package/coverage/ui-kit/storybook-static/main.41f410f2.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/molecules-LineWithIconLink-stories.9721a18c.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/molecules-TitledLineWithIconLink-stories.1383fe3f.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/organisms-Dialog-Dialog-stories.4e6da717.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogButtons-DialogButtons-stories.6f45ae6e.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogStep-DialogStep-stories.74896048.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/index.html +116 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/preview.js.html +118 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/formatter-SWP5E3XI.mjs.html +118 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/index.html +116 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.html +116 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.js.html +118 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/InformationMessage → ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist}/index.html +15 -15
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.modern.js.html +118 -0
- package/coverage/ui-kit/storybook-static/runtime~main.ad918f38.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/sb-addons/actions-9/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/actions-9/manager-bundle.js.html +94 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/manager-bundle.js.html +121 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/LoadingDots → ui-kit/storybook-static/sb-addons/essentials-controls-1}/index.html +15 -15
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.html +274 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/AssetIcon → ui-kit/storybook-static/sb-addons/essentials-measure-4}/index.html +15 -15
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/manager-bundle.js.html +94 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/manager-bundle.js.html +94 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/manager-bundle.js.html +94 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/QrCode → ui-kit/storybook-static/sb-addons/interactions-7}/index.html +15 -15
- package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/manager-bundle.js.html +121 -0
- package/coverage/{rabbit-ui-kit/src/constants/atoms/Close → ui-kit/storybook-static/sb-addons/links-0}/index.html +15 -15
- package/coverage/{rabbit-ui-kit/src/constants/atoms/LinkButton/linkButton.jsx.html → ui-kit/storybook-static/sb-addons/links-0/manager-bundle.js.html} +16 -25
- package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/manager-bundle.js.html +1588 -0
- package/coverage/{rabbit-ui-kit/src/constants/atoms/Tooltip → ui-kit/storybook-static/sb-addons/viewport-8}/index.html +15 -15
- package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/manager-bundle.js.html +94 -0
- package/coverage/{rabbit-ui-kit/src/constants/atoms/Close/close.jsx.html → ui-kit/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js.html} +14 -26
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-2IXBUOFS.js.html +106 -0
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-INSKDKQB.js.html +1129 -0
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-NGTUFCUO.js.html +112 -0
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-UUEAOBSN.js.html +1303 -0
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-ZEU7PDD3.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js.html +553 -0
- package/coverage/ui-kit/storybook-static/sb-manager/globals-module-info.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-manager/globals.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-manager/index.html +281 -0
- package/coverage/{rabbit-ui-kit/src/constants/organisms/dialog/DialogStep/dialogStep.js.html → ui-kit/storybook-static/sb-manager/index.js.html} +11 -11
- package/coverage/ui-kit/storybook-static/sb-manager/runtime.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-preview/globals.js.html +88 -0
- package/coverage/ui-kit/storybook-static/sb-preview/index.html +131 -0
- package/coverage/ui-kit/storybook-static/sb-preview/runtime.js.html +421 -0
- package/coverage/ui-kit/storybook-static/templates-DeterminedErrorDialogStep-stories.3cc14214.iframe.bundle.js.html +85 -0
- package/dist/index.cjs +1568 -796
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +21030 -21030
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +1108 -534
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1567 -797
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1568 -796
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/{common → common-apis}/external-apis/ipAddressProviders.js +2 -2
- package/src/index.js +62 -66
- package/src/{robustExteranlApiCallerService → robust-api-caller}/cacheAndConcurrentRequestsResolver.js +2 -2
- package/src/{robustExteranlApiCallerService → robust-api-caller}/cachedRobustExternalApiCallerService.js +3 -3
- package/src/{robustExteranlApiCallerService → robust-api-caller}/concurrentCalculationsMetadataHolder.js +1 -1
- package/src/{robustExteranlApiCallerService → robust-api-caller}/externalServicesStatsCollector.js +2 -2
- package/src/{robustExteranlApiCallerService → robust-api-caller}/robustExternalAPICallerService.js +5 -5
- package/src/{robustExteranlApiCallerService → robust-api-caller}/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +2 -2
- package/src/{robustExteranlApiCallerService → robust-api-caller}/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +1 -1
- package/src/{robustExteranlApiCallerService → robust-api-caller}/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +1 -1
- package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +457 -0
- package/src/swaps-lib/external-apis/swapProvider.js +247 -20
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +41 -201
- package/src/swaps-lib/models/baseSwapCreationInfo.js +4 -1
- package/src/swaps-lib/services/publicSwapService.js +113 -51
- package/src/swaps-lib/test/external-apis/swapProvider/removeProtocolNameFromCoinName.test.js +142 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +5 -5
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +3 -3
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getAllSupportedCurrencies.test.js +1 -1
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getDepositCurrencies.test.js +1 -1
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +124 -4
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getWithdrawalCurrencies.test.js +1 -1
- package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +2 -2
- package/src/swaps-lib/utils/swapUtils.js +69 -44
- package/{styles → src/ui-kit/assets/styles}/index.scss +1 -1
- package/src/{assets → ui-kit/assets}/wrappedImages/arrowWhite.jsx +1 -1
- package/src/{components → ui-kit/components}/atoms/AssetIcon/AssetIcon.jsx +5 -4
- package/src/{components → ui-kit/components}/atoms/AssetIcon/asset-icon.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/AssetSelection/AssetSelection.jsx +8 -7
- package/src/{components → ui-kit/components}/atoms/AssetSelection/asset-selection.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/BackgroundTitle/background-title.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/InformationMessage/InformationMessage.jsx +6 -5
- package/src/{components → ui-kit/components}/atoms/InformationMessage/information-message.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/Input/Input.jsx +23 -22
- package/src/{components → ui-kit/components}/atoms/Input/input.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/LoadingDots/LoadingDots.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/NoticeIcon/NoticeIcon.jsx +6 -7
- package/src/{components → ui-kit/components}/atoms/NoticeIcon/notice-icon.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/QrCode/QrCode.jsx +18 -2
- package/src/{components → ui-kit/components}/atoms/QrCode/qr-code.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/RateSelector/RateSelector.jsx +1 -0
- package/src/{components → ui-kit/components}/atoms/RateSelector/rate-selector.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/SupportChat/SupportChat.jsx +1 -0
- package/src/{components → ui-kit/components}/atoms/Textarea/Textarea.jsx +19 -17
- package/src/{components → ui-kit/components}/atoms/Textarea/textarea.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/TitleBox/TitleBox.jsx +19 -19
- package/src/{components → ui-kit/components}/atoms/TitleBox/title-box.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/Tooltip/Tooltip.jsx +17 -8
- package/src/{components → ui-kit/components}/atoms/Tooltip/tooltip.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/TwoLinesOfText/LinesOfText.jsx +11 -9
- package/src/{components → ui-kit/components}/atoms/TwoLinesOfText/lines-of-text.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/Validation/Validation.jsx +2 -2
- package/src/{components → ui-kit/components}/atoms/Validation/validation.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/buttons/Button/Button.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/buttons/Close/Close.jsx +7 -2
- package/src/{components → ui-kit/components}/atoms/buttons/Close/close.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/buttons/LinkButton/LinkButton.jsx +9 -3
- package/src/{components → ui-kit/components}/atoms/buttons/LinkButton/link-button.module.scss +1 -1
- package/src/{components → ui-kit/components}/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx +1 -1
- package/src/{components → ui-kit/components}/atoms/buttons/RadioButtonWithText/radio-button-with-text.module.scss +1 -1
- package/src/{components → ui-kit/components}/molecules/AmountInput/AmountInput.jsx +5 -4
- package/src/{components → ui-kit/components}/molecules/AmountInput/amount-input.module.scss +1 -1
- package/src/{components → ui-kit/components}/molecules/CoinPicker/CoinPicker.jsx +27 -25
- package/src/{components → ui-kit/components}/molecules/CoinPicker/coin-picker.module.scss +1 -1
- package/src/{components → ui-kit/components}/molecules/LineWithIconLink/line-with-icon-link.module.scss +1 -1
- package/src/{components → ui-kit/components}/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx +8 -6
- package/src/{components → ui-kit/components}/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx +3 -1
- package/src/{components → ui-kit/components}/organisms/Dialog/Dialog.jsx +35 -6
- package/src/{components → ui-kit/components}/organisms/Dialog/DialogButtons/DialogButtons.jsx +3 -3
- package/src/{components → ui-kit/components}/organisms/Dialog/DialogButtons/dialog-buttons.module.scss +1 -1
- package/src/{components → ui-kit/components}/organisms/Dialog/DialogStep/DialogStep.jsx +49 -47
- package/src/{components → ui-kit/components}/organisms/Dialog/DialogStep/dialog-step.module.scss +1 -1
- package/src/{components → ui-kit/components}/organisms/Dialog/dialog.module.scss +1 -1
- package/src/{components → ui-kit/components}/organisms/SwapForm/SwapForm.jsx +209 -85
- package/src/{components → ui-kit/components}/organisms/SwapForm/swap-form.module.scss +2 -2
- package/src/{components → ui-kit/components}/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx +2 -2
- package/src/{components → ui-kit}/hooks/useCallHandlingErrors.js +1 -1
- package/src/ui-kit/hooks/useIsHydrated.js +12 -0
- package/src/{components → ui-kit}/utils/textUtils.js +1 -1
- package/coverage/rabbit-ui-kit/src/components/atoms/Input/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/NoticeIcon/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/RateSelector/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/SupportChat/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/Textarea/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/TitleBox/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/Tooltip/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/TwoLinesOfText/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/Validation/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/molecules/AmountInput/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/molecules/CoinPicker/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/molecules/LineWithIconLink/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/molecules/TitledLineWithIconLink/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/organisms/CoinPickerDialogStep/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/organisms/Dialog/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/organisms/SwapForm/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/templates/DeterminedErrorDialogStep/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/constants/atoms/LinkButton/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/constants/atoms/Tooltip/tooltip.jsx.html +0 -109
- package/coverage/rabbit-ui-kit/src/constants/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/constants/organisms/dialog/dialog.js.html +0 -172
- package/coverage/rabbit-ui-kit/src/constants/organisms/dialog/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/index.html +0 -131
- package/coverage/rabbit-ui-kit/src/swaps-lib/external-apis/swapProvider.js.html +0 -709
- package/src/assets/image/icons/arrow-tosca.svg +0 -3
- package/src/constants/atoms/Close/close.jsx +0 -5
- package/src/constants/atoms/LinkButton/linkButton.jsx +0 -6
- package/src/constants/atoms/Tooltip/tooltip.jsx +0 -8
- package/src/constants/organisms/dialog/DialogStep/dialogStep.js +0 -1
- package/src/constants/organisms/dialog/dialog.js +0 -29
- /package/src/{common → common-apis}/adapters/axiosAdapter.js +0 -0
- /package/src/{common → common-apis}/adapters/qrUtils.js +0 -0
- /package/src/{common → common-apis}/amountUtils.js +0 -0
- /package/src/{common → common-apis}/errorUtils.js +0 -0
- /package/src/{common → common-apis}/external-apis/apiGroups.js +0 -0
- /package/src/{common → common-apis}/fiatCurrenciesService.js +0 -0
- /package/src/{constants → common-apis}/globalConstants.jsx +0 -0
- /package/src/{common → common-apis}/models/blockchain.js +0 -0
- /package/src/{common → common-apis}/models/coin.js +0 -0
- /package/src/{common → common-apis}/models/protocol.js +0 -0
- /package/src/{common → common-apis}/tests/amountUtils/composeRateText.test.js +0 -0
- /package/src/{common → common-apis}/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +0 -0
- /package/src/{common → common-apis}/utils/cache.js +0 -0
- /package/src/{common → common-apis}/utils/emailAPI.js +0 -0
- /package/src/{common → common-apis}/utils/logging/logger.js +0 -0
- /package/src/{common → common-apis}/utils/logging/logsStorage.js +0 -0
- /package/src/{common → common-apis}/utils/postponeExecution.js +0 -0
- /package/src/{common → common-apis}/utils/safeStringify.js +0 -0
- /package/src/{robustExteranlApiCallerService → robust-api-caller}/cancelProcessing.js +0 -0
- /package/src/{robustExteranlApiCallerService → robust-api-caller}/externalApiProvider.js +0 -0
- /package/{styles → src/ui-kit/assets/styles}/_functions.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/_global-classes.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/_mixins.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/_placeholder.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/_variables.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/colors/_light-colors.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/colors/_solid-colors.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/fonts/NunitoSans-Bold.ttf +0 -0
- /package/{styles → src/ui-kit/assets/styles}/fonts/NunitoSans-ExtraBold.ttf +0 -0
- /package/{styles → src/ui-kit/assets/styles}/fonts/NunitoSans-Light.ttf +0 -0
- /package/{styles → src/ui-kit/assets/styles}/fonts/NunitoSans-Regular.ttf +0 -0
- /package/{styles → src/ui-kit/assets/styles}/fonts/NunitoSans-SemiBold.ttf +0 -0
- /package/{styles → src/ui-kit/assets/styles}/global-styles-index.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/size/_margin-size.scss +0 -0
- /package/{styles → src/ui-kit/assets/styles}/size/_padding-size.scss +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/arrowIcon.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/arrowTosca.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/darkRectangle.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/determinedError.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/failedValidationIcon.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/infoIcon.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/noticeQuestionIcon.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/successfulValidationIcon.jsx +0 -0
- /package/src/{assets → ui-kit/assets}/wrappedImages/walletIcon.jsx +0 -0
- /package/src/{components → ui-kit/components}/atoms/BackgroundTitle/BackgroundTitle.jsx +0 -0
- /package/src/{components → ui-kit/components}/atoms/LoadingDots/LoadingDots.jsx +0 -0
- /package/src/{components → ui-kit/components}/atoms/buttons/Button/Button.jsx +0 -0
- /package/src/{components → ui-kit/components}/molecules/LineWithIconLink/LineWithIconLink.jsx +0 -0
- /package/src/{components → ui-kit}/hooks/useReferredState.js +0 -0
- /package/src/{components → ui-kit}/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +0 -0
- /package/src/{components → ui-kit}/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +0 -0
- /package/src/{components → ui-kit}/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +0 -0
- /package/src/{components → ui-kit}/utils/inputValueProviders.js +0 -0
- /package/src/{components → ui-kit}/utils/uiUtils.js +0 -0
- /package/src/{components → ui-kit}/utils/urlQueryUtils.js +0 -0
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { BigNumber } from "bignumber.js";
|
|
3
3
|
|
|
4
|
-
import { AmountUtils } from "../../common/amountUtils.js";
|
|
5
|
-
import { improveAndRethrow } from "../../common/errorUtils.js";
|
|
4
|
+
import { AmountUtils } from "../../common-apis/amountUtils.js";
|
|
5
|
+
import { improveAndRethrow } from "../../common-apis/errorUtils.js";
|
|
6
6
|
import { SwapProvider } from "./swapProvider.js";
|
|
7
7
|
import { ExistingSwap } from "../models/existingSwap.js";
|
|
8
|
-
import { Coin } from "../../common/models/coin.js";
|
|
9
|
-
import { Protocol } from "../../common/models/protocol.js";
|
|
10
|
-
import { safeStringify } from "../../common/utils/safeStringify.js";
|
|
11
|
-
import { Logger } from "../../common/utils/logging/logger.js";
|
|
12
|
-
import { FALLBACK_ASSET_ICON_URL } from "../../
|
|
8
|
+
import { Coin } from "../../common-apis/models/coin.js";
|
|
9
|
+
import { Protocol } from "../../common-apis/models/protocol.js";
|
|
10
|
+
import { safeStringify } from "../../common-apis/utils/safeStringify.js";
|
|
11
|
+
import { Logger } from "../../common-apis/utils/logging/logger.js";
|
|
12
|
+
import { FALLBACK_ASSET_ICON_URL } from "../../common-apis/globalConstants.jsx";
|
|
13
13
|
|
|
14
14
|
export const BANNED_PARTNERS = ["stealthex", "changee", "coincraddle"];
|
|
15
15
|
|
|
16
16
|
export class SwapspaceSwapProvider extends SwapProvider {
|
|
17
17
|
constructor(apiKeysProxyUrl, cache, customCoinBuilder = (coin, network) => null, useRestrictedCoinsSet = true) {
|
|
18
|
-
super();
|
|
19
|
-
this.
|
|
20
|
-
this._URL = `${apiKeysProxyUrl}`;
|
|
21
|
-
this.
|
|
22
|
-
this.useRestrictedCoinsSet = useRestrictedCoinsSet;
|
|
23
|
-
this._customCoinBuilder = customCoinBuilder;
|
|
24
|
-
this._cache = cache;
|
|
18
|
+
super(cache, customCoinBuilder, useRestrictedCoinsSet);
|
|
19
|
+
this._partners = [];
|
|
20
|
+
this._URL = `${apiKeysProxyUrl}/swapspace`;
|
|
21
|
+
this.isAggregator = true;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
getSwapCreationInfoTtlMs() {
|
|
@@ -30,90 +27,6 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
30
27
|
return 110000;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
async getDepositCurrencies() {
|
|
34
|
-
const loggerSource = "getDepositCurrencies";
|
|
35
|
-
try {
|
|
36
|
-
await this._fetchSupportedCurrenciesIfNeeded();
|
|
37
|
-
Logger.log(`We have ${this._supportedCoins?.length} supported coins, getting depositable`, loggerSource);
|
|
38
|
-
return {
|
|
39
|
-
result: true,
|
|
40
|
-
coins: this._supportedCoins.filter(item => item.deposit).map(item => item.coin),
|
|
41
|
-
};
|
|
42
|
-
} catch (e) {
|
|
43
|
-
if (e?.response?.status === 429) {
|
|
44
|
-
return {
|
|
45
|
-
result: false,
|
|
46
|
-
reason: SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
improveAndRethrow(e, loggerSource);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async getAllSupportedCurrencies() {
|
|
54
|
-
const loggerSource = "getAllSupportedCurrencies";
|
|
55
|
-
try {
|
|
56
|
-
await this._fetchSupportedCurrenciesIfNeeded();
|
|
57
|
-
Logger.log(`We have ${this._supportedCoins?.length} supported coins returning`, loggerSource);
|
|
58
|
-
return {
|
|
59
|
-
result: true,
|
|
60
|
-
coins: this._supportedCoins.map(item => item.coin),
|
|
61
|
-
};
|
|
62
|
-
} catch (e) {
|
|
63
|
-
if (e?.response?.status === 429) {
|
|
64
|
-
return {
|
|
65
|
-
result: false,
|
|
66
|
-
reason: SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
improveAndRethrow(e, loggerSource);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async getWithdrawalCurrencies(exceptCurrency = null) {
|
|
74
|
-
const loggerSource = "getWithdrawalCurrencies";
|
|
75
|
-
try {
|
|
76
|
-
await this._fetchSupportedCurrenciesIfNeeded();
|
|
77
|
-
Logger.log(`We have ${this._supportedCoins?.length} supported coins, getting withdrawable`, loggerSource);
|
|
78
|
-
return {
|
|
79
|
-
result: true,
|
|
80
|
-
coins: this._supportedCoins
|
|
81
|
-
.filter(
|
|
82
|
-
item => item.withdrawal && (!exceptCurrency || item.coin?.ticker !== exceptCurrency?.ticker)
|
|
83
|
-
)
|
|
84
|
-
.map(item => item.coin),
|
|
85
|
-
};
|
|
86
|
-
} catch (e) {
|
|
87
|
-
if (e?.response?.status === 429) {
|
|
88
|
-
return {
|
|
89
|
-
result: false,
|
|
90
|
-
reason: SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
improveAndRethrow(e, loggerSource);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async initialize() {
|
|
98
|
-
await this._fetchSupportedCurrenciesIfNeeded();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
getIconUrl(coinOrTicker) {
|
|
102
|
-
const loggerSource = "getIconUrl";
|
|
103
|
-
try {
|
|
104
|
-
let coin = coinOrTicker;
|
|
105
|
-
if (!(coinOrTicker instanceof Coin)) {
|
|
106
|
-
coin = this._supportedCoins.find(i => i.coin.ticker === coinOrTicker)?.coin;
|
|
107
|
-
}
|
|
108
|
-
return (
|
|
109
|
-
this._supportedCoins.find(item => item.coin?.ticker === coin?.ticker)?.iconURL ??
|
|
110
|
-
FALLBACK_ASSET_ICON_URL
|
|
111
|
-
);
|
|
112
|
-
} catch (e) {
|
|
113
|
-
improveAndRethrow(e, loggerSource);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
30
|
async _fetchSupportedCurrenciesIfNeeded() {
|
|
118
31
|
const loggerSource = "_fetchSupportedCurrenciesIfNeeded";
|
|
119
32
|
try {
|
|
@@ -140,15 +53,7 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
140
53
|
/** Removing ticker and protocol name from coin name as we usually use them explicitly
|
|
141
54
|
* from coin object rather than counting on having it in the coin name itself.
|
|
142
55
|
* This processing is needed due to poor quality of swapspace coins names. */
|
|
143
|
-
let name = (item.name
|
|
144
|
-
.replaceAll(`(${code})`, "")
|
|
145
|
-
.replaceAll(`(${network})`, "")
|
|
146
|
-
.replaceAll(/ +/g, " ")
|
|
147
|
-
.trim();
|
|
148
|
-
if (name === "") {
|
|
149
|
-
// Rolling back to original name if our processing leads in empty name
|
|
150
|
-
name = item.name;
|
|
151
|
-
}
|
|
56
|
+
let name = this.removeProtocolNameFromCoinName(item.name, code, network);
|
|
152
57
|
const ticker = `${code}${code === network ? "" : network}`;
|
|
153
58
|
const defaultDecimalPlacesForCoinNotSupportedOOB = 8;
|
|
154
59
|
const defaultMinConfirmationsForCoinNotSupportedOOB = 1;
|
|
@@ -178,13 +83,14 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
178
83
|
network: item.network,
|
|
179
84
|
hasExtraId: item.hasExtraId,
|
|
180
85
|
extraIdName: item.extraIdName,
|
|
181
|
-
isPopular:
|
|
86
|
+
isPopular: item.popular ? 1 : 0,
|
|
182
87
|
iconURL: item.icon
|
|
183
88
|
? `https://storage.swapspace.co${item.icon}`
|
|
184
89
|
: FALLBACK_ASSET_ICON_URL,
|
|
185
90
|
deposit: item.deposit ?? false,
|
|
186
91
|
withdrawal: item.withdrawal ?? false,
|
|
187
92
|
validationRegexp: item.validationRegexp ?? null,
|
|
93
|
+
isAvailable: true,
|
|
188
94
|
};
|
|
189
95
|
}
|
|
190
96
|
|
|
@@ -198,74 +104,31 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
198
104
|
}
|
|
199
105
|
}
|
|
200
106
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
* This is just for users of this API if they don't care about the sorting - we just improve a list a bit this way.
|
|
204
|
-
* @private
|
|
205
|
-
*/
|
|
206
|
-
_putPopularCoinsFirst() {
|
|
207
|
-
this._supportedCoins.sort((i1, i2) => {
|
|
208
|
-
if (i1.isPopular && !i2.isPopular) return -1;
|
|
209
|
-
if (i2.isPopular && !i1.isPopular) return 1;
|
|
210
|
-
return i1.coin.ticker > i2.coin.ticker ? 1 : i1.coin.ticker < i2.coin.ticker ? -1 : 0;
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
async getCoinToUSDTRate(coin) {
|
|
215
|
-
const loggerSource = "getCoinToUSDTRate";
|
|
107
|
+
async _fetchPartnersListIfNeeded() {
|
|
108
|
+
const loggerSource = "_fetchPartnersListIfNeeded";
|
|
216
109
|
try {
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
// Using USDT TRC20 as usually fee in this network is smaller than ERC20 and this network is widely used for USDT
|
|
222
|
-
const usdtTrc20 = this._supportedCoins.find(i => i.coin.ticker === "USDTTRC20")?.coin;
|
|
223
|
-
if (!usdtTrc20) {
|
|
224
|
-
return { result: false };
|
|
225
|
-
}
|
|
226
|
-
const cached = this._cache.get("swapspace_usdt_rate_" + coin.ticker);
|
|
227
|
-
if (cached != null) {
|
|
228
|
-
return {
|
|
229
|
-
result: true,
|
|
230
|
-
rate: cached,
|
|
231
|
-
};
|
|
110
|
+
if (this._partners?.length === 0) {
|
|
111
|
+
const rawResponse = await axios.get(`${this._URL}/api/v2/partners`);
|
|
112
|
+
Logger.log(`Retrieved ${rawResponse?.data?.length} partners`, loggerSource);
|
|
113
|
+
this._partners = Array.isArray(rawResponse?.data) ? rawResponse?.data : [];
|
|
232
114
|
}
|
|
233
|
-
|
|
234
|
-
Logger.log("Loading USDT->coin rate as not found in cache:", coin?.ticker);
|
|
235
|
-
const result = await this.getSwapInfo(usdtTrc20, coin, "5000", false);
|
|
236
|
-
if (!result.result) {
|
|
237
|
-
return { result: false };
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// This calculation is not precise as we cannot recognize the actual fee and network fee. Just approximate.
|
|
241
|
-
const standardSwapspaceFeeMultiplier = 1.004; // fee is usually 0.4%
|
|
242
|
-
const rate = BigNumber(1).div(BigNumber(result.rate).times(standardSwapspaceFeeMultiplier)).toString();
|
|
243
|
-
this._cache.put(
|
|
244
|
-
"swapspace_usdt_rate_" + coin.ticker,
|
|
245
|
-
rate,
|
|
246
|
-
15 * 60000 // 15 minutes
|
|
247
|
-
);
|
|
248
|
-
return {
|
|
249
|
-
result: true,
|
|
250
|
-
rate: rate,
|
|
251
|
-
};
|
|
252
|
-
} catch (e) {
|
|
253
|
-
improveAndRethrow(e, loggerSource);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
getCoinByTickerIfPresent(ticker) {
|
|
258
|
-
try {
|
|
259
|
-
const item = this._supportedCoins.find(i => i.coin.ticker === ticker);
|
|
260
|
-
return item?.coin ?? null;
|
|
261
115
|
} catch (e) {
|
|
262
|
-
|
|
116
|
+
Logger.logError(e, loggerSource, "Failed to fetch partners list from swapspace");
|
|
263
117
|
}
|
|
264
118
|
}
|
|
265
119
|
|
|
266
|
-
async getSwapInfo(
|
|
120
|
+
async getSwapInfo(
|
|
121
|
+
fromCoin,
|
|
122
|
+
toCoin,
|
|
123
|
+
amountCoins,
|
|
124
|
+
fixed = false,
|
|
125
|
+
fromCoinToUsdRate = null,
|
|
126
|
+
amountIsToReceive = false
|
|
127
|
+
) {
|
|
267
128
|
const loggerSource = "getSwapInfo";
|
|
268
129
|
try {
|
|
130
|
+
if (amountIsToReceive)
|
|
131
|
+
throw new Error("Swapspace doesn't support exchanging to get the exact receiving amount");
|
|
269
132
|
if (
|
|
270
133
|
!(fromCoin instanceof Coin) ||
|
|
271
134
|
!(toCoin instanceof Coin) ||
|
|
@@ -387,6 +250,11 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
387
250
|
|
|
388
251
|
const rate =
|
|
389
252
|
bestOpt.toAmount && bestOpt.fromAmount ? BigNumber(bestOpt.toAmount).div(bestOpt.fromAmount) : null;
|
|
253
|
+
|
|
254
|
+
await this._fetchPartnersListIfNeeded();
|
|
255
|
+
const partner = this._partners.find(p => bestOpt?.partner?.toLowerCase() === p.path.toLowerCase());
|
|
256
|
+
const isRefundAddressRequired =
|
|
257
|
+
partner == null ? true : bestOpt.fixed ? partner.reqFixedRefund : partner.reqFloatRefund;
|
|
390
258
|
return {
|
|
391
259
|
result: true,
|
|
392
260
|
min: min,
|
|
@@ -397,6 +265,7 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
397
265
|
durationMinutesRange: bestOpt.duration ?? null,
|
|
398
266
|
fixed: bestOpt.fixed,
|
|
399
267
|
rawSwapData: bestOpt,
|
|
268
|
+
isRefundAddressRequired: !!isRefundAddressRequired,
|
|
400
269
|
};
|
|
401
270
|
}
|
|
402
271
|
const result = {
|
|
@@ -434,11 +303,14 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
434
303
|
clientIpAddress,
|
|
435
304
|
fixed,
|
|
436
305
|
toCurrencyExtraId = "",
|
|
437
|
-
refundExtraId = ""
|
|
306
|
+
refundExtraId = "",
|
|
307
|
+
amountIsToReceive = false
|
|
438
308
|
) {
|
|
439
309
|
const loggerSource = "createSwap";
|
|
440
310
|
const partner = rawSwapData?.partner;
|
|
441
311
|
try {
|
|
312
|
+
if (amountIsToReceive)
|
|
313
|
+
throw new Error("Swapspace doesn't support exchanging to get the exact receiving amount");
|
|
442
314
|
if (
|
|
443
315
|
!(fromCoin instanceof Coin) ||
|
|
444
316
|
!(toCoin instanceof Coin) ||
|
|
@@ -669,36 +541,4 @@ export class SwapspaceSwapProvider extends SwapProvider {
|
|
|
669
541
|
improveAndRethrow(e, loggerSource);
|
|
670
542
|
}
|
|
671
543
|
}
|
|
672
|
-
|
|
673
|
-
isAddressValidForAsset(asset, address) {
|
|
674
|
-
try {
|
|
675
|
-
const assetData = this._supportedCoins.find(i => i.coin?.ticker === asset?.ticker);
|
|
676
|
-
if (assetData) {
|
|
677
|
-
let corrected = assetData.validationRegexp.trim();
|
|
678
|
-
corrected = corrected[0] === "/" ? corrected.slice(1) : corrected;
|
|
679
|
-
corrected =
|
|
680
|
-
corrected[corrected.length - 1] === "/" ? corrected.slice(0, corrected.length - 1) : corrected;
|
|
681
|
-
return address.match(corrected) != null;
|
|
682
|
-
}
|
|
683
|
-
} catch (e) {
|
|
684
|
-
Logger.logError(e, "isAddressValidForAsset");
|
|
685
|
-
}
|
|
686
|
-
return false;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
getExtraIdNameIfPresent(asset) {
|
|
690
|
-
try {
|
|
691
|
-
const assetData = this._supportedCoins.find(i => i.coin?.ticker === asset?.ticker);
|
|
692
|
-
if (assetData?.hasExtraId) {
|
|
693
|
-
if (assetData?.extraIdName == null || assetData?.extraIdName === "") {
|
|
694
|
-
// We return some default name if the extraIdName is empty
|
|
695
|
-
return "ID";
|
|
696
|
-
}
|
|
697
|
-
return assetData?.extraIdName;
|
|
698
|
-
}
|
|
699
|
-
return null;
|
|
700
|
-
} catch (e) {
|
|
701
|
-
improveAndRethrow(e, "getExtraIdNameIfPresent");
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
544
|
}
|
|
@@ -12,6 +12,7 @@ export class BaseSwapCreationInfo {
|
|
|
12
12
|
* @param fiatMax {number}
|
|
13
13
|
* @param durationMinutesRange {string}
|
|
14
14
|
* @param fixed {boolean}
|
|
15
|
+
* @param [isRefundAddressRequired=false] {boolean}
|
|
15
16
|
*/
|
|
16
17
|
constructor(
|
|
17
18
|
fromCoin,
|
|
@@ -25,7 +26,8 @@ export class BaseSwapCreationInfo {
|
|
|
25
26
|
max,
|
|
26
27
|
fiatMax,
|
|
27
28
|
durationMinutesRange,
|
|
28
|
-
fixed
|
|
29
|
+
fixed,
|
|
30
|
+
isRefundAddressRequired = false
|
|
29
31
|
) {
|
|
30
32
|
this.fromCoin = fromCoin;
|
|
31
33
|
this.toCoin = toCoin;
|
|
@@ -39,5 +41,6 @@ export class BaseSwapCreationInfo {
|
|
|
39
41
|
this.fiatMax = fiatMax;
|
|
40
42
|
this.durationMinutesRange = durationMinutesRange;
|
|
41
43
|
this.fixed = fixed;
|
|
44
|
+
this.isRefundAddressRequired = isRefundAddressRequired;
|
|
42
45
|
}
|
|
43
46
|
}
|