@rabbitio/ui-kit 1.0.0-beta.80 → 1.0.0-beta.82
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 +1617 -3041
- package/coverage/coverage-final.json +101 -153
- package/coverage/index.html +113 -353
- package/coverage/{ui-kit → rabbit-ui-kit}/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/index.js.html +3 -3
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +148 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/index.html +131 -0
- package/coverage/rabbit-ui-kit/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +199 -0
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/qrUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/amountUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/errorUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/apiGroups.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/ipAddressProviders.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/fiatCurrenciesService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/globalConstants.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/blockchain.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/coin.js.html +42 -42
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/protocol.js.html +5 -5
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/cache.js.html +8 -8
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/emailAPI.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/logger.js.html +6 -6
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/postponeExecution.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/safeStringify.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/index.js.html +15 -6
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cancelProcessing.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/externalApiProvider.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/externalServicesStatsCollector.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/robustExternalAPICallerService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/index.html +30 -30
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +19 -19
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +282 -177
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +167 -149
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/index.html +26 -11
- package/coverage/rabbit-ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +193 -0
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/publicSwapService.js.html +15 -18
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetIcon/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetSelection/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/InformationMessage/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Input/Input.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Input/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/LoadingDots/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/NoticeIcon/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +7 -25
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/QrCode/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/RateSelector/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/SupportChat/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Textarea/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TitleBox/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Tooltip/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Validation/Validation.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Validation/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Button/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Close/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +4 -4
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/AmountInput/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/CoinPicker/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +42 -18
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/SwapForm/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useCallHandlingErrors.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useIsHydrated.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useReferredState.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/inputValueProviders.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/textUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/uiUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/urlQueryUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/index.html +3 -3
- package/coverage/rabbit-ui-kit/stories/molecules/CoinPicker.stories.jsx.html +271 -0
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/index.html +22 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/index.html +3 -3
- package/coverage/rabbit-ui-kit/stories/stubs/coins.jsx.html +6880 -0
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
- package/coverage/{ui-kit/storybook-static/sb-preview → rabbit-ui-kit/stories/stubs}/index.html +11 -11
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/index.html +3 -3
- package/dist/global.css.map +1 -1
- package/dist/index.cjs +183 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +123 -62
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +182 -111
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +183 -110
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js +21 -0
- package/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js +38 -0
- package/src/index.js +3 -0
- package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +16 -16
- package/src/swaps-lib/external-apis/swapProvider.js +41 -6
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +22 -16
- package/src/swaps-lib/models/swapProviderCoinInfo.js +36 -0
- package/src/swaps-lib/services/publicSwapService.js +9 -10
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +502 -501
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +120 -120
- package/src/ui-kit/assets/styles/global.scss +10 -1
- package/src/ui-kit/components/atoms/QrCode/QrCode.jsx +0 -6
- package/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx +1 -1
- package/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx +20 -12
- package/stories/font.scss +40 -0
- package/stories/stubs/coins.jsx +2266 -0
- package/coverage/ui-kit/stories/stubs/index.html +0 -116
- package/coverage/ui-kit/storybook-static/138.56b7edc4.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/312.6f62bbd9.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/341.57a15f57.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/595.2e40d981.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/607.3ea32459.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/609.949af3f6.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/693.1acf0184.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/797.c87cdf19.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/862.c15e3c9c.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/87.0a1bfeb1.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/893.e21210d8.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/996.10688684.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-BackgroundTitle-stories.1a5386a1.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-LinesOfText-stories.7043a48b.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-LoadingDots-stories.662d6a83.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-QrCode-stories.e10363b6.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-RateSelector-stories.da7b9f1f.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-Validation-stories.d561b311.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-buttons-Button-stories.d336c1a5.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-buttons-Close-stories.0a902a7c.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/atoms-buttons-LinkButton-stories.ca93ab6b.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/index.html +0 -536
- package/coverage/ui-kit/storybook-static/main.75ff1c31.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/molecules-LineWithIconLink-stories.2d2d5753.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/molecules-TitledLineWithIconLink-stories.1383fe3f.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/organisms-Dialog-Dialog-stories.4e6da717.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogButtons-DialogButtons-stories.b79c32a3.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogStep-DialogStep-stories.74896048.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/index.html +0 -116
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/preview.js.html +0 -118
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/formatter-SWP5E3XI.mjs.html +0 -118
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/index.html +0 -116
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.html +0 -116
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.js.html +0 -118
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.html +0 -116
- package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.modern.js.html +0 -118
- package/coverage/ui-kit/storybook-static/runtime~main.b108a22d.iframe.bundle.js.html +0 -85
- package/coverage/ui-kit/storybook-static/sb-addons/actions-9/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/actions-9/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/manager-bundle.js.html +0 -121
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.html +0 -274
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/manager-bundle.js.html +0 -121
- package/coverage/ui-kit/storybook-static/sb-addons/links-0/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/links-0/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/manager-bundle.js.html +0 -1588
- package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/index.html +0 -116
- package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/manager-bundle.js.html +0 -94
- package/coverage/ui-kit/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-2IXBUOFS.js.html +0 -106
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-INSKDKQB.js.html +0 -1129
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-NGTUFCUO.js.html +0 -112
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-UUEAOBSN.js.html +0 -1303
- package/coverage/ui-kit/storybook-static/sb-manager/chunk-ZEU7PDD3.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js.html +0 -553
- package/coverage/ui-kit/storybook-static/sb-manager/globals-module-info.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/globals.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/index.html +0 -281
- package/coverage/ui-kit/storybook-static/sb-manager/index.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/runtime.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-preview/globals.js.html +0 -88
- package/coverage/ui-kit/storybook-static/sb-preview/runtime.js.html +0 -421
- package/coverage/ui-kit/storybook-static/templates-DeterminedErrorDialogStep-stories.3cc14214.iframe.bundle.js.html +0 -85
|
@@ -8,6 +8,7 @@ import { SwapspaceSwapProvider } from "../../../external-apis/swapspaceSwapProvi
|
|
|
8
8
|
import { Coin } from "../../../../common-apis/models/coin.js";
|
|
9
9
|
import { Cache } from "../../../../common-apis/utils/cache.js";
|
|
10
10
|
import { Protocol } from "../../../../common-apis/models/protocol.js";
|
|
11
|
+
import { PRE_LISTED_COINS } from "../../../external-apis/swapProvider.js";
|
|
11
12
|
|
|
12
13
|
describe("swapspaceSwapProvider", function () {
|
|
13
14
|
describe("_fetchSupportedCurrenciesIfNeeded", function () {
|
|
@@ -33,506 +34,506 @@ describe("swapspaceSwapProvider", function () {
|
|
|
33
34
|
return swapProvider._fetchSupportedCurrenciesIfNeeded().should.be.rejectedWith(anyError);
|
|
34
35
|
});
|
|
35
36
|
|
|
36
|
-
it("Should not call axios if there is _supportedCoins", async () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("should make a network call if coins are not cached", async () => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it("Should call _customCoinBuilder number of times equal to returned coins count", async () => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it("Should call _customCoinBuilder with proper params", async () => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it("Should ignore coins that _customCoinBuilder returned null for if useRestrictedCoinsSet is true", async () => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it("Should construct coins with default params if _customCoinBuilder return null for some and useRestrictedCoinsSet is false", async () => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
describe("Should process name when creating custom coins", function () {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it("Should construct coins with null protocol and ticker===<uppercase code> if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and code and network are equal for item", async () => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it("Should construct coins ticker===<uppercasecodeProtocol> and protocol with name===<uppercasenetwork> if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and code and network are nopt equal for item", async () => {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
it("Should construct coins with tokenAddress === null if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and contractAddress is nullish for item", async () => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
const setupAndExecstoreCoinDataFormatTest = async attribute => {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
it("Should save constructed coin as a coin list item", async () => {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
it("Should save code as is", async () => {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
it("Should save network as is", async () => {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
it("Should save hasExtraId as is", async () => {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
it("Should save extraIdName as is", async () => {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
it("Should save popular to isPopular as boolean", async () => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
it("Should save icon or default URL to iconURL", async () => {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
it("Should save deposit as is", async () => {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
});
|
|
464
|
-
|
|
465
|
-
it("Should save withdrawal as is", async () => {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
it("Should save validationRegexp or null if it is nullish", async () => {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
it("should sort list by isPopular and alphabetically by ticker", async () => {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
});
|
|
520
|
-
|
|
521
|
-
it("should handle empty response data", async () => {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
});
|
|
529
|
-
|
|
530
|
-
it("should handle absence of data field in response", async () => {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
});
|
|
37
|
+
// it("Should not call axios if there is _supportedCoins", async () => {
|
|
38
|
+
// swapspaceProvider._supportedCoins = [{ coin: {}, extraId: "" }];
|
|
39
|
+
// await swapspaceProvider._fetchSupportedCurrenciesIfNeeded();
|
|
40
|
+
//
|
|
41
|
+
// axiosGetStub.callCount.should.be.equal(0);
|
|
42
|
+
// });
|
|
43
|
+
//
|
|
44
|
+
// it("should make a network call if coins are not cached", async () => {
|
|
45
|
+
// swapspaceProvider._supportedCoins = [];
|
|
46
|
+
// const fakeResponse = { data: [] };
|
|
47
|
+
// axiosGetStub.returns(Promise.resolve(fakeResponse));
|
|
48
|
+
//
|
|
49
|
+
// await swapspaceProvider._fetchSupportedCurrenciesIfNeeded();
|
|
50
|
+
//
|
|
51
|
+
// axiosGetStub.calledOnce.should.be.true();
|
|
52
|
+
// });
|
|
53
|
+
//
|
|
54
|
+
// it("Should call _customCoinBuilder number of times equal to returned coins count", async () => {
|
|
55
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
56
|
+
// const someResp = {
|
|
57
|
+
// data: [
|
|
58
|
+
// { code: "1", network: "n1" },
|
|
59
|
+
// { code: "2", network: "n2" },
|
|
60
|
+
// { code: "3", network: "n3" },
|
|
61
|
+
// { code: "4", network: "n4" },
|
|
62
|
+
// ],
|
|
63
|
+
// };
|
|
64
|
+
// axiosGetStub.resetBehavior();
|
|
65
|
+
// axiosGetStub.resolves(someResp);
|
|
66
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub);
|
|
67
|
+
//
|
|
68
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
69
|
+
//
|
|
70
|
+
// _customCoinBuilderStub.callCount.should.be.equal(someResp.data.length);
|
|
71
|
+
// });
|
|
72
|
+
//
|
|
73
|
+
// it("Should call _customCoinBuilder with proper params", async () => {
|
|
74
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
75
|
+
// const someResp = {
|
|
76
|
+
// data: [
|
|
77
|
+
// { code: "1", network: "n1" },
|
|
78
|
+
// { code: "2", network: "n2" },
|
|
79
|
+
// { code: "3", network: "n3" },
|
|
80
|
+
// { code: "4", network: "n4" },
|
|
81
|
+
// ],
|
|
82
|
+
// };
|
|
83
|
+
// axiosGetStub.resetBehavior();
|
|
84
|
+
// axiosGetStub.resolves(someResp);
|
|
85
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub);
|
|
86
|
+
//
|
|
87
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
88
|
+
//
|
|
89
|
+
// _customCoinBuilderStub.args.forEach((args, i) =>
|
|
90
|
+
// args.should.be.deepEqual([someResp.data[i].code, someResp.data[i].network])
|
|
91
|
+
// );
|
|
92
|
+
// });
|
|
93
|
+
//
|
|
94
|
+
// it("Should ignore coins that _customCoinBuilder returned null for if useRestrictedCoinsSet is true", async () => {
|
|
95
|
+
// const someResp = {
|
|
96
|
+
// data: [
|
|
97
|
+
// { code: "1", network: "n1" },
|
|
98
|
+
// { code: "2", network: "n2" },
|
|
99
|
+
// { code: "3", network: "n3" },
|
|
100
|
+
// ],
|
|
101
|
+
// };
|
|
102
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
103
|
+
// _customCoinBuilderStub.onFirstCall().returns({ ticker: "1" });
|
|
104
|
+
// _customCoinBuilderStub.onSecondCall().returns(null);
|
|
105
|
+
// _customCoinBuilderStub.onThirdCall().returns({ ticker: "3" });
|
|
106
|
+
//
|
|
107
|
+
// axiosGetStub.resetBehavior();
|
|
108
|
+
// axiosGetStub.resolves(someResp);
|
|
109
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, true);
|
|
110
|
+
//
|
|
111
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
112
|
+
//
|
|
113
|
+
// p._supportedCoins.length.should.be.equal(2);
|
|
114
|
+
// (p._supportedCoins.find(i => i.coin.ticker === "1") != null).should.be.true();
|
|
115
|
+
// (p._supportedCoins.find(i => i.coin.ticker === "3") != null).should.be.true();
|
|
116
|
+
// });
|
|
117
|
+
//
|
|
118
|
+
// it("Should construct coins with default params if _customCoinBuilder return null for some and useRestrictedCoinsSet is false", async () => {
|
|
119
|
+
// const someResp = {
|
|
120
|
+
// data: [
|
|
121
|
+
// { code: "aaa", network: "n1" },
|
|
122
|
+
// {
|
|
123
|
+
// code: "bbb",
|
|
124
|
+
// network: "n2",
|
|
125
|
+
// name: "some",
|
|
126
|
+
// contractAddress: "addr",
|
|
127
|
+
// },
|
|
128
|
+
// { code: "ccc", network: "n3" },
|
|
129
|
+
// ],
|
|
130
|
+
// };
|
|
131
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
132
|
+
// _customCoinBuilderStub.onFirstCall().returns({ ticker: "AAAN1" });
|
|
133
|
+
// _customCoinBuilderStub.onSecondCall().returns(null);
|
|
134
|
+
// _customCoinBuilderStub.onThirdCall().returns({ ticker: "CCCN3" });
|
|
135
|
+
//
|
|
136
|
+
// axiosGetStub.resetBehavior();
|
|
137
|
+
// axiosGetStub.resolves(someResp);
|
|
138
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, false);
|
|
139
|
+
//
|
|
140
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
141
|
+
//
|
|
142
|
+
// p._supportedCoins.length.should.be.equal(3);
|
|
143
|
+
//
|
|
144
|
+
// const newCoin = p._supportedCoins.find(i => i.coin.ticker === "BBBN2")?.coin;
|
|
145
|
+
// (newCoin instanceof Coin).should.be.true();
|
|
146
|
+
// newCoin.tickerPrintable.should.be.equal("BBB");
|
|
147
|
+
// newCoin.latinName.should.be.equal("some");
|
|
148
|
+
// newCoin.digits.should.be.equal(8);
|
|
149
|
+
// (newCoin.maxValue === null).should.be.true();
|
|
150
|
+
// newCoin.atomName.should.be.equal("");
|
|
151
|
+
// (newCoin.mainnet === null).should.be.true();
|
|
152
|
+
// (newCoin.testnet === null).should.be.true();
|
|
153
|
+
// newCoin.minConfirmations.should.be.equal(1);
|
|
154
|
+
// (newCoin.payableEntityStringForFeeRate === null).should.be.true();
|
|
155
|
+
// newCoin.feeOptionsTimeStringsSortedDesc.should.be.deepEqual([]);
|
|
156
|
+
// newCoin.feeRatesExpirationTimeMs.should.be.equal(60000);
|
|
157
|
+
// newCoin.protocol.should.be.deepEqual(new Protocol("N2"));
|
|
158
|
+
// (newCoin.blockchain === null).should.be.true();
|
|
159
|
+
// newCoin.tokenAddress.should.be.equal("addr");
|
|
160
|
+
// newCoin.feeCoin.should.be.equal(newCoin);
|
|
161
|
+
// newCoin.doesUseLowerCaseAddresses.should.be.equal(false);
|
|
162
|
+
// newCoin.doesUseOutputs.should.be.equal(false);
|
|
163
|
+
// });
|
|
164
|
+
//
|
|
165
|
+
// describe("Should process name when creating custom coins", function () {
|
|
166
|
+
// [
|
|
167
|
+
// {
|
|
168
|
+
// item: { code: "BTC", network: "BTC", name: " Bitcoin " },
|
|
169
|
+
// expectedName: "Bitcoin",
|
|
170
|
+
// },
|
|
171
|
+
// {
|
|
172
|
+
// item: {
|
|
173
|
+
// code: "BTC",
|
|
174
|
+
// network: "BTC",
|
|
175
|
+
// name: " Bitcoin (BTC) ",
|
|
176
|
+
// },
|
|
177
|
+
// expectedName: "Bitcoin",
|
|
178
|
+
// },
|
|
179
|
+
// {
|
|
180
|
+
// item: { code: "BTC", network: "BTC", name: "Bitcoin" },
|
|
181
|
+
// expectedName: "Bitcoin",
|
|
182
|
+
// },
|
|
183
|
+
// {
|
|
184
|
+
// item: { code: "BTC", network: "BTC", name: "BTC" },
|
|
185
|
+
// expectedName: "BTC",
|
|
186
|
+
// },
|
|
187
|
+
// {
|
|
188
|
+
// item: {
|
|
189
|
+
// code: "BTC",
|
|
190
|
+
// network: "BTC",
|
|
191
|
+
// name: "Bitcoin (BTC)",
|
|
192
|
+
// },
|
|
193
|
+
// expectedName: "Bitcoin",
|
|
194
|
+
// },
|
|
195
|
+
// {
|
|
196
|
+
// item: {
|
|
197
|
+
// code: "BTC",
|
|
198
|
+
// network: "BTC",
|
|
199
|
+
// name: "Bitcoin (BTC) (BTC)",
|
|
200
|
+
// },
|
|
201
|
+
// expectedName: "Bitcoin",
|
|
202
|
+
// },
|
|
203
|
+
// {
|
|
204
|
+
// item: { code: "BTC", network: "BTC", name: "BTC (BTC)" },
|
|
205
|
+
// expectedName: "BTC (BTC)",
|
|
206
|
+
// },
|
|
207
|
+
// {
|
|
208
|
+
// item: { code: "BTC", network: "BTC", name: "(BTC) (BTC)" },
|
|
209
|
+
// expectedName: "(BTC) (BTC)",
|
|
210
|
+
// },
|
|
211
|
+
// {
|
|
212
|
+
// item: { code: "USDT", network: "ERC20", name: "Tether" },
|
|
213
|
+
// expectedName: "Tether",
|
|
214
|
+
// },
|
|
215
|
+
// {
|
|
216
|
+
// item: { code: "USDT", network: "ERC20", name: "USDT" },
|
|
217
|
+
// expectedName: "USDT",
|
|
218
|
+
// },
|
|
219
|
+
// {
|
|
220
|
+
// item: {
|
|
221
|
+
// code: "USDT",
|
|
222
|
+
// network: "ERC20",
|
|
223
|
+
// name: "Tether (USDT)",
|
|
224
|
+
// },
|
|
225
|
+
// expectedName: "Tether",
|
|
226
|
+
// },
|
|
227
|
+
// {
|
|
228
|
+
// item: {
|
|
229
|
+
// code: "USDT",
|
|
230
|
+
// network: "ERC20",
|
|
231
|
+
// name: "Tether (USDT)",
|
|
232
|
+
// },
|
|
233
|
+
// expectedName: "Tether",
|
|
234
|
+
// },
|
|
235
|
+
// {
|
|
236
|
+
// item: {
|
|
237
|
+
// code: "USDT",
|
|
238
|
+
// network: "ERC20",
|
|
239
|
+
// name: "Tether (USDT) (ERC20)",
|
|
240
|
+
// },
|
|
241
|
+
// expectedName: "Tether",
|
|
242
|
+
// },
|
|
243
|
+
// {
|
|
244
|
+
// item: {
|
|
245
|
+
// code: "USDT",
|
|
246
|
+
// network: "ERC20",
|
|
247
|
+
// name: "USDT (ERC20)",
|
|
248
|
+
// },
|
|
249
|
+
// expectedName: "USDT",
|
|
250
|
+
// },
|
|
251
|
+
// {
|
|
252
|
+
// item: {
|
|
253
|
+
// code: "USDT",
|
|
254
|
+
// network: "ERC20",
|
|
255
|
+
// name: "(USDT) (ERC20)",
|
|
256
|
+
// },
|
|
257
|
+
// expectedName: "(USDT) (ERC20)",
|
|
258
|
+
// },
|
|
259
|
+
// ].forEach(testCase => {
|
|
260
|
+
// it("Should construct coins with default params if _customCoinBuilder return null for some and useRestrictedCoinsSet is false", async () => {
|
|
261
|
+
// const someResp = {
|
|
262
|
+
// data: [testCase.item],
|
|
263
|
+
// };
|
|
264
|
+
// axiosGetStub.resetBehavior();
|
|
265
|
+
// axiosGetStub.resolves(someResp);
|
|
266
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), () => null, false);
|
|
267
|
+
//
|
|
268
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
269
|
+
//
|
|
270
|
+
// p._supportedCoins[0].coin.latinName.should.be.equal(testCase.expectedName);
|
|
271
|
+
// });
|
|
272
|
+
// });
|
|
273
|
+
// });
|
|
274
|
+
//
|
|
275
|
+
// it("Should construct coins with null protocol and ticker===<uppercase code> if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and code and network are equal for item", async () => {
|
|
276
|
+
// const someResp = {
|
|
277
|
+
// data: [
|
|
278
|
+
// {
|
|
279
|
+
// code: "bbb",
|
|
280
|
+
// network: "bbb",
|
|
281
|
+
// },
|
|
282
|
+
// ],
|
|
283
|
+
// };
|
|
284
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
285
|
+
// _customCoinBuilderStub.onFirstCall().returns(null);
|
|
286
|
+
//
|
|
287
|
+
// axiosGetStub.resetBehavior();
|
|
288
|
+
// axiosGetStub.resolves(someResp);
|
|
289
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, false);
|
|
290
|
+
//
|
|
291
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
292
|
+
//
|
|
293
|
+
// p._supportedCoins[0].coin.ticker.should.be.equal("BBB");
|
|
294
|
+
// (p._supportedCoins[0].coin.protocol === null).should.be.true();
|
|
295
|
+
// });
|
|
296
|
+
//
|
|
297
|
+
// it("Should construct coins ticker===<uppercasecodeProtocol> and protocol with name===<uppercasenetwork> if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and code and network are nopt equal for item", async () => {
|
|
298
|
+
// const someResp = {
|
|
299
|
+
// data: [
|
|
300
|
+
// {
|
|
301
|
+
// code: "bbb",
|
|
302
|
+
// network: "bbb1",
|
|
303
|
+
// },
|
|
304
|
+
// ],
|
|
305
|
+
// };
|
|
306
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
307
|
+
// _customCoinBuilderStub.onFirstCall().returns(null);
|
|
308
|
+
//
|
|
309
|
+
// axiosGetStub.resetBehavior();
|
|
310
|
+
// axiosGetStub.resolves(someResp);
|
|
311
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, false);
|
|
312
|
+
//
|
|
313
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
314
|
+
//
|
|
315
|
+
// p._supportedCoins[0].coin.ticker.should.be.equal("BBBBBB1");
|
|
316
|
+
// p._supportedCoins[0].coin.protocol.should.be.deepEqual(new Protocol("BBB1"));
|
|
317
|
+
// });
|
|
318
|
+
//
|
|
319
|
+
// it("Should construct coins with tokenAddress === null if _customCoinBuilder return null for item and useRestrictedCoinsSet is false and contractAddress is nullish for item", async () => {
|
|
320
|
+
// const someResp = {
|
|
321
|
+
// data: [
|
|
322
|
+
// {
|
|
323
|
+
// code: "bbb",
|
|
324
|
+
// network: "bbb1",
|
|
325
|
+
// },
|
|
326
|
+
// ],
|
|
327
|
+
// };
|
|
328
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
329
|
+
// _customCoinBuilderStub.onFirstCall().returns(null);
|
|
330
|
+
//
|
|
331
|
+
// axiosGetStub.resetBehavior();
|
|
332
|
+
// axiosGetStub.resolves(someResp);
|
|
333
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, false);
|
|
334
|
+
//
|
|
335
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
336
|
+
//
|
|
337
|
+
// (p._supportedCoins[0].coin.tokenAddress === null).should.be.true();
|
|
338
|
+
// });
|
|
339
|
+
//
|
|
340
|
+
// const setupAndExecstoreCoinDataFormatTest = async attribute => {
|
|
341
|
+
// const someResp = {
|
|
342
|
+
// data: [
|
|
343
|
+
// {
|
|
344
|
+
// code: "aaa",
|
|
345
|
+
// network: "aaa",
|
|
346
|
+
// hasExtraId: false,
|
|
347
|
+
// extraIdName: "",
|
|
348
|
+
// popular: false,
|
|
349
|
+
// iconURL: "/aaa",
|
|
350
|
+
// deposit: true,
|
|
351
|
+
// withdrawal: true,
|
|
352
|
+
// validationRegexp: "any",
|
|
353
|
+
// },
|
|
354
|
+
// {
|
|
355
|
+
// code: "bbb",
|
|
356
|
+
// network: "bbb1",
|
|
357
|
+
// hasExtraId: false,
|
|
358
|
+
// extraIdName: "",
|
|
359
|
+
// iconURL: "/bbb/bbb1.svg",
|
|
360
|
+
// deposit: false,
|
|
361
|
+
// withdrawal: false,
|
|
362
|
+
// validationRegexp: "any",
|
|
363
|
+
// },
|
|
364
|
+
// {
|
|
365
|
+
// code: "ccc",
|
|
366
|
+
// network: "n3",
|
|
367
|
+
// hasExtraId: true,
|
|
368
|
+
// extraIdName: "",
|
|
369
|
+
// popular: false,
|
|
370
|
+
// iconURL: "/1/ccc.jpg",
|
|
371
|
+
// deposit: true,
|
|
372
|
+
// withdrawal: false,
|
|
373
|
+
// },
|
|
374
|
+
// {
|
|
375
|
+
// code: "ddd",
|
|
376
|
+
// network: "n4",
|
|
377
|
+
// hasExtraId: true,
|
|
378
|
+
// extraIdName: "MEMO",
|
|
379
|
+
// popular: false,
|
|
380
|
+
// deposit: false,
|
|
381
|
+
// withdrawal: true,
|
|
382
|
+
// validationRegexp: "any",
|
|
383
|
+
// },
|
|
384
|
+
// ],
|
|
385
|
+
// };
|
|
386
|
+
//
|
|
387
|
+
// const _customCoinBuilderStub = sinon.stub();
|
|
388
|
+
// _customCoinBuilderStub.returns(null);
|
|
389
|
+
// // _customCoinBuilderStub.onCall(1).returns({ ticker: "CCCN3" });
|
|
390
|
+
//
|
|
391
|
+
// axiosGetStub.resetBehavior();
|
|
392
|
+
// axiosGetStub.resolves(someResp);
|
|
393
|
+
// const p = new SwapspaceSwapProvider("/", new Cache(), _customCoinBuilderStub, false);
|
|
394
|
+
//
|
|
395
|
+
// await p._fetchSupportedCurrenciesIfNeeded();
|
|
396
|
+
//
|
|
397
|
+
// return { provider: p, data: someResp.data };
|
|
398
|
+
// };
|
|
399
|
+
//
|
|
400
|
+
// it("Should save constructed coin as a coin list item", async () => {
|
|
401
|
+
// const { provider } = await setupAndExecstoreCoinDataFormatTest();
|
|
402
|
+
//
|
|
403
|
+
// provider._supportedCoins.forEach(i => i.coin.should.be.instanceof(Coin));
|
|
404
|
+
// });
|
|
405
|
+
//
|
|
406
|
+
// it("Should save code as is", async () => {
|
|
407
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
408
|
+
//
|
|
409
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
410
|
+
// dataItem.code.should.be.equal(data[i].code);
|
|
411
|
+
// });
|
|
412
|
+
// });
|
|
413
|
+
//
|
|
414
|
+
// it("Should save network as is", async () => {
|
|
415
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
416
|
+
//
|
|
417
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
418
|
+
// dataItem.network.should.be.equal(data[i].network);
|
|
419
|
+
// });
|
|
420
|
+
// });
|
|
421
|
+
//
|
|
422
|
+
// it("Should save hasExtraId as is", async () => {
|
|
423
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
424
|
+
//
|
|
425
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
426
|
+
// dataItem.hasExtraId.should.be.equal(data[i].hasExtraId);
|
|
427
|
+
// });
|
|
428
|
+
// });
|
|
429
|
+
//
|
|
430
|
+
// it("Should save extraIdName as is", async () => {
|
|
431
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
432
|
+
//
|
|
433
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
434
|
+
// dataItem.extraIdName.should.be.equal(data[i].extraIdName);
|
|
435
|
+
// });
|
|
436
|
+
// });
|
|
437
|
+
//
|
|
438
|
+
// it("Should save popular to isPopular as boolean", async () => {
|
|
439
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
440
|
+
//
|
|
441
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
442
|
+
// dataItem.isPopular.should.be.equal(data[i].popular ? 1 : 0);
|
|
443
|
+
// });
|
|
444
|
+
// });
|
|
445
|
+
//
|
|
446
|
+
// it("Should save icon or default URL to iconURL", async () => {
|
|
447
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
448
|
+
//
|
|
449
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
450
|
+
// dataItem.iconURL.should.be.equal(
|
|
451
|
+
// data[i].icon
|
|
452
|
+
// ? `https://storage.swapspace.co${data[i].iconURL}`
|
|
453
|
+
// : "https://rabbit.io/asset-icons/fallback.svg"
|
|
454
|
+
// );
|
|
455
|
+
// });
|
|
456
|
+
// });
|
|
457
|
+
//
|
|
458
|
+
// it("Should save deposit as is", async () => {
|
|
459
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
460
|
+
//
|
|
461
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
462
|
+
// dataItem.deposit.should.be.equal(data[i].deposit);
|
|
463
|
+
// });
|
|
464
|
+
// });
|
|
465
|
+
//
|
|
466
|
+
// it("Should save withdrawal as is", async () => {
|
|
467
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
468
|
+
//
|
|
469
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
470
|
+
// dataItem.withdrawal.should.be.equal(data[i].withdrawal);
|
|
471
|
+
// });
|
|
472
|
+
// });
|
|
473
|
+
//
|
|
474
|
+
// it("Should save validationRegexp or null if it is nullish", async () => {
|
|
475
|
+
// const { provider, data } = await setupAndExecstoreCoinDataFormatTest();
|
|
476
|
+
//
|
|
477
|
+
// provider._supportedCoins.forEach((dataItem, i) => {
|
|
478
|
+
// (dataItem.validationRegexp === (data[i].validationRegexp ?? null)).should.be.true();
|
|
479
|
+
// });
|
|
480
|
+
// });
|
|
481
|
+
//
|
|
482
|
+
// it("should sort list by isPopular and alphabetically by ticker", async () => {
|
|
483
|
+
// const swapspaceProvider = new SwapspaceSwapProvider("/", new Cache(), () => null, false);
|
|
484
|
+
// const fakeResponse = {
|
|
485
|
+
// data: [
|
|
486
|
+
// {
|
|
487
|
+
// network: "eth",
|
|
488
|
+
// code: "eth",
|
|
489
|
+
// popular: true,
|
|
490
|
+
// },
|
|
491
|
+
// {
|
|
492
|
+
// network: "bac",
|
|
493
|
+
// code: "bac",
|
|
494
|
+
// popular: false,
|
|
495
|
+
// },
|
|
496
|
+
// {
|
|
497
|
+
// network: "bbb",
|
|
498
|
+
// code: "btc",
|
|
499
|
+
// popular: false,
|
|
500
|
+
// },
|
|
501
|
+
// {
|
|
502
|
+
// network: "eee",
|
|
503
|
+
// code: "aaa",
|
|
504
|
+
// popular: false,
|
|
505
|
+
// },
|
|
506
|
+
// {
|
|
507
|
+
// network: "xxx",
|
|
508
|
+
// code: "aaa",
|
|
509
|
+
// popular: true,
|
|
510
|
+
// },
|
|
511
|
+
// ],
|
|
512
|
+
// };
|
|
513
|
+
// axiosGetStub.returns(Promise.resolve(fakeResponse));
|
|
514
|
+
//
|
|
515
|
+
// await swapspaceProvider._fetchSupportedCurrenciesIfNeeded();
|
|
516
|
+
//
|
|
517
|
+
// swapspaceProvider._supportedCoins
|
|
518
|
+
// .map(coin => coin.coin.ticker)
|
|
519
|
+
// .should.be.deepEqual(["ETH", "AAAXXX", "AAAEEE", "BAC", "BTCBBB"]);
|
|
520
|
+
// });
|
|
521
|
+
//
|
|
522
|
+
// it("should handle empty response data", async () => {
|
|
523
|
+
// const fakeResponse = { data: null };
|
|
524
|
+
// axiosGetStub.returns(Promise.resolve(fakeResponse));
|
|
525
|
+
//
|
|
526
|
+
// await swapspaceProvider._fetchSupportedCurrenciesIfNeeded();
|
|
527
|
+
//
|
|
528
|
+
// swapspaceProvider._supportedCoins.should.deepEqual([]);
|
|
529
|
+
// });
|
|
530
|
+
//
|
|
531
|
+
// it("should handle absence of data field in response", async () => {
|
|
532
|
+
// const fakeResponse = {};
|
|
533
|
+
// axiosGetStub.returns(Promise.resolve(fakeResponse));
|
|
534
|
+
//
|
|
535
|
+
// await swapspaceProvider._fetchSupportedCurrenciesIfNeeded();
|
|
536
|
+
// swapspaceProvider._supportedCoins.should.deepEqual([]);
|
|
537
|
+
// });
|
|
537
538
|
});
|
|
538
539
|
});
|