@rabbitio/ui-kit 1.0.0-beta.111 → 1.0.0-beta.113
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/.env +1 -0
- package/.env.example +1 -1
- package/coverage/clover.xml +1686 -1723
- package/coverage/coverage-final.json +118 -118
- package/coverage/index.html +86 -86
- package/coverage/{rabbit-ui-kit → ui-kit}/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/index.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/qrUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/apiGroups.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/emailAPI.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/ipAddressProviders.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/globalConstants.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/blockchain.js.html +6 -6
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/coin.js.html +223 -223
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/protocol.js.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/fiatCurrenciesService.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/amountUtils.js.html +51 -51
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/cache.js.html +8 -8
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/errorUtils.js.html +15 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logger.js.html +24 -24
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/postponeExecution.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/rabbitTicker.js.html +12 -12
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/safeStringify.js.html +29 -29
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cancelProcessing.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalApiProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalServicesStatsCollector.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/robustExternalAPICallerService.js.html +14 -14
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/exolixSwapProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/goexmeSwapProvider.js.html +566 -677
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +29 -29
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +349 -349
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/utils.js.html +16 -16
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwap.js.html +143 -143
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +103 -103
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +16 -16
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/partner.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/swapProviderCoinInfo.js.html +75 -75
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/publicSwapService.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/Input.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/Validation.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useCallHandlingErrors.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useIsHydrated.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useReferredState.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/inputValueProviders.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/searchCoins.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/textUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/uiUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/urlQueryUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/AmountInput.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/CoinPicker.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/ColoredNotice.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LogoCarousel.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/WaitlistSubscription.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/coins.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +3 -3
- package/dist/index.cjs +120 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +36 -71
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +120 -169
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +120 -169
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/swaps-lib/external-apis/goexmeSwapProvider.js +40 -77
- package/src/swaps-lib/models/existingSwap.js +1 -1
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_convertCurrencyMeta.test.js +80 -0
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +50 -123
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/createSwap.test.js +177 -72
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getExistingSwapsDetailsAndStatus.test.js +151 -0
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getSwapInfo.test.js +140 -104
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/helpers.test.js +26 -0
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/PairSupport.int.test.js +31 -60
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/_fetchSupportedCurrenciesIfNeeded.int.test.js +261 -126
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/createSwap.int.test.js +319 -225
- package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/getSwapInfo.int.test.js +137 -127
|
@@ -1,171 +1,306 @@
|
|
|
1
1
|
import "dotenv/config";
|
|
2
|
-
import
|
|
2
|
+
import sinon from "sinon";
|
|
3
|
+
import should from "should";
|
|
4
|
+
import { describe, it, beforeEach, afterEach } from "vitest";
|
|
3
5
|
import axios from "axios";
|
|
6
|
+
|
|
4
7
|
import { Cache } from "../../../../../common-apis/utils/cache.js";
|
|
5
8
|
import { GoexmeSwapProvider } from "../../../../external-apis/goexmeSwapProvider.js";
|
|
9
|
+
import { FALLBACK_ASSET_ICON_URL } from "../../../../../common-apis/globalConstants.jsx";
|
|
6
10
|
|
|
7
11
|
const GOEXME_API_KEY = process.env.GOEXME_API_KEY?.trim?.() || "";
|
|
8
12
|
const maybeDescribe = GOEXME_API_KEY ? describe : describe.skip;
|
|
9
13
|
|
|
10
|
-
maybeDescribe("
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
maybeDescribe("external-apis/goexmeSwapProvider integration", function () {
|
|
15
|
+
describe("_fetchSupportedCurrenciesIfNeeded", function () {
|
|
16
|
+
let provider;
|
|
17
|
+
let axiosGetOriginal;
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
provider = new GoexmeSwapProvider("/", new Cache(), () => null, false, GOEXME_API_KEY);
|
|
21
|
+
axiosGetOriginal = axios.get;
|
|
22
|
+
});
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
afterEach(() => {
|
|
25
|
+
if (axios.get.restore) {
|
|
26
|
+
axios.get.restore();
|
|
27
|
+
} else {
|
|
28
|
+
axios.get = axiosGetOriginal;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
const fetchRawCurrencies = async () => {
|
|
33
|
+
const { data } = await axiosGetOriginal(`${provider._URL}/currencies`, {
|
|
34
|
+
params: { key: GOEXME_API_KEY },
|
|
35
|
+
});
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
it("Should filter out unavailable coins", async () => {
|
|
40
|
+
const raw = await fetchRawCurrencies();
|
|
41
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
42
|
+
|
|
43
|
+
const providerCodes = new Set(provider._supportedCoins.map(c => c.code));
|
|
44
|
+
const unavailableCodes = Object.entries(raw)
|
|
45
|
+
.filter(([, meta]) => meta?.available === false)
|
|
46
|
+
.map(([code]) => code.toUpperCase());
|
|
47
|
+
|
|
48
|
+
unavailableCodes.forEach(code => providerCodes.has(code).should.be.false());
|
|
49
|
+
providerCodes.size.should.be.above(0);
|
|
25
50
|
});
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
51
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
52
|
+
it("Should set hasExtraId and extraIdName correctly", async () => {
|
|
53
|
+
const raw = await fetchRawCurrencies();
|
|
54
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
32
55
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.filter(([, meta]) => meta?.available === false)
|
|
36
|
-
.map(([code]) => code.toUpperCase());
|
|
56
|
+
const infoWithTag = provider._supportedCoins.find(i => i.hasExtraId);
|
|
57
|
+
should.exist(infoWithTag);
|
|
37
58
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
const meta =
|
|
60
|
+
raw[infoWithTag.code] ??
|
|
61
|
+
Object.values(raw).find(m => (m.code ?? m.ticker ?? "").toUpperCase() === infoWithTag.code);
|
|
62
|
+
should.exist(meta);
|
|
63
|
+
(meta.tagname ?? "").trim().should.not.be.empty();
|
|
41
64
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
65
|
+
infoWithTag.extraIdName.should.equal(meta.tagname);
|
|
66
|
+
});
|
|
45
67
|
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
it("Should handle duplicate tickers across networks", async () => {
|
|
69
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
48
70
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Object.values(raw).find(m => (m.code ?? m.ticker ?? "").toUpperCase() === infoWithTag.code);
|
|
52
|
-
expect(meta).toBeDefined();
|
|
53
|
-
expect((meta.tagname ?? "").trim()).not.toBe("");
|
|
71
|
+
const suffixRx = /(ERC20|TRC20|BEP20|BSC|AVALANCHEC|OPTIMISM|SOLANA|ARBITRUM)$/i;
|
|
72
|
+
const grouped = {};
|
|
54
73
|
|
|
55
|
-
|
|
56
|
-
|
|
74
|
+
provider._supportedCoins.forEach(i => {
|
|
75
|
+
const base = i.code.toUpperCase().replace(suffixRx, "");
|
|
76
|
+
grouped[base] = grouped[base] || [];
|
|
77
|
+
grouped[base].push(i);
|
|
78
|
+
});
|
|
57
79
|
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
const entry = Object.entries(grouped).find(([, arr]) => arr.length >= 2);
|
|
81
|
+
if (!entry) return;
|
|
60
82
|
|
|
61
|
-
|
|
62
|
-
|
|
83
|
+
const [, infos] = entry;
|
|
84
|
+
infos.length.should.be.aboveOrEqual(2);
|
|
63
85
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
grouped[base].push(i);
|
|
86
|
+
infos.forEach(info => {
|
|
87
|
+
provider._findInfoByTicker(info.coin.ticker).should.equal(info);
|
|
88
|
+
});
|
|
68
89
|
});
|
|
69
90
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
91
|
+
it("Should skip HTTP call when cached list is fresh", async () => {
|
|
92
|
+
provider._supportedCoins = [{ dummy: true }];
|
|
93
|
+
provider._supportedCoinsLastUpdateTimestamp = Date.now();
|
|
75
94
|
|
|
76
|
-
|
|
77
|
-
|
|
95
|
+
let calls = 0;
|
|
96
|
+
sinon.stub(axios, "get").callsFake((url, opts) => {
|
|
97
|
+
if (url.includes("/currencies")) calls += 1;
|
|
98
|
+
return axiosGetOriginal(url, opts);
|
|
99
|
+
});
|
|
78
100
|
|
|
79
|
-
|
|
80
|
-
|
|
101
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
102
|
+
calls.should.equal(0);
|
|
81
103
|
});
|
|
82
|
-
});
|
|
83
104
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
105
|
+
it("Should make one HTTP call when cache empty, then reuse cache within TTL", async () => {
|
|
106
|
+
let calls = 0;
|
|
107
|
+
sinon.stub(axios, "get").callsFake((url, opts) => {
|
|
108
|
+
if (url.includes("/currencies")) calls += 1;
|
|
109
|
+
return axiosGetOriginal(url, opts);
|
|
110
|
+
});
|
|
90
111
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
112
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
113
|
+
provider._supportedCoinsLastUpdateTimestamp -= 4 * 60 * 1000;
|
|
114
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
94
115
|
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
calls.should.equal(1);
|
|
117
|
+
});
|
|
97
118
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
119
|
+
it("Should refresh list after TTL expiry", async () => {
|
|
120
|
+
let calls = 0;
|
|
121
|
+
sinon.stub(axios, "get").callsFake((url, opts) => {
|
|
122
|
+
if (url.includes("/currencies")) calls += 1;
|
|
123
|
+
return axiosGetOriginal(url, opts);
|
|
124
|
+
});
|
|
104
125
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
126
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
127
|
+
provider._supportedCoinsLastUpdateTimestamp -= 10 * 60 * 1000;
|
|
128
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
108
129
|
|
|
109
|
-
|
|
110
|
-
|
|
130
|
+
calls.should.equal(2);
|
|
131
|
+
});
|
|
111
132
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
133
|
+
it("Should return empty list for status 200 with empty object", async () => {
|
|
134
|
+
sinon.stub(axios, "get").callsFake((url, opts = {}) => {
|
|
135
|
+
if (url.endsWith("/currencies")) {
|
|
136
|
+
return Promise.resolve({ status: 200, data: {} });
|
|
137
|
+
}
|
|
138
|
+
return axiosGetOriginal(url, opts);
|
|
139
|
+
});
|
|
118
140
|
|
|
119
|
-
|
|
120
|
-
provider._pairsCacheTimestamp -= 4 * 60 * 1000;
|
|
121
|
-
await provider._ensurePairsLoaded();
|
|
141
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
122
142
|
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
Array.isArray(provider._supportedCoins).should.be.true();
|
|
144
|
+
provider._supportedCoins.length.should.equal(0);
|
|
145
|
+
});
|
|
125
146
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
147
|
+
it("Should throw when status 200 with null data", async () => {
|
|
148
|
+
sinon.stub(axios, "get").callsFake((url, opts = {}) => {
|
|
149
|
+
if (url.endsWith("/currencies")) {
|
|
150
|
+
return Promise.resolve({ status: 200, data: null });
|
|
151
|
+
}
|
|
152
|
+
return axiosGetOriginal(url, opts);
|
|
153
|
+
});
|
|
132
154
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
await provider._ensurePairsLoaded();
|
|
155
|
+
await provider._fetchSupportedCurrenciesIfNeeded().should.be.rejected();
|
|
156
|
+
});
|
|
136
157
|
|
|
137
|
-
|
|
138
|
-
|
|
158
|
+
it("Should return empty list for status 200 with data array", async () => {
|
|
159
|
+
sinon.stub(axios, "get").callsFake((url, opts = {}) => {
|
|
160
|
+
if (url.endsWith("/currencies")) {
|
|
161
|
+
return Promise.resolve({ status: 200, data: [] });
|
|
162
|
+
}
|
|
163
|
+
return axiosGetOriginal(url, opts);
|
|
164
|
+
});
|
|
139
165
|
|
|
140
|
-
|
|
141
|
-
axios.get = vi.fn((url, opts = {}) =>
|
|
142
|
-
url.endsWith("/currencies") ? Promise.resolve({ status: 500, data: {} }) : axiosOriginalGet(url, opts)
|
|
143
|
-
);
|
|
144
|
-
await expect(provider._fetchSupportedCurrenciesIfNeeded()).rejects.toThrow();
|
|
145
|
-
});
|
|
166
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
146
167
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
provider._fetchSupportedCurrenciesIfNeeded(),
|
|
151
|
-
provider._fetchSupportedCurrenciesIfNeeded(),
|
|
152
|
-
]);
|
|
168
|
+
Array.isArray(provider._supportedCoins).should.be.true();
|
|
169
|
+
provider._supportedCoins.length.should.equal(0);
|
|
170
|
+
});
|
|
153
171
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
172
|
+
it("Should throw when /currencies responds with non-200 status", async () => {
|
|
173
|
+
sinon.stub(axios, "get").callsFake((url, opts = {}) => {
|
|
174
|
+
if (url.endsWith("/currencies")) {
|
|
175
|
+
return Promise.resolve({ status: 400, data: {} });
|
|
176
|
+
}
|
|
177
|
+
return axiosGetOriginal(url, opts);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
await provider._fetchSupportedCurrenciesIfNeeded().should.be.rejected();
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it("Should ensure every coin has a non-empty icon URL", async () => {
|
|
184
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
185
|
+
provider._supportedCoins.length.should.be.above(0);
|
|
186
|
+
provider._supportedCoins.every(i => typeof i.iconURL === "string" && i.iconURL.length > 0).should.be.true();
|
|
187
|
+
});
|
|
157
188
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
189
|
+
it("Should persist raw meta fields exactly", async () => {
|
|
190
|
+
const raw = await fetchRawCurrencies();
|
|
191
|
+
const entry = Object.entries(raw).find(([code, meta]) => provider._convertCurrencyMeta(code, meta));
|
|
192
|
+
should.exist(entry);
|
|
193
|
+
const [code, meta] = entry;
|
|
194
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
195
|
+
|
|
196
|
+
const info = provider._supportedCoins.find(i => i.code === code.toUpperCase());
|
|
197
|
+
should.exist(info);
|
|
198
|
+
info.code.should.equal(code.toUpperCase());
|
|
199
|
+
|
|
200
|
+
const net = (meta.network || "").toUpperCase() || null;
|
|
201
|
+
(info.network ?? null).should.equal(net ?? null);
|
|
202
|
+
|
|
203
|
+
const tag = (meta.tagname ?? "").trim();
|
|
204
|
+
if (tag) {
|
|
205
|
+
info.hasExtraId.should.be.true();
|
|
206
|
+
info.extraIdName.should.equal(tag);
|
|
207
|
+
} else {
|
|
208
|
+
info.hasExtraId.should.be.false();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it("Should mark isPopular and use fallback icon when icon is missing", async () => {
|
|
213
|
+
sinon.stub(axios, "get").callsFake((url, opts = {}) => {
|
|
214
|
+
if (url.endsWith("/currencies")) {
|
|
215
|
+
return Promise.resolve({
|
|
216
|
+
status: 200,
|
|
217
|
+
data: {
|
|
218
|
+
BTC: { coinName: "Bitcoin", available: true },
|
|
219
|
+
DOGE: { coinName: "Dogecoin", available: true },
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return axiosGetOriginal(url, opts);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
227
|
+
const btc = provider._supportedCoins.find(i => i.code === "BTC");
|
|
228
|
+
const doge = provider._supportedCoins.find(i => i.code === "DOGE");
|
|
229
|
+
|
|
230
|
+
btc.iconURL.should.equal(FALLBACK_ASSET_ICON_URL);
|
|
231
|
+
should.exist(btc.isPopular);
|
|
232
|
+
should.exist(doge.isPopular);
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it("Should sort _supportedCoins: popular first, then alphabetically by ticker", async () => {
|
|
236
|
+
await provider._fetchSupportedCurrenciesIfNeeded();
|
|
237
|
+
const popular = [
|
|
238
|
+
"HMSTRTON",
|
|
239
|
+
"BTC",
|
|
240
|
+
"ETH",
|
|
241
|
+
"USDTERC20",
|
|
242
|
+
"USDTTRC20",
|
|
243
|
+
"USDCERC20",
|
|
244
|
+
"XRP",
|
|
245
|
+
"TON",
|
|
246
|
+
"XMR",
|
|
247
|
+
"TRX",
|
|
248
|
+
"DAIERC20",
|
|
249
|
+
"DOGE",
|
|
250
|
+
"BNB",
|
|
251
|
+
"PEPEERC20",
|
|
252
|
+
"NOTTON",
|
|
253
|
+
"SOL",
|
|
254
|
+
"DOT",
|
|
255
|
+
"LTC",
|
|
256
|
+
"SHIBERC20",
|
|
257
|
+
"AVAX",
|
|
258
|
+
"UNIERC20",
|
|
259
|
+
"LINKERC20",
|
|
260
|
+
"MATIC",
|
|
261
|
+
"BUSDBEP20",
|
|
262
|
+
"AAVEERC20",
|
|
263
|
+
"ATOM",
|
|
264
|
+
"RUNE",
|
|
265
|
+
"ADA",
|
|
266
|
+
];
|
|
267
|
+
const list = provider._supportedCoins;
|
|
268
|
+
|
|
269
|
+
let reachedNonPopular = false;
|
|
270
|
+
for (const info of list) {
|
|
271
|
+
const isPop = popular.includes(info.coin.ticker);
|
|
272
|
+
if (!reachedNonPopular && !isPop) reachedNonPopular = true;
|
|
273
|
+
if (reachedNonPopular) isPop.should.be.false();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const nonPopularTickers = list.filter(i => !popular.includes(i.coin.ticker)).map(i => i.coin.ticker);
|
|
277
|
+
const sorted = [...nonPopularTickers].sort((a, b) => a.localeCompare(b));
|
|
278
|
+
nonPopularTickers.should.eql(sorted);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it("Should keep cache consistent under concurrent calls", async () => {
|
|
282
|
+
await Promise.all([
|
|
283
|
+
provider._fetchSupportedCurrenciesIfNeeded(),
|
|
284
|
+
provider._fetchSupportedCurrenciesIfNeeded(),
|
|
285
|
+
provider._fetchSupportedCurrenciesIfNeeded(),
|
|
286
|
+
]);
|
|
287
|
+
|
|
288
|
+
provider._supportedCoins.length.should.be.above(0);
|
|
289
|
+
provider._supportedCoinsLastUpdateTimestamp.should.be.above(0);
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
it("Should map all known provider statuses via _mapGoexmeStatus", () => {
|
|
293
|
+
const mapGoexmeStatus = provider._mapGoexmeStatus.bind(provider);
|
|
294
|
+
mapGoexmeStatus("new").should.equal(provider.constructor.SWAP_STATUSES.WAITING_FOR_PAYMENT);
|
|
295
|
+
mapGoexmeStatus("waiting_deposit").should.equal(provider.constructor.SWAP_STATUSES.CONFIRMING);
|
|
296
|
+
mapGoexmeStatus("deposit_received").should.equal(provider.constructor.SWAP_STATUSES.PAYMENT_RECEIVED);
|
|
297
|
+
mapGoexmeStatus("exchanging").should.equal(provider.constructor.SWAP_STATUSES.EXCHANGING);
|
|
298
|
+
mapGoexmeStatus("sending").should.equal(provider.constructor.SWAP_STATUSES.EXCHANGING);
|
|
299
|
+
mapGoexmeStatus("success").should.equal(provider.constructor.SWAP_STATUSES.COMPLETED);
|
|
300
|
+
mapGoexmeStatus("time_expired").should.equal(provider.constructor.SWAP_STATUSES.EXPIRED);
|
|
301
|
+
mapGoexmeStatus("failed").should.equal(provider.constructor.SWAP_STATUSES.FAILED);
|
|
302
|
+
mapGoexmeStatus("sending_failed").should.equal(provider.constructor.SWAP_STATUSES.FAILED);
|
|
303
|
+
mapGoexmeStatus("reverted").should.equal(provider.constructor.SWAP_STATUSES.REFUNDED);
|
|
304
|
+
});
|
|
170
305
|
});
|
|
171
306
|
});
|