@rabbitio/ui-kit 1.0.0-beta.89 → 1.0.0-beta.90
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 +7146 -2602
- package/coverage/coverage-final.json +181 -114
- package/coverage/index.html +374 -104
- 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 → ui-kit}/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/qrUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/apiGroups.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/emailAPI.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/ipAddressProviders.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/globalConstants.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/blockchain.js.html +6 -6
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/coin.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/index.html +20 -20
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/protocol.js.html +16 -16
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/fiatCurrenciesService.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/amountUtils.js.html +23 -23
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/cache.js.html +8 -8
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/errorUtils.js.html +15 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logger.js.html +23 -23
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/postponeExecution.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/rabbitTicker.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/safeStringify.js.html +36 -36
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +9 -6
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cancelProcessing.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalApiProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalServicesStatsCollector.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/robustExternalAPICallerService.js.html +3 -3
- package/coverage/ui-kit/src/swaps-lib/external-apis/exolixSwapProvider.js.html +1813 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +41 -26
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +23 -14
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +296 -392
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +108 -138
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +21 -6
- package/coverage/ui-kit/src/swaps-lib/models/existingSwap.js.html +514 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +147 -87
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +43 -43
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/partner.js.html +6 -6
- package/coverage/ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +331 -0
- 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 +76 -817
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/Input.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/Validation.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +13 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useCallHandlingErrors.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useIsHydrated.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useReferredState.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/inputValueProviders.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/textUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/uiUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/urlQueryUtils.js.html +3 -3
- 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/AmountInput.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/CoinPicker.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/ColoredNotice.stories.jsx.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/LogoCarousel.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/organisms/WaitlistSubscription.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/coins.jsx.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/coverage/ui-kit/storybook-static/223.063dc770.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/230.7eace282.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/242.981bebe4.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/374.99dab897.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/506.c6cb656d.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/547.cc28f1fd.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/586.ec70f0e7.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.097df435.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/889.a357fd2d.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/909.28bf3d7c.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/976.b5f1a5d4.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/996.07a638d5.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.b7c8f08a.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-LoadingDots-stories.5180c2f1.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-QrCode-stories.006bd0cc.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/atoms-RateSelector-stories.19c65c98.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.10813be5.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/index.html +656 -0
- package/coverage/ui-kit/storybook-static/main.54ca9836.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/molecules-ColoredNotice-stories.7a5d624e.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/molecules-LineWithIconLink-stories.b7f70ee2.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/molecules-LogoCarousel-stories.9be2ef69.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.1d1f9803.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/organisms-WaitlistSubscription-stories.a7c49a29.iframe.bundle.js.html +85 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/dist/global.css.html +118 -0
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/dist/index.html +116 -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/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.html +116 -0
- 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.bf0b2dcd.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/ui-kit/storybook-static/sb-addons/essentials-controls-1/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.html +274 -0
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/index.html +116 -0
- 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/ui-kit/storybook-static/sb-addons/interactions-7/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/manager-bundle.js.html +121 -0
- package/coverage/ui-kit/storybook-static/sb-addons/links-0/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/links-0/manager-bundle.js.html +94 -0
- 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/ui-kit/storybook-static/sb-addons/viewport-8/index.html +116 -0
- package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/manager-bundle.js.html +94 -0
- package/coverage/ui-kit/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js.html +88 -0
- 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/ui-kit/storybook-static/sb-manager/index.js.html +88 -0
- 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 +1248 -904
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +577 -404
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1172 -830
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1249 -905
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -0
- package/src/swaps-lib/external-apis/exolixSwapProvider.js +576 -0
- package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +11 -8
- package/src/swaps-lib/external-apis/swapProvider.js +16 -48
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +15 -25
- package/src/swaps-lib/models/baseSwapCreationInfo.js +5 -0
- package/src/swaps-lib/models/existingSwap.js +92 -22
- package/src/swaps-lib/models/existingSwapWithFiatData.js +52 -32
- package/src/swaps-lib/models/swapProviderCoinInfo.js +6 -6
- package/src/swaps-lib/services/publicSwapService.js +70 -317
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +34 -0
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/createSwap.test.js +1043 -0
- package/src/swaps-lib/test/external-apis/exolixSwapProvider/getSwapInfo.test.js +611 -0
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +57 -92
- package/src/swaps-lib/utils/swapUtils.js +1 -1
- package/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx +3 -1
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/existingSwap.js.html +0 -304
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +0 -331
|
@@ -77,8 +77,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
77
77
|
beforeEach(() => {
|
|
78
78
|
swapspaceSwapProvider = new SwapspaceSwapProvider("/", new Cache());
|
|
79
79
|
swapspaceSwapProvider._supportedCoins = [
|
|
80
|
-
{ coin: BTC,
|
|
81
|
-
{ coin: ETH,
|
|
80
|
+
{ coin: BTC, extraIdName: "" },
|
|
81
|
+
{ coin: ETH, extraIdName: "" },
|
|
82
82
|
];
|
|
83
83
|
|
|
84
84
|
fetchSupportedCurrenciesStub = sinon.stub(swapspaceSwapProvider, "_fetchSupportedCurrenciesIfNeeded");
|
|
@@ -102,6 +102,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
it("Should fetch supported currencies", async () => {
|
|
105
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
106
|
+
|
|
105
107
|
await swapspaceSwapProvider.createSwap(
|
|
106
108
|
USDCTRC20,
|
|
107
109
|
ETH,
|
|
@@ -116,6 +118,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
116
118
|
});
|
|
117
119
|
|
|
118
120
|
it("Should send an axios POST request", async () => {
|
|
121
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
122
|
+
|
|
119
123
|
await swapspaceSwapProvider.createSwap(
|
|
120
124
|
USDCTRC20,
|
|
121
125
|
ETH,
|
|
@@ -130,6 +134,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
130
134
|
});
|
|
131
135
|
|
|
132
136
|
it("Should send the request to the correct URL", async () => {
|
|
137
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
138
|
+
|
|
133
139
|
await swapspaceSwapProvider.createSwap(
|
|
134
140
|
USDCTRC20,
|
|
135
141
|
ETH,
|
|
@@ -144,6 +150,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
144
150
|
});
|
|
145
151
|
|
|
146
152
|
it("Should pass client IP address in request data", async () => {
|
|
153
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
154
|
+
|
|
147
155
|
await swapspaceSwapProvider.createSwap(
|
|
148
156
|
USDCTRC20,
|
|
149
157
|
ETH,
|
|
@@ -159,6 +167,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
159
167
|
});
|
|
160
168
|
|
|
161
169
|
it("Should pass provided refund address in request data", async () => {
|
|
170
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
171
|
+
|
|
162
172
|
await swapspaceSwapProvider.createSwap(
|
|
163
173
|
USDCTRC20,
|
|
164
174
|
ETH,
|
|
@@ -174,6 +184,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
174
184
|
});
|
|
175
185
|
|
|
176
186
|
it("Should use rateId from rawSwapData in request data", async () => {
|
|
187
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
188
|
+
|
|
177
189
|
await swapspaceSwapProvider.createSwap(
|
|
178
190
|
USDCTRC20,
|
|
179
191
|
ETH,
|
|
@@ -259,20 +271,19 @@ describe("swapspaceSwapProvider", function () {
|
|
|
259
271
|
axiosPostStub.args[0][1].refundExtraId.should.be.equal("");
|
|
260
272
|
});
|
|
261
273
|
|
|
262
|
-
it("Should use
|
|
274
|
+
it("Should use coins list to form requestData currencies and networks", async () => {
|
|
275
|
+
swapspaceSwapProvider._supportedCoins = [
|
|
276
|
+
{ coin: USDCTRC20, code: "from-test", network: "from-network-test" },
|
|
277
|
+
{ coin: ETH, code: "to-test", network: "to-network-test" },
|
|
278
|
+
];
|
|
279
|
+
|
|
263
280
|
await swapspaceSwapProvider.createSwap(
|
|
264
281
|
USDCTRC20,
|
|
265
282
|
ETH,
|
|
266
283
|
anyAmount,
|
|
267
284
|
anyReceivingAddress,
|
|
268
285
|
anyRefundAddress,
|
|
269
|
-
|
|
270
|
-
...anyValidRawSwapData,
|
|
271
|
-
fromCurrency: "from-test",
|
|
272
|
-
fromNetwork: "from-network-test",
|
|
273
|
-
toCurrency: "to-test",
|
|
274
|
-
toNetwork: "to-network-test",
|
|
275
|
-
},
|
|
286
|
+
anyValidRawSwapData,
|
|
276
287
|
anyIp,
|
|
277
288
|
false
|
|
278
289
|
);
|
|
@@ -283,12 +294,13 @@ describe("swapspaceSwapProvider", function () {
|
|
|
283
294
|
axiosPostStub.args[0][1].should.have.property("toNetwork", "to-network-test");
|
|
284
295
|
});
|
|
285
296
|
|
|
286
|
-
["
|
|
297
|
+
["id", "partner"].forEach(rawSwapDataProperty => {
|
|
287
298
|
it(`Should reject if raw swap data contains wrong ${rawSwapDataProperty}`, async () => {
|
|
288
299
|
const rawSwapData = {
|
|
289
300
|
...anyValidRawSwapData,
|
|
290
301
|
[rawSwapDataProperty]: null,
|
|
291
302
|
};
|
|
303
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
292
304
|
|
|
293
305
|
await swapspaceSwapProvider
|
|
294
306
|
.createSwap(
|
|
@@ -306,6 +318,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
306
318
|
});
|
|
307
319
|
|
|
308
320
|
it("Should send partner from rawSwapData when provided", async () => {
|
|
321
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
322
|
+
|
|
309
323
|
await swapspaceSwapProvider.createSwap(
|
|
310
324
|
USDCTRC20,
|
|
311
325
|
ETH,
|
|
@@ -322,6 +336,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
322
336
|
|
|
323
337
|
[false, true].forEach(fixed => {
|
|
324
338
|
it("Should ensure that fixed is always set to passed fixed value in the request data", async () => {
|
|
339
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
340
|
+
|
|
325
341
|
await swapspaceSwapProvider.createSwap(
|
|
326
342
|
USDCTRC20,
|
|
327
343
|
ETH,
|
|
@@ -338,6 +354,8 @@ describe("swapspaceSwapProvider", function () {
|
|
|
338
354
|
});
|
|
339
355
|
|
|
340
356
|
it("Should ensure all required parameters are passed to axios", async () => {
|
|
357
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
358
|
+
|
|
341
359
|
await swapspaceSwapProvider.createSwap(
|
|
342
360
|
USDCTRC20,
|
|
343
361
|
ETH,
|
|
@@ -368,7 +386,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
368
386
|
});
|
|
369
387
|
|
|
370
388
|
it("Should handle cases where toCurrencyExtraId is not found for the coin", async () => {
|
|
371
|
-
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20,
|
|
389
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20, extraIdName: "" }, { coin: ETH }];
|
|
372
390
|
await swapspaceSwapProvider.createSwap(
|
|
373
391
|
USDCTRC20,
|
|
374
392
|
ETH,
|
|
@@ -384,6 +402,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
384
402
|
|
|
385
403
|
it("Should throw an error if swap creation response is invalid", async () => {
|
|
386
404
|
axiosPostStub.resolves({ data: {} });
|
|
405
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
387
406
|
|
|
388
407
|
await swapspaceSwapProvider
|
|
389
408
|
.createSwap(
|
|
@@ -401,6 +420,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
401
420
|
|
|
402
421
|
it("Should handle status 429 and return requests limit exceeded", async () => {
|
|
403
422
|
axiosPostStub.rejects({ response: { status: 429 } });
|
|
423
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
404
424
|
|
|
405
425
|
const result = await swapspaceSwapProvider.createSwap(
|
|
406
426
|
USDCTRC20,
|
|
@@ -420,6 +440,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
420
440
|
axiosPostStub.rejects({
|
|
421
441
|
response: { status: 422, data: "Pair cannot be processed by" },
|
|
422
442
|
});
|
|
443
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
423
444
|
|
|
424
445
|
const result = await swapspaceSwapProvider.createSwap(
|
|
425
446
|
USDCTRC20,
|
|
@@ -439,6 +460,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
439
460
|
axiosPostStub.rejects({
|
|
440
461
|
response: { status: 403, data: "IP address is forbidden" },
|
|
441
462
|
});
|
|
463
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
442
464
|
|
|
443
465
|
const result = await swapspaceSwapProvider.createSwap(
|
|
444
466
|
USDCTRC20,
|
|
@@ -458,6 +480,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
458
480
|
axiosPostStub.rejects({
|
|
459
481
|
response: { status: 422, data: "Amount maximum is" },
|
|
460
482
|
});
|
|
483
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
461
484
|
|
|
462
485
|
const result = await swapspaceSwapProvider.createSwap(
|
|
463
486
|
USDCTRC20,
|
|
@@ -477,6 +500,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
477
500
|
axiosPostStub.rejects({
|
|
478
501
|
response: { status: 422, data: "Amount minimum is" },
|
|
479
502
|
});
|
|
503
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
480
504
|
|
|
481
505
|
const result = await swapspaceSwapProvider.createSwap(
|
|
482
506
|
USDCTRC20,
|
|
@@ -496,6 +520,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
496
520
|
axiosPostStub.rejects({
|
|
497
521
|
response: { status: 422, data: "Currency not found" },
|
|
498
522
|
});
|
|
523
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
499
524
|
|
|
500
525
|
const result = await swapspaceSwapProvider.createSwap(
|
|
501
526
|
USDCTRC20,
|
|
@@ -521,6 +546,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
521
546
|
fixed: false,
|
|
522
547
|
},
|
|
523
548
|
});
|
|
549
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
524
550
|
|
|
525
551
|
const result = await swapspaceSwapProvider.createSwap(
|
|
526
552
|
USDCTRC20,
|
|
@@ -546,6 +572,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
546
572
|
fixed: false,
|
|
547
573
|
},
|
|
548
574
|
});
|
|
575
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
549
576
|
|
|
550
577
|
const result = await swapspaceSwapProvider.createSwap(
|
|
551
578
|
USDCTRC20,
|
|
@@ -571,6 +598,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
571
598
|
fixed: false,
|
|
572
599
|
},
|
|
573
600
|
});
|
|
601
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
574
602
|
|
|
575
603
|
const result = await swapspaceSwapProvider.createSwap(
|
|
576
604
|
USDCTRC20,
|
|
@@ -604,6 +632,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
604
632
|
fixed: false,
|
|
605
633
|
},
|
|
606
634
|
});
|
|
635
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
607
636
|
|
|
608
637
|
const result = await swapspaceSwapProvider.createSwap(
|
|
609
638
|
USDCTRC20,
|
|
@@ -629,6 +658,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
629
658
|
fixed: false,
|
|
630
659
|
},
|
|
631
660
|
});
|
|
661
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
632
662
|
|
|
633
663
|
const result = await swapspaceSwapProvider.createSwap(
|
|
634
664
|
USDCTRC20,
|
|
@@ -654,6 +684,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
654
684
|
fixed: false,
|
|
655
685
|
},
|
|
656
686
|
});
|
|
687
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
657
688
|
|
|
658
689
|
const result = await swapspaceSwapProvider.createSwap(
|
|
659
690
|
USDCTRC20,
|
|
@@ -680,6 +711,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
680
711
|
fixed: false,
|
|
681
712
|
},
|
|
682
713
|
});
|
|
714
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
683
715
|
|
|
684
716
|
const result = await swapspaceSwapProvider.createSwap(
|
|
685
717
|
USDCTRC20,
|
|
@@ -854,86 +886,6 @@ describe("swapspaceSwapProvider", function () {
|
|
|
854
886
|
error.message.should.match(/.*Invalid input: .*/);
|
|
855
887
|
});
|
|
856
888
|
|
|
857
|
-
it("Should throw an error if swap data has not string fromCurrency", async () => {
|
|
858
|
-
let error;
|
|
859
|
-
try {
|
|
860
|
-
await swapspaceSwapProvider.createSwap(
|
|
861
|
-
BTC,
|
|
862
|
-
ETH,
|
|
863
|
-
anyAmount,
|
|
864
|
-
anyReceivingAddress,
|
|
865
|
-
anyRefundAddress,
|
|
866
|
-
{ ...anyValidRawSwapData, fromCurrency: undefined },
|
|
867
|
-
anyIp,
|
|
868
|
-
false
|
|
869
|
-
);
|
|
870
|
-
} catch (e) {
|
|
871
|
-
error = e;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
error.message.should.match(/.*Invalid raw swap data: .*/);
|
|
875
|
-
});
|
|
876
|
-
|
|
877
|
-
it("Should throw an error if swap data has not string fromNetwork", async () => {
|
|
878
|
-
let error;
|
|
879
|
-
try {
|
|
880
|
-
await swapspaceSwapProvider.createSwap(
|
|
881
|
-
BTC,
|
|
882
|
-
ETH,
|
|
883
|
-
anyAmount,
|
|
884
|
-
anyReceivingAddress,
|
|
885
|
-
anyRefundAddress,
|
|
886
|
-
{ ...anyValidRawSwapData, fromNetwork: undefined },
|
|
887
|
-
anyIp,
|
|
888
|
-
false
|
|
889
|
-
);
|
|
890
|
-
} catch (e) {
|
|
891
|
-
error = e;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
error.message.should.match(/.*Invalid raw swap data: .*/);
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
it("Should throw an error if swap data has not string toCurrency", async () => {
|
|
898
|
-
let error;
|
|
899
|
-
try {
|
|
900
|
-
await swapspaceSwapProvider.createSwap(
|
|
901
|
-
BTC,
|
|
902
|
-
ETH,
|
|
903
|
-
anyAmount,
|
|
904
|
-
anyReceivingAddress,
|
|
905
|
-
anyRefundAddress,
|
|
906
|
-
{ ...anyValidRawSwapData, toCurrency: undefined },
|
|
907
|
-
anyIp,
|
|
908
|
-
false
|
|
909
|
-
);
|
|
910
|
-
} catch (e) {
|
|
911
|
-
error = e;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
error.message.should.match(/.*Invalid raw swap data: .*/);
|
|
915
|
-
});
|
|
916
|
-
|
|
917
|
-
it("Should throw an error if swap data has not string toNetwork", async () => {
|
|
918
|
-
let error;
|
|
919
|
-
try {
|
|
920
|
-
await swapspaceSwapProvider.createSwap(
|
|
921
|
-
BTC,
|
|
922
|
-
ETH,
|
|
923
|
-
anyAmount,
|
|
924
|
-
anyReceivingAddress,
|
|
925
|
-
anyRefundAddress,
|
|
926
|
-
{ ...anyValidRawSwapData, toNetwork: undefined },
|
|
927
|
-
anyIp,
|
|
928
|
-
false
|
|
929
|
-
);
|
|
930
|
-
} catch (e) {
|
|
931
|
-
error = e;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
error.message.should.match(/.*Invalid raw swap data: .*/);
|
|
935
|
-
});
|
|
936
|
-
|
|
937
889
|
it("Should throw an error if swap data has not string id", async () => {
|
|
938
890
|
let error;
|
|
939
891
|
try {
|
|
@@ -964,6 +916,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
964
916
|
fixed: false,
|
|
965
917
|
},
|
|
966
918
|
});
|
|
919
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
967
920
|
|
|
968
921
|
const result = await swapspaceSwapProvider.createSwap(
|
|
969
922
|
USDCTRC20,
|
|
@@ -988,6 +941,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
988
941
|
fixed: false,
|
|
989
942
|
},
|
|
990
943
|
});
|
|
944
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
991
945
|
|
|
992
946
|
await swapspaceSwapProvider
|
|
993
947
|
.createSwap(
|
|
@@ -1007,6 +961,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1007
961
|
axiosPostStub.rejects({
|
|
1008
962
|
response: { status: 500, data: "Server Error" },
|
|
1009
963
|
});
|
|
964
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1010
965
|
|
|
1011
966
|
let error;
|
|
1012
967
|
try {
|
|
@@ -1030,6 +985,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1030
985
|
|
|
1031
986
|
it("Should handle network errors without response data", async () => {
|
|
1032
987
|
axiosPostStub.rejects(new Error("Network Error"));
|
|
988
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1033
989
|
|
|
1034
990
|
await swapspaceSwapProvider
|
|
1035
991
|
.createSwap(
|
|
@@ -1055,6 +1011,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1055
1011
|
fixed: false,
|
|
1056
1012
|
},
|
|
1057
1013
|
});
|
|
1014
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1058
1015
|
|
|
1059
1016
|
const result = await swapspaceSwapProvider.createSwap(
|
|
1060
1017
|
USDCTRC20,
|
|
@@ -1072,6 +1029,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1072
1029
|
|
|
1073
1030
|
it("Should reject when _fetchSupportedCurrenciesIfNeeded throws an error", async () => {
|
|
1074
1031
|
fetchSupportedCurrenciesStub.rejects(new Error("Fetching Error"));
|
|
1032
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1075
1033
|
|
|
1076
1034
|
await swapspaceSwapProvider
|
|
1077
1035
|
.createSwap(
|
|
@@ -1089,6 +1047,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1089
1047
|
|
|
1090
1048
|
it("Should handle the scenario when axios.post throws an error with no response object", async () => {
|
|
1091
1049
|
axiosPostStub.rejects(new Error("Network Error"));
|
|
1050
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1092
1051
|
|
|
1093
1052
|
await swapspaceSwapProvider
|
|
1094
1053
|
.createSwap(
|
|
@@ -1106,6 +1065,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1106
1065
|
|
|
1107
1066
|
it('Should handle axios.post returning a response with no "id"', async () => {
|
|
1108
1067
|
axiosPostStub.resolves({ data: {} });
|
|
1068
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1109
1069
|
|
|
1110
1070
|
await swapspaceSwapProvider
|
|
1111
1071
|
.createSwap(
|
|
@@ -1131,6 +1091,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1131
1091
|
fixed: false,
|
|
1132
1092
|
},
|
|
1133
1093
|
});
|
|
1094
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1134
1095
|
|
|
1135
1096
|
await swapspaceSwapProvider
|
|
1136
1097
|
.createSwap(
|
|
@@ -1156,6 +1117,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1156
1117
|
fixed: false,
|
|
1157
1118
|
},
|
|
1158
1119
|
});
|
|
1120
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1159
1121
|
|
|
1160
1122
|
await swapspaceSwapProvider
|
|
1161
1123
|
.createSwap(
|
|
@@ -1182,6 +1144,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1182
1144
|
},
|
|
1183
1145
|
});
|
|
1184
1146
|
|
|
1147
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1185
1148
|
await swapspaceSwapProvider
|
|
1186
1149
|
.createSwap(
|
|
1187
1150
|
USDCTRC20,
|
|
@@ -1206,6 +1169,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1206
1169
|
fixed: false,
|
|
1207
1170
|
},
|
|
1208
1171
|
});
|
|
1172
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1209
1173
|
|
|
1210
1174
|
await swapspaceSwapProvider
|
|
1211
1175
|
.createSwap(
|
|
@@ -1232,6 +1196,7 @@ describe("swapspaceSwapProvider", function () {
|
|
|
1232
1196
|
},
|
|
1233
1197
|
});
|
|
1234
1198
|
|
|
1199
|
+
swapspaceSwapProvider._supportedCoins = [{ coin: USDCTRC20 }, { coin: ETH }];
|
|
1235
1200
|
await swapspaceSwapProvider
|
|
1236
1201
|
.createSwap(
|
|
1237
1202
|
USDCTRC20,
|
|
@@ -128,7 +128,7 @@ export class SwapUtils {
|
|
|
128
128
|
let remainingSwapIds = new Set(swapIds);
|
|
129
129
|
const failResults = [];
|
|
130
130
|
for (let provider of swapProviders) {
|
|
131
|
-
const result = await provider.getExistingSwapsDetailsAndStatus(
|
|
131
|
+
const result = await provider.getExistingSwapsDetailsAndStatus(Array.from(remainingSwapIds));
|
|
132
132
|
if (result.result) {
|
|
133
133
|
const extendedSwaps = [];
|
|
134
134
|
for (let swap of result.swaps) {
|
|
@@ -815,6 +815,7 @@ export const SwapForm = ({
|
|
|
815
815
|
useEffect(() => {
|
|
816
816
|
(async () => {
|
|
817
817
|
if (!receivingAssetTicker) return;
|
|
818
|
+
setValidationContent("");
|
|
818
819
|
setIsRecipientAddressValid(
|
|
819
820
|
recipientAddress.current === ""
|
|
820
821
|
? false
|
|
@@ -832,6 +833,7 @@ export const SwapForm = ({
|
|
|
832
833
|
useEffect(() => {
|
|
833
834
|
(async () => {
|
|
834
835
|
if (!sendingAssetTicker || !isRefundAddressRequired) return;
|
|
836
|
+
setValidationContent("");
|
|
835
837
|
setIsRefundAddressValid(
|
|
836
838
|
refundAddress.current === ""
|
|
837
839
|
? false
|
|
@@ -1030,7 +1032,7 @@ export const SwapForm = ({
|
|
|
1030
1032
|
assetIconProtocolSrc={receivingAssetProtocolIconSrc}
|
|
1031
1033
|
fallbackAssetIconSrc={fallBackAssetIconSrc}
|
|
1032
1034
|
disabled={isSwapAll.current || sendingAssetTicker === null || receivingAssetTicker === null}
|
|
1033
|
-
locked
|
|
1035
|
+
locked
|
|
1034
1036
|
handleCoinAmountChange={handleReceiveAssetAmountChange}
|
|
1035
1037
|
handleChangeAssetClick={handleChangeReceivingAssetClick}
|
|
1036
1038
|
updateAssetInputTo={updateReceiveInputTo}
|