@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
package/dist/index.umd.js
CHANGED
|
@@ -4262,7 +4262,7 @@
|
|
|
4262
4262
|
className: s$a["requested-amount-fiat"] + (interactedWith ? " " + s$a["interacted"] : "")
|
|
4263
4263
|
}, interactedWith ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4264
4264
|
className: s$a["requested-amount-fiat-currency"]
|
|
4265
|
-
}, (estimateAmount ? "~ " : "") + fiatCurrencyCode), !isLoading && cryptoAssetToFiatRate ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4265
|
+
}, (estimateAmount ? "~ " : "") + fiatCurrencyCode), !isLoading && cryptoAssetToFiatRate != null ? /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4266
4266
|
type: "text",
|
|
4267
4267
|
inputMode: "decimal",
|
|
4268
4268
|
className: s$a["requested-amount-fiat-input"],
|
|
@@ -4684,11 +4684,10 @@
|
|
|
4684
4684
|
* @param {boolean} [props.formHasFiat] - Indicates if the form supports fiat currency.
|
|
4685
4685
|
* @param {string|null} [props.termsOfUseUrl] - Terms of use URL, shown only if both terms & privacy policy passed.
|
|
4686
4686
|
* @param {string|null} [props.privacyPolicyUrl] - Privacy policy of use URL, shown only if both terms & privacy policy passed.
|
|
4687
|
-
* @param {string} props.recipientAddressExtraIdName - Extra ID name for the recipient address.
|
|
4688
|
-
* @param {string} props.refundAddressExtraIdName - Extra ID name for the refund address.
|
|
4689
4687
|
* @param {object} [props.translations] - Object containing translations, default English texts will be used if omitted.
|
|
4690
4688
|
* @param {string} props.swapSeparatorIconSrc - Source URL for the swap separator icon.
|
|
4691
4689
|
* @param {boolean} props.swapButtonAlwaysActive - Setting that allows the form state to proceed to the next step regardless of validity.
|
|
4690
|
+
* @param {getExtraIdNameByTicker} props.getExtraIdNameByTicker - Function returning extraId name for asset
|
|
4692
4691
|
* @param {validateAddressByTicker} [props.validateAddressByTicker] - Function validating address
|
|
4693
4692
|
* @param {onIsFixedChange} [props.onIsFixedChange] - callback for changed isFixed
|
|
4694
4693
|
* @return {JSX.Element} Rendered SwapForm component.
|
|
@@ -4833,6 +4832,9 @@
|
|
|
4833
4832
|
} : _ref$translations;
|
|
4834
4833
|
var DETAIL_REFRESH_INTERVAL_MS = 1.5 * 60000;
|
|
4835
4834
|
var IS_FIXED_BY_DEFAULT = false;
|
|
4835
|
+
|
|
4836
|
+
// Setting up an asyncronyous states, which can change during the function execution.
|
|
4837
|
+
// This is done so that we can cancel the calculation update in case the selected asset changes.
|
|
4836
4838
|
var _useReferredState = useReferredState(null),
|
|
4837
4839
|
sendingAssetTickerReferred = _useReferredState[0],
|
|
4838
4840
|
setSendingAssetTickerReferred = _useReferredState[1];
|
|
@@ -5106,18 +5108,23 @@
|
|
|
5106
5108
|
setIsSameCoins(false);
|
|
5107
5109
|
setIsPairSupported(true);
|
|
5108
5110
|
setIsSwapCalculated(false);
|
|
5111
|
+
|
|
5112
|
+
// Saving the selected coins at the moment, so we can cancel
|
|
5113
|
+
// the processing if they get changed during the loading.
|
|
5109
5114
|
var currentSendingAssetTicker = sendingAssetTicker;
|
|
5110
5115
|
var currentReceivingAssetTicker = receivingAssetTicker;
|
|
5111
5116
|
return Promise.resolve(retrieveSwapDetails(currentSendingAssetTicker, currentReceivingAssetTicker, amount, isSwapAll.current, (_isFixedRate$current = isFixedRate.current) != null ? _isFixedRate$current : IS_FIXED_BY_DEFAULT, isFixedRate.current ? isLastEditedReceiving.current : false)).then(function (response) {
|
|
5112
5117
|
if (currentSendingAssetTicker !== sendingAssetTickerReferred.current || currentReceivingAssetTicker !== receivingAssetTickerReferred.current) {
|
|
5118
|
+
// Cancelling the further processing in case the
|
|
5119
|
+
// selected coins were changed during the loading.
|
|
5113
5120
|
return;
|
|
5114
5121
|
}
|
|
5115
5122
|
if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null && receiveAssetAmount.current == null ? preservedAmount : isFixedRate.current && isLastEditedReceiving.current ? receiveAssetAmount.current : sendAssetAmount.current)) {
|
|
5116
5123
|
// Means amount changed and we no more need to do this exact calculation
|
|
5117
5124
|
return;
|
|
5118
5125
|
}
|
|
5119
|
-
var swapCreationInfo = response == null ? void 0 : response.swapCreationInfo;
|
|
5120
5126
|
if (response.result) {
|
|
5127
|
+
var swapCreationInfo = response == null ? void 0 : response.swapCreationInfo;
|
|
5121
5128
|
if (isSwapAll.current) {
|
|
5122
5129
|
setIsAmountZero(bignumber_js.BigNumber("0").eq(swapCreationInfo.fromAmountCoins));
|
|
5123
5130
|
}
|
|
@@ -5318,6 +5325,8 @@
|
|
|
5318
5325
|
};
|
|
5319
5326
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5320
5327
|
}, [readyToSwap]);
|
|
5328
|
+
|
|
5329
|
+
// TODO: [refactoring, critical] this code looks like a hack related to task_id=6e328d39063142b7b9fa01d497e616da
|
|
5321
5330
|
React.useEffect(function () {
|
|
5322
5331
|
if (triggerDataUpdateResetting) {
|
|
5323
5332
|
clearTimeout(dataUpdateTimeoutId.current);
|
|
@@ -5327,6 +5336,8 @@
|
|
|
5327
5336
|
}
|
|
5328
5337
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5329
5338
|
}, [triggerDataUpdateResetting]);
|
|
5339
|
+
|
|
5340
|
+
// Resets the passed "set value to" param to null, so it can be used multiple times with any value
|
|
5330
5341
|
React.useEffect(function () {
|
|
5331
5342
|
if (!!updateSendInputTo) setUpdateSendInputTo(null);
|
|
5332
5343
|
if (!!updateReceiveInputTo) setUpdateReceiveInputTo(null);
|
|
@@ -5356,12 +5367,10 @@
|
|
|
5356
5367
|
setIsSwapCalculated(false);
|
|
5357
5368
|
};
|
|
5358
5369
|
React.useEffect(function () {
|
|
5359
|
-
if (
|
|
5360
|
-
handleAmountChange(receiveAssetAmount.current === "" ? "0" : receiveAssetAmount.current);
|
|
5370
|
+
if (isLastEditedReceiving.current) handleAmountChange(receiveAssetAmount.current === "" ? "0" : receiveAssetAmount.current);
|
|
5361
5371
|
}, [receiveAssetAmount.current]);
|
|
5362
5372
|
React.useEffect(function () {
|
|
5363
|
-
if (isLastEditedReceiving.current)
|
|
5364
|
-
handleAmountChange(sendAssetAmount.current === "" ? "0" : sendAssetAmount.current);
|
|
5373
|
+
if (!isLastEditedReceiving.current) handleAmountChange(sendAssetAmount.current === "" ? "0" : sendAssetAmount.current);
|
|
5365
5374
|
}, [sendAssetAmount.current]);
|
|
5366
5375
|
var recipientAddressExtraIdName = getExtraIdNameByTicker(receivingAssetTicker);
|
|
5367
5376
|
var refundAddressExtraIdName = getExtraIdNameByTicker(sendingAssetTicker);
|
|
@@ -5579,12 +5588,12 @@
|
|
|
5579
5588
|
formHasFiat: PropTypes.bool,
|
|
5580
5589
|
termsOfUseUrl: PropTypes.oneOfType([PropTypes.string, null]),
|
|
5581
5590
|
privacyPolicyUrl: PropTypes.oneOfType([PropTypes.string, null]),
|
|
5582
|
-
|
|
5583
|
-
refundAddressExtraIdName: PropTypes.string,
|
|
5591
|
+
getExtraIdNameByTicker: PropTypes.func,
|
|
5584
5592
|
translations: PropTypes.object,
|
|
5585
5593
|
validateAddressByTicker: PropTypes.func,
|
|
5586
5594
|
swapSeparatorIconSrc: PropTypes.string.isRequired,
|
|
5587
|
-
swapButtonAlwaysActive: PropTypes.bool
|
|
5595
|
+
swapButtonAlwaysActive: PropTypes.bool,
|
|
5596
|
+
onIsFixedChange: PropTypes.func
|
|
5588
5597
|
};
|
|
5589
5598
|
SwapForm.defaultProps = {
|
|
5590
5599
|
sendingAssetDecimalCount: AmountUtils.significantDecimalCount,
|
|
@@ -5617,10 +5626,14 @@
|
|
|
5617
5626
|
formHasFiat: true,
|
|
5618
5627
|
termsOfUseUrl: null,
|
|
5619
5628
|
privacyPolicyUrl: null,
|
|
5629
|
+
getExtraIdNameByTicker: function getExtraIdNameByTicker(ticker) {
|
|
5630
|
+
return null;
|
|
5631
|
+
},
|
|
5620
5632
|
validateAddressByTicker: function validateAddressByTicker(ticker) {
|
|
5621
5633
|
return false;
|
|
5622
5634
|
},
|
|
5623
|
-
swapButtonAlwaysActive: false
|
|
5635
|
+
swapButtonAlwaysActive: false,
|
|
5636
|
+
onIsFixedChange: function onIsFixedChange() {}
|
|
5624
5637
|
};
|
|
5625
5638
|
|
|
5626
5639
|
/**
|
|
@@ -5662,11 +5675,6 @@
|
|
|
5662
5675
|
* QrCode component renders a QR code for a provided crypto address.
|
|
5663
5676
|
*
|
|
5664
5677
|
* @component
|
|
5665
|
-
* @example
|
|
5666
|
-
* const address = "0x123456789abcdef";
|
|
5667
|
-
* const fill = true;
|
|
5668
|
-
* return <QrCode address={address} fill={fill} />;
|
|
5669
|
-
*
|
|
5670
5678
|
* @param {Object} props - The props for the component.
|
|
5671
5679
|
* @param {string} props.address - The crypto address to generate the QR code for.
|
|
5672
5680
|
* @param {boolean} [props.fill=false] - If true, applies additional CSS class to fill the container.
|
|
@@ -5720,7 +5728,6 @@
|
|
|
5720
5728
|
fill: PropTypes.bool
|
|
5721
5729
|
};
|
|
5722
5730
|
QrCode.defaultProps = {
|
|
5723
|
-
address: "",
|
|
5724
5731
|
fill: false
|
|
5725
5732
|
};
|
|
5726
5733
|
|
|
@@ -9546,6 +9553,60 @@
|
|
|
9546
9553
|
}();
|
|
9547
9554
|
IpAddressProvider.externalIPAddressAPICaller = new CachedRobustExternalApiCallerService("externalIPAddressAPICaller", new Cache(EventBusInstance__default["default"]), [new BigdatacloudIpAddressProvider(), new TrackipIpAddressProvider(), new IpifyV6IpAddressProvider(), new IpifyIpAddressProvider(), new WhatismyipaddressIpAddressProvider()], 300000);
|
|
9548
9555
|
|
|
9556
|
+
var GoogleAnalyticsAdapter = /*#__PURE__*/function () {
|
|
9557
|
+
function GoogleAnalyticsAdapter() {}
|
|
9558
|
+
GoogleAnalyticsAdapter.sendEvent = function sendEvent(eventName, parameters) {
|
|
9559
|
+
console.log("Sending ga event: ", parameters, ["event", eventName, parameters]);
|
|
9560
|
+
this.doActionOnGTag(["event", eventName, parameters]);
|
|
9561
|
+
};
|
|
9562
|
+
GoogleAnalyticsAdapter.doActionOnGTag = function doActionOnGTag(parameters) {
|
|
9563
|
+
try {
|
|
9564
|
+
if (window.gtag) {
|
|
9565
|
+
var _window;
|
|
9566
|
+
(_window = window).gtag.apply(_window, parameters);
|
|
9567
|
+
} else {
|
|
9568
|
+
Logger.logError(null, "doActionOnGTag", "No gtag found");
|
|
9569
|
+
}
|
|
9570
|
+
} catch (e) {
|
|
9571
|
+
Logger.logError(e, "doActionOnGTag", "Failed to do gtag action: " + safeStringify(parameters));
|
|
9572
|
+
}
|
|
9573
|
+
};
|
|
9574
|
+
return GoogleAnalyticsAdapter;
|
|
9575
|
+
}();
|
|
9576
|
+
|
|
9577
|
+
var MixpanelAdapter = /*#__PURE__*/function () {
|
|
9578
|
+
function MixpanelAdapter() {}
|
|
9579
|
+
MixpanelAdapter.sendEvent = function sendEvent(eventName, parameters) {
|
|
9580
|
+
try {
|
|
9581
|
+
if (window.mixpanel) {
|
|
9582
|
+
var result = window.mixpanel.track(eventName, parameters);
|
|
9583
|
+
// eslint-disable-next-line no-console
|
|
9584
|
+
console.log("Mixpanel sendEvent result: " + result);
|
|
9585
|
+
} else {
|
|
9586
|
+
Logger.logError(null, "sendEvent", "No mixpanel found");
|
|
9587
|
+
}
|
|
9588
|
+
} catch (e) {
|
|
9589
|
+
Logger.logError(e, "sendEvent", "Failed to do mixpanel action: " + eventName + " - " + safeStringify(parameters));
|
|
9590
|
+
}
|
|
9591
|
+
};
|
|
9592
|
+
MixpanelAdapter.identify = function identify(uniqueId) {
|
|
9593
|
+
try {
|
|
9594
|
+
if (window.mixpanel) {
|
|
9595
|
+
if (uniqueId) {
|
|
9596
|
+
var result = window.mixpanel.identify(uniqueId);
|
|
9597
|
+
// eslint-disable-next-line no-console
|
|
9598
|
+
console.log("Mixpanel identify result: " + result);
|
|
9599
|
+
}
|
|
9600
|
+
} else {
|
|
9601
|
+
Logger.logError(null, "identify", "No mixpanel found");
|
|
9602
|
+
}
|
|
9603
|
+
} catch (e) {
|
|
9604
|
+
Logger.logError(e, "identify", "Failed to identify.");
|
|
9605
|
+
}
|
|
9606
|
+
};
|
|
9607
|
+
return MixpanelAdapter;
|
|
9608
|
+
}();
|
|
9609
|
+
|
|
9549
9610
|
/**
|
|
9550
9611
|
* Utils class needed to perform cancelling of axios request inside some process.
|
|
9551
9612
|
* Provides cancel state and axios token for HTTP requests
|
|
@@ -9713,7 +9774,26 @@
|
|
|
9713
9774
|
this.isRefundAddressRequired = isRefundAddressRequired;
|
|
9714
9775
|
};
|
|
9715
9776
|
|
|
9716
|
-
|
|
9777
|
+
/**
|
|
9778
|
+
* Coin construction rules:
|
|
9779
|
+
* 1. ticker should be CODEPROTOCOL_CODE e.g. USDTERC20
|
|
9780
|
+
* 2. name should not contain (PROTOCOL_CODE) or just PROTOCOL_CODe
|
|
9781
|
+
* 3. protocol should be null for coins major for their blockchains like BTC, ETH
|
|
9782
|
+
* 4. isPopular should be a number - the higher -> the more popular
|
|
9783
|
+
*/
|
|
9784
|
+
var SwapProviderCoinInfo = function SwapProviderCoinInfo(coin, code, network, hasExtraId, extraIdName, popularity, iconURL, deposit, withdrawal, validationRegexp, isAvailable) {
|
|
9785
|
+
this.coin = coin;
|
|
9786
|
+
this.code = code;
|
|
9787
|
+
this.network = network;
|
|
9788
|
+
this.hasExtraId = hasExtraId;
|
|
9789
|
+
this.extraIdName = extraIdName;
|
|
9790
|
+
this.isPopular = popularity;
|
|
9791
|
+
this.iconURL = iconURL != null ? iconURL : FALLBACK_ASSET_ICON_URL;
|
|
9792
|
+
this.deposit = deposit != null ? deposit : false;
|
|
9793
|
+
this.withdrawal = withdrawal != null ? withdrawal : false;
|
|
9794
|
+
this.validationRegexp = validationRegexp != null ? validationRegexp : null;
|
|
9795
|
+
this.isAvailable = isAvailable != null ? isAvailable : true;
|
|
9796
|
+
};
|
|
9717
9797
|
|
|
9718
9798
|
function _catch$4(body, recover) {
|
|
9719
9799
|
try {
|
|
@@ -9725,7 +9805,10 @@
|
|
|
9725
9805
|
return result.then(void 0, recover);
|
|
9726
9806
|
}
|
|
9727
9807
|
return result;
|
|
9728
|
-
}
|
|
9808
|
+
} // TODO: [refactoring, moderate] extract structure of _supportedCoins into model class
|
|
9809
|
+
var PRE_LISTED_COINS = [new SwapProviderCoinInfo(new Coin("Hamster Kombat", "HMSTRTON", "HMSTR", 18, null, "", null, null, 1, null, [], 60000, null, new Protocol("TON"), null, false), "HMSTR", "TON", true, "MEMO", 100, "https://rabbit.io/asset-icons/HMSTR.png",
|
|
9810
|
+
// "https://hamsterkombat.io/images/icons/hamster-coin.png"
|
|
9811
|
+
true, true, "^(EQ|UQ)[A-Za-z0-9-_]{46}$", false)];
|
|
9729
9812
|
var SwapProvider = /*#__PURE__*/function () {
|
|
9730
9813
|
function SwapProvider(cache, customCoinBuilder, useRestrictedCoinsSet) {
|
|
9731
9814
|
if (customCoinBuilder === void 0) {
|
|
@@ -9769,7 +9852,7 @@
|
|
|
9769
9852
|
* @private
|
|
9770
9853
|
*/;
|
|
9771
9854
|
_proto._putPopularCoinsFirst = function _putPopularCoinsFirst() {
|
|
9772
|
-
var popularCoinsList = ["BTC", "ETH", "USDTERC20", "USDTTRC20", "USDCERC20", "XRP", "TON", "XMR", "TRX", "DAIERC20", "DOGE", "BNB", "PEPEERC20", "NOTTON", "SOL", "DOT", "LTC", "SHIBERC20", "AVAX", "UNIERC20", "LINKERC20", "MATIC", "BUSDBEP20", "AAVEERC20", "ATOM", "RUNE", "ADA"];
|
|
9855
|
+
var popularCoinsList = ["HMSTRTON", "BTC", "ETH", "USDTERC20", "USDTTRC20", "USDCERC20", "XRP", "TON", "XMR", "TRX", "DAIERC20", "DOGE", "BNB", "PEPEERC20", "NOTTON", "SOL", "DOT", "LTC", "SHIBERC20", "AVAX", "UNIERC20", "LINKERC20", "MATIC", "BUSDBEP20", "AAVEERC20", "ATOM", "RUNE", "ADA"];
|
|
9773
9856
|
this._supportedCoins.sort(function (i1, i2) {
|
|
9774
9857
|
var isInPopularList1 = popularCoinsList.includes(i1.coin.ticker);
|
|
9775
9858
|
var isInPopularList2 = popularCoinsList.includes(i2.coin.ticker);
|
|
@@ -9797,18 +9880,21 @@
|
|
|
9797
9880
|
|
|
9798
9881
|
/**
|
|
9799
9882
|
* Should fill _supportedCoins with array of coins.
|
|
9800
|
-
* Coin construction rules:
|
|
9801
|
-
* 1. ticker should be CODEPROTOCOL_CODE e.g. USDTERC20
|
|
9802
|
-
* 2. name should not contain (PROTOCOL_CODE) or just PROTOCOL_CODe
|
|
9803
|
-
* 3. protocol should be null for coins major for their blockchains like BTC, ETH
|
|
9804
|
-
* 4. isPopular should be a number
|
|
9805
9883
|
*
|
|
9806
9884
|
* @return {Promise<void>}
|
|
9807
9885
|
* @private
|
|
9808
9886
|
*/;
|
|
9809
9887
|
_proto._fetchSupportedCurrenciesIfNeeded = function _fetchSupportedCurrenciesIfNeeded() {
|
|
9810
9888
|
try {
|
|
9811
|
-
|
|
9889
|
+
var _this2 = this;
|
|
9890
|
+
PRE_LISTED_COINS.forEach(function (preListedCoin) {
|
|
9891
|
+
if (!_this2._supportedCoins.find(function (existingCoin) {
|
|
9892
|
+
return preListedCoin.coin.ticker === existingCoin.coin.ticker;
|
|
9893
|
+
})) {
|
|
9894
|
+
_this2._supportedCoins.push(preListedCoin);
|
|
9895
|
+
}
|
|
9896
|
+
});
|
|
9897
|
+
return Promise.resolve();
|
|
9812
9898
|
} catch (e) {
|
|
9813
9899
|
return Promise.reject(e);
|
|
9814
9900
|
}
|
|
@@ -9822,15 +9908,15 @@
|
|
|
9822
9908
|
;
|
|
9823
9909
|
_proto.getAllSupportedCurrencies = function getAllSupportedCurrencies() {
|
|
9824
9910
|
try {
|
|
9825
|
-
var
|
|
9911
|
+
var _this3 = this;
|
|
9826
9912
|
var loggerSource = "getAllSupportedCurrencies";
|
|
9827
9913
|
return Promise.resolve(_catch$4(function () {
|
|
9828
|
-
return Promise.resolve(
|
|
9829
|
-
var
|
|
9830
|
-
Logger.log("We have " + ((
|
|
9914
|
+
return Promise.resolve(_this3._fetchSupportedCurrenciesIfNeeded()).then(function () {
|
|
9915
|
+
var _this3$_supportedCoin;
|
|
9916
|
+
Logger.log("We have " + ((_this3$_supportedCoin = _this3._supportedCoins) == null ? void 0 : _this3$_supportedCoin.length) + " supported coins returning", loggerSource);
|
|
9831
9917
|
return {
|
|
9832
9918
|
result: true,
|
|
9833
|
-
coins:
|
|
9919
|
+
coins: _this3._supportedCoins.map(function (item) {
|
|
9834
9920
|
return item.coin;
|
|
9835
9921
|
})
|
|
9836
9922
|
};
|
|
@@ -9858,15 +9944,15 @@
|
|
|
9858
9944
|
;
|
|
9859
9945
|
_proto.getDepositCurrencies = function getDepositCurrencies() {
|
|
9860
9946
|
try {
|
|
9861
|
-
var
|
|
9947
|
+
var _this4 = this;
|
|
9862
9948
|
var loggerSource = "getDepositCurrencies";
|
|
9863
9949
|
return Promise.resolve(_catch$4(function () {
|
|
9864
|
-
return Promise.resolve(
|
|
9865
|
-
var
|
|
9866
|
-
Logger.log("We have " + ((
|
|
9950
|
+
return Promise.resolve(_this4._fetchSupportedCurrenciesIfNeeded()).then(function () {
|
|
9951
|
+
var _this4$_supportedCoin;
|
|
9952
|
+
Logger.log("We have " + ((_this4$_supportedCoin = _this4._supportedCoins) == null ? void 0 : _this4$_supportedCoin.length) + " supported coins, getting depositable", loggerSource);
|
|
9867
9953
|
return {
|
|
9868
9954
|
result: true,
|
|
9869
|
-
coins:
|
|
9955
|
+
coins: _this4._supportedCoins.filter(function (item) {
|
|
9870
9956
|
return item.deposit;
|
|
9871
9957
|
}).map(function (item) {
|
|
9872
9958
|
return item.coin;
|
|
@@ -9900,15 +9986,15 @@
|
|
|
9900
9986
|
exceptCurrency = null;
|
|
9901
9987
|
}
|
|
9902
9988
|
try {
|
|
9903
|
-
var
|
|
9989
|
+
var _this5 = this;
|
|
9904
9990
|
var loggerSource = "getWithdrawalCurrencies";
|
|
9905
9991
|
return Promise.resolve(_catch$4(function () {
|
|
9906
|
-
return Promise.resolve(
|
|
9907
|
-
var
|
|
9908
|
-
Logger.log("We have " + ((
|
|
9992
|
+
return Promise.resolve(_this5._fetchSupportedCurrenciesIfNeeded()).then(function () {
|
|
9993
|
+
var _this5$_supportedCoin;
|
|
9994
|
+
Logger.log("We have " + ((_this5$_supportedCoin = _this5._supportedCoins) == null ? void 0 : _this5$_supportedCoin.length) + " supported coins, getting withdrawable", loggerSource);
|
|
9909
9995
|
return {
|
|
9910
9996
|
result: true,
|
|
9911
|
-
coins:
|
|
9997
|
+
coins: _this5._supportedCoins.filter(function (item) {
|
|
9912
9998
|
var _item$coin, _exceptCurrency;
|
|
9913
9999
|
return item.withdrawal && (!exceptCurrency || ((_item$coin = item.coin) == null ? void 0 : _item$coin.ticker) !== ((_exceptCurrency = exceptCurrency) == null ? void 0 : _exceptCurrency.ticker));
|
|
9914
10000
|
}).map(function (item) {
|
|
@@ -9965,21 +10051,21 @@
|
|
|
9965
10051
|
*/;
|
|
9966
10052
|
_proto.getCoinToUSDTRate = function getCoinToUSDTRate(coin) {
|
|
9967
10053
|
try {
|
|
9968
|
-
var
|
|
10054
|
+
var _this6 = this;
|
|
9969
10055
|
var loggerSource = "getCoinToUSDTRate";
|
|
9970
10056
|
return Promise.resolve(_catch$4(function () {
|
|
9971
|
-
return coin ? Promise.resolve(
|
|
9972
|
-
var
|
|
10057
|
+
return coin ? Promise.resolve(_this6._fetchSupportedCurrenciesIfNeeded()).then(function () {
|
|
10058
|
+
var _this6$_supportedCoin;
|
|
9973
10059
|
// Using USDT TRC20 as usually fee in this network is smaller than ERC20 and this network is widely used for USDT
|
|
9974
|
-
var usdtTrc20 = (
|
|
10060
|
+
var usdtTrc20 = (_this6$_supportedCoin = _this6._supportedCoins.find(function (i) {
|
|
9975
10061
|
return i.coin.ticker === "USDTTRC20";
|
|
9976
|
-
})) == null ? void 0 :
|
|
10062
|
+
})) == null ? void 0 : _this6$_supportedCoin.coin;
|
|
9977
10063
|
if (!usdtTrc20) {
|
|
9978
10064
|
return {
|
|
9979
10065
|
result: false
|
|
9980
10066
|
};
|
|
9981
10067
|
}
|
|
9982
|
-
var cached =
|
|
10068
|
+
var cached = _this6._cache.get("swapspace_usdt_rate_" + coin.ticker);
|
|
9983
10069
|
if (cached != null) {
|
|
9984
10070
|
return {
|
|
9985
10071
|
result: true,
|
|
@@ -9987,7 +10073,7 @@
|
|
|
9987
10073
|
};
|
|
9988
10074
|
}
|
|
9989
10075
|
Logger.log("Loading USDT->coin rate as not found in cache:", coin == null ? void 0 : coin.ticker);
|
|
9990
|
-
return Promise.resolve(
|
|
10076
|
+
return Promise.resolve(_this6.getSwapInfo(usdtTrc20, coin, "5000", false)).then(function (result) {
|
|
9991
10077
|
if (!result.result) {
|
|
9992
10078
|
return {
|
|
9993
10079
|
result: false
|
|
@@ -9997,7 +10083,7 @@
|
|
|
9997
10083
|
// This calculation is not precise as we cannot recognize the actual fee and network fee. Just approximate.
|
|
9998
10084
|
var standardSwapspaceFeeMultiplier = 1.004; // fee is usually 0.4%
|
|
9999
10085
|
var rate = bignumber_js.BigNumber(1).div(bignumber_js.BigNumber(result.rate).times(standardSwapspaceFeeMultiplier)).toString();
|
|
10000
|
-
|
|
10086
|
+
_this6._cache.put("swap_usdt_rate_" + coin.ticker, rate, 15 * 60000 // 15 minutes
|
|
10001
10087
|
);
|
|
10002
10088
|
return {
|
|
10003
10089
|
result: true,
|
|
@@ -10294,23 +10380,12 @@
|
|
|
10294
10380
|
}
|
|
10295
10381
|
if (coin) {
|
|
10296
10382
|
var _item$deposit, _item$withdrawal, _item$validationRegex;
|
|
10297
|
-
return
|
|
10298
|
-
coin: coin,
|
|
10299
|
-
code: item.code,
|
|
10300
|
-
network: item.network,
|
|
10301
|
-
hasExtraId: item.hasExtraId,
|
|
10302
|
-
extraIdName: item.extraIdName,
|
|
10303
|
-
isPopular: item.popular ? 1 : 0,
|
|
10304
|
-
iconURL: item.icon ? "https://storage.swapspace.co" + item.icon : FALLBACK_ASSET_ICON_URL,
|
|
10305
|
-
deposit: (_item$deposit = item.deposit) != null ? _item$deposit : false,
|
|
10306
|
-
withdrawal: (_item$withdrawal = item.withdrawal) != null ? _item$withdrawal : false,
|
|
10307
|
-
validationRegexp: (_item$validationRegex = item.validationRegexp) != null ? _item$validationRegex : null,
|
|
10308
|
-
isAvailable: true
|
|
10309
|
-
};
|
|
10383
|
+
return new SwapProviderCoinInfo(coin, item.code, item.network, item.hasExtraId, item.extraIdName, item.popular ? 1 : 0, item.icon ? "https://storage.swapspace.co" + item.icon : FALLBACK_ASSET_ICON_URL, (_item$deposit = item.deposit) != null ? _item$deposit : false, (_item$withdrawal = item.withdrawal) != null ? _item$withdrawal : false, (_item$validationRegex = item.validationRegexp) != null ? _item$validationRegex : null, true);
|
|
10310
10384
|
}
|
|
10311
10385
|
return [];
|
|
10312
10386
|
}).flat();
|
|
10313
10387
|
_this2._putPopularCoinsFirst();
|
|
10388
|
+
return Promise.resolve(_SwapProvider.prototype._fetchSupportedCurrenciesIfNeeded.call(_this2)).then(function () {});
|
|
10314
10389
|
});
|
|
10315
10390
|
}
|
|
10316
10391
|
}();
|
|
@@ -10373,7 +10448,7 @@
|
|
|
10373
10448
|
if (!fromCoinSwapspaceDetails || !toCoinSwapspaceDetails) {
|
|
10374
10449
|
throw new Error("Failed to find swapspace coin details for: " + fromCoin.ticker + " -> " + toCoin.ticker);
|
|
10375
10450
|
}
|
|
10376
|
-
return !fromCoinSwapspaceDetails.deposit || !toCoinSwapspaceDetails.withdrawal ? {
|
|
10451
|
+
return !fromCoinSwapspaceDetails.deposit || !toCoinSwapspaceDetails.withdrawal || !fromCoinSwapspaceDetails.isAvailable || !toCoinSwapspaceDetails.isAvailable ? {
|
|
10377
10452
|
result: false,
|
|
10378
10453
|
reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
|
|
10379
10454
|
} : Promise.resolve(axios__default["default"].get(_this4._URL + "/api/v2/amounts?fromCurrency=" + fromCoinSwapspaceDetails.code + "&fromNetwork=" + fromCoinSwapspaceDetails.network + "&toNetwork=" + toCoinSwapspaceDetails.network + "&toCurrency=" + toCoinSwapspaceDetails.code + "&amount=" + amountCoins + "&estimated=false")).then(function (response) {
|
|
@@ -10612,7 +10687,7 @@
|
|
|
10612
10687
|
Logger.log("Returning fail - RPS limit exceeded " + data, loggerSource);
|
|
10613
10688
|
return composeFailResult(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
|
|
10614
10689
|
}
|
|
10615
|
-
var texts422 = ["Pair cannot be processed by", "Currency not found", "Amount maximum is", "Amount minimum is"];
|
|
10690
|
+
var texts422 = ["Pair cannot be processed by", "Currency not found", "Currencies not found", "Amount maximum is", "Amount minimum is"];
|
|
10616
10691
|
var text403 = "IP address is forbidden";
|
|
10617
10692
|
if (typeof data === "string" && (status === 403 && data.includes(text403) || status === 422 && texts422.find(function (text) {
|
|
10618
10693
|
return data.includes(text);
|
|
@@ -11160,27 +11235,17 @@
|
|
|
11160
11235
|
}
|
|
11161
11236
|
if (coin) {
|
|
11162
11237
|
var _networkDetails$extra, _networkDetails$valid;
|
|
11163
|
-
return
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
hasExtraId: !!networkDetails.has_extra,
|
|
11168
|
-
extraIdName: (_networkDetails$extra = networkDetails.extra_name) != null ? _networkDetails$extra : null,
|
|
11169
|
-
isPopular: item.rating || 0,
|
|
11170
|
-
iconURL: item.icon ? item.icon : FALLBACK_ASSET_ICON_URL,
|
|
11171
|
-
deposit: true,
|
|
11172
|
-
// Letsexchange provide no such details
|
|
11173
|
-
withdrawal: true,
|
|
11174
|
-
// Letsexchange provide no such details
|
|
11175
|
-
validationRegexp: (_networkDetails$valid = networkDetails.validation_address_regex) != null ? _networkDetails$valid : null,
|
|
11176
|
-
isAvailable: (typeof item.is_active !== "number" || item.is_active === 1) && (typeof item.disabled !== "number" || item.disabled === 0) && (typeof networkDetails.is_active !== "number" || networkDetails.is_active === 1)
|
|
11177
|
-
};
|
|
11238
|
+
return new SwapProviderCoinInfo(coin, item.code, networkDetails.code, !!networkDetails.has_extra, (_networkDetails$extra = networkDetails.extra_name) != null ? _networkDetails$extra : null, item.rating || 0, item.icon ? item.icon : FALLBACK_ASSET_ICON_URL, true,
|
|
11239
|
+
// Letsexchange provide no such details
|
|
11240
|
+
true, // Letsexchange provide no such details
|
|
11241
|
+
(_networkDetails$valid = networkDetails.validation_address_regex) != null ? _networkDetails$valid : null, (typeof item.is_active !== "number" || item.is_active === 1) && (typeof item.disabled !== "number" || item.disabled === 0) && (typeof networkDetails.is_active !== "number" || networkDetails.is_active === 1));
|
|
11178
11242
|
}
|
|
11179
11243
|
return [];
|
|
11180
11244
|
});
|
|
11181
11245
|
}).flat();
|
|
11182
11246
|
_this2.coinsLastUpdateTimestamp = Date.now();
|
|
11183
11247
|
_this2._putPopularCoinsFirst();
|
|
11248
|
+
return Promise.resolve(_SwapProvider.prototype._fetchSupportedCurrenciesIfNeeded.call(_this2)).then(function () {});
|
|
11184
11249
|
});
|
|
11185
11250
|
}
|
|
11186
11251
|
}();
|
|
@@ -11921,35 +11986,40 @@
|
|
|
11921
11986
|
var _temp5 = function () {
|
|
11922
11987
|
if (result.result && result != null && result.swapId) {
|
|
11923
11988
|
var _temp4 = function _temp4() {
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11989
|
+
return Promise.resolve(GoogleAnalyticsAdapter.sendEvent(PublicSwapService.PUBLIC_SWAP_CREATED_ANALYTICS_EVENT, {
|
|
11990
|
+
coin_amount: result.fromAmount,
|
|
11991
|
+
usd_amount: _fromAmountFiat,
|
|
11992
|
+
fromCoin: fromCoin.ticker,
|
|
11993
|
+
toCoin: toCoin.ticker
|
|
11994
|
+
})).then(function () {
|
|
11995
|
+
var _result$fromCurrencyE;
|
|
11996
|
+
var toReturn = {
|
|
11997
|
+
result: true,
|
|
11998
|
+
swapId: result.swapId,
|
|
11999
|
+
fromCoin: fromCoin,
|
|
12000
|
+
toCoin: toCoin,
|
|
12001
|
+
fromAmount: result.fromAmount,
|
|
12002
|
+
toAmount: result.toAmount,
|
|
12003
|
+
fromAmountFiat: _fromAmountFiat,
|
|
12004
|
+
toAmountFiat: _toAmountFiat,
|
|
12005
|
+
fiatCurrencyCode: "USD",
|
|
12006
|
+
fiatCurrencyDecimals: PublicSwapService._fiatDecimalsCount,
|
|
12007
|
+
rate: result.rate,
|
|
12008
|
+
durationMinutesRange: swapCreationInfo.durationMinutesRange,
|
|
12009
|
+
address: result.fromAddress,
|
|
12010
|
+
// CRITICAL: this is the address to send coins to swaps provider
|
|
12011
|
+
fromCurrencyExtraId: (_result$fromCurrencyE = result.fromCurrencyExtraId) != null ? _result$fromCurrencyE : "",
|
|
12012
|
+
// CRITICAL: this is the extra ID for address to send coins to swaps provider
|
|
12013
|
+
fixed: result.fixed
|
|
12014
|
+
};
|
|
12015
|
+
_this8._savePublicSwapIdLocally(result.swapId);
|
|
12016
|
+
Logger.log("Returning: " + safeStringify(_extends({}, toReturn, {
|
|
12017
|
+
fromCoin: fromCoin == null ? void 0 : fromCoin.ticker,
|
|
12018
|
+
toCoin: toCoin == null ? void 0 : toCoin.ticker
|
|
12019
|
+
})), loggerSource);
|
|
12020
|
+
_exit = 1;
|
|
12021
|
+
return toReturn;
|
|
12022
|
+
});
|
|
11953
12023
|
};
|
|
11954
12024
|
var _fromAmountFiat = null,
|
|
11955
12025
|
_toAmountFiat = null;
|
|
@@ -12223,7 +12293,8 @@
|
|
|
12223
12293
|
};
|
|
12224
12294
|
return PublicSwapService;
|
|
12225
12295
|
}();
|
|
12226
|
-
PublicSwapService.
|
|
12296
|
+
PublicSwapService.PUBLIC_SWAP_CREATED_ANALYTICS_EVENT = "public_swap_created_event";
|
|
12297
|
+
PublicSwapService.PUBLIC_SWAP_SUCCEED_ANALYTICS_EVENT = "public_swap_succeed_event";
|
|
12227
12298
|
PublicSwapService.PUBLIC_SWAPS_COMMON_ERRORS = {
|
|
12228
12299
|
REQUESTS_LIMIT_EXCEEDED: "requestsLimitExceeded"
|
|
12229
12300
|
};
|
|
@@ -12272,6 +12343,7 @@
|
|
|
12272
12343
|
exports.ExternalApiProvider = ExternalApiProvider;
|
|
12273
12344
|
exports.FALLBACK_ASSET_ICON_URL = FALLBACK_ASSET_ICON_URL;
|
|
12274
12345
|
exports.FiatCurrenciesService = FiatCurrenciesService;
|
|
12346
|
+
exports.GoogleAnalyticsAdapter = GoogleAnalyticsAdapter;
|
|
12275
12347
|
exports.ICON_ROTATE_OPTIONS = ICON_ROTATE_OPTIONS;
|
|
12276
12348
|
exports.InformationMessage = InformationMessage;
|
|
12277
12349
|
exports.Input = Input;
|
|
@@ -12283,6 +12355,7 @@
|
|
|
12283
12355
|
exports.LoadingDots = LoadingDots;
|
|
12284
12356
|
exports.Logger = Logger;
|
|
12285
12357
|
exports.LogsStorage = LogsStorage;
|
|
12358
|
+
exports.MixpanelAdapter = MixpanelAdapter;
|
|
12286
12359
|
exports.NoticeIcon = NoticeIcon;
|
|
12287
12360
|
exports.Protocol = Protocol;
|
|
12288
12361
|
exports.PublicSwapService = PublicSwapService;
|