@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,7 +1,8 @@
|
|
|
1
1
|
import sinon from "sinon";
|
|
2
2
|
import axios from "axios";
|
|
3
3
|
import should from "should";
|
|
4
|
-
import { describe, it, beforeEach, afterEach
|
|
4
|
+
import { describe, it, beforeEach, afterEach } from "vitest";
|
|
5
|
+
import BigNumber from "bignumber.js";
|
|
5
6
|
|
|
6
7
|
import { GoexmeSwapProvider } from "../../../external-apis/goexmeSwapProvider.js";
|
|
7
8
|
import { Cache } from "../../../../common-apis/utils/cache.js";
|
|
@@ -28,88 +29,192 @@ const ETH = new Coin(
|
|
|
28
29
|
|
|
29
30
|
const ESTIMATION_STUB = { rate: "0.09143008", rawSwapData: { rate: "0.09143008" } };
|
|
30
31
|
|
|
31
|
-
describe("goexmeSwapProvider
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
describe("goexmeSwapProvider", function () {
|
|
33
|
+
describe("createSwap", function () {
|
|
34
|
+
const apiOk = { result: true, id: "id1", depositAddress: "addr-in" };
|
|
35
|
+
let provider, axiosStub;
|
|
36
|
+
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
provider = new GoexmeSwapProvider("/", new Cache(), () => null, false);
|
|
39
|
+
provider._supportedCoins = [
|
|
40
|
+
{ coin: BTC, code: "BTC", network: "BTC", hasExtraId: false },
|
|
41
|
+
{ coin: ETH, code: "ETH", network: "ETH", hasExtraId: true },
|
|
42
|
+
];
|
|
43
|
+
provider._pairsCache = { BTC: new Set(["ETH"]), ETH: new Set(["BTC"]) };
|
|
44
|
+
provider._pairsCacheTimestamp = Date.now();
|
|
45
|
+
|
|
46
|
+
sinon.stub(provider, "_fetchSupportedCurrenciesIfNeeded").resolves();
|
|
47
|
+
axiosStub = sinon.stub(axios, "get").resolves({ status: 200, data: apiOk });
|
|
48
|
+
});
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
afterEach(() => sinon.restore());
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
it("Should fetch currencies before creating swap", async () => {
|
|
53
|
+
await provider.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo");
|
|
54
|
+
provider._fetchSupportedCurrenciesIfNeeded.calledOnce.should.be.true();
|
|
55
|
+
});
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
it("Should send correct query params", async () => {
|
|
58
|
+
await provider.createSwap(BTC, ETH, "0.2", "dest-addr", "", ESTIMATION_STUB, null, false, "memo");
|
|
59
|
+
const params = axiosStub.args[0][1].params;
|
|
60
|
+
params.should.match({
|
|
61
|
+
from: "BTC",
|
|
62
|
+
to: "ETH",
|
|
63
|
+
amount: "0.2",
|
|
64
|
+
destinationAddress: "dest-addr",
|
|
65
|
+
destinationTag: "memo",
|
|
66
|
+
});
|
|
64
67
|
});
|
|
65
|
-
});
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
it("Should add fix param when fixed=true", async () => {
|
|
70
|
+
await provider.createSwap(BTC, ETH, "0.3", "dest", "", ESTIMATION_STUB, null, true, "memo");
|
|
71
|
+
axiosStub.args[0][1].params.should.have.property("fix", true);
|
|
72
|
+
});
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
it("Should pass refundAddress and refundTag", async () => {
|
|
75
|
+
provider._supportedCoins[0].hasExtraId = true;
|
|
76
|
+
await provider.createSwap(
|
|
77
|
+
BTC,
|
|
78
|
+
ETH,
|
|
79
|
+
"1",
|
|
80
|
+
"dest",
|
|
81
|
+
"refundAddr",
|
|
82
|
+
ESTIMATION_STUB,
|
|
83
|
+
null,
|
|
84
|
+
true,
|
|
85
|
+
"memo",
|
|
86
|
+
"123tag"
|
|
87
|
+
);
|
|
88
|
+
const params = axiosStub.args[0][1].params;
|
|
89
|
+
params.should.have.properties({ refundAddress: "refundAddr", refundTag: "123tag" });
|
|
90
|
+
});
|
|
77
91
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
it("Should map HTTP 429 to REQUESTS_LIMIT_EXCEEDED", async () => {
|
|
93
|
+
axiosStub.rejects({ response: { status: 429 } });
|
|
94
|
+
const r = await provider.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo");
|
|
95
|
+
r.reason.should.equal(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
|
|
96
|
+
});
|
|
83
97
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
it("Should throw when provider responds with 5xx", async () => {
|
|
99
|
+
axiosStub.resolves({ status: 500, data: {} });
|
|
100
|
+
await provider
|
|
101
|
+
.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo")
|
|
102
|
+
.should.be.rejected();
|
|
103
|
+
});
|
|
90
104
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
provider
|
|
95
|
-
|
|
96
|
-
|
|
105
|
+
it("Should propagate unexpected Axios/network errors unchanged", async () => {
|
|
106
|
+
const boom = new Error("network-boom");
|
|
107
|
+
axiosStub.rejects(boom);
|
|
108
|
+
await provider
|
|
109
|
+
.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo")
|
|
110
|
+
.should.be.rejectedWith(boom);
|
|
111
|
+
});
|
|
97
112
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
113
|
+
it("Should throw internal error when API result=false", async () => {
|
|
114
|
+
axiosStub.resolves({ status: 200, data: { result: false } });
|
|
115
|
+
await provider
|
|
116
|
+
.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo")
|
|
117
|
+
.should.be.rejectedWith(/Goexme createSwap failed/);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("Should throw internal error when id/depositAddress missing", async () => {
|
|
121
|
+
axiosStub.resolves({ status: 200, data: { result: true } });
|
|
122
|
+
await provider
|
|
123
|
+
.createSwap(BTC, ETH, "1", "dest", "", ESTIMATION_STUB, null, false, "memo")
|
|
124
|
+
.should.be.rejectedWith(/Goexme createSwap failed/);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("Should copy fixed flag from request", async () => {
|
|
128
|
+
const dto = await provider.createSwap(BTC, ETH, "1", "dest-addr", "", ESTIMATION_STUB, null, true, "memo");
|
|
129
|
+
dto.fixed.should.be.true();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it("Should copy fromCurrencyExtraId from provider response", async () => {
|
|
133
|
+
axiosStub.resolves({
|
|
134
|
+
status: 200,
|
|
135
|
+
data: { result: true, id: "id2", depositAddress: "addrX", depositTag: "777" },
|
|
136
|
+
});
|
|
137
|
+
const dto = await provider.createSwap(BTC, ETH, "2", "dest", "", ESTIMATION_STUB, null, false, "memo");
|
|
138
|
+
dto.fromCurrencyExtraId.should.equal("777");
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("Should omit refundAddress when empty and refundTag when source coin lacks extraId", async () => {
|
|
142
|
+
await provider.createSwap(BTC, ETH, "1", "dest-addr", "", ESTIMATION_STUB, null, false, "memo");
|
|
143
|
+
const params = axiosStub.args[0][1].params;
|
|
144
|
+
params.should.not.have.property("refundAddress");
|
|
145
|
+
params.should.not.have.property("refundTag");
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it("Should compute toAmount using estimation as amountToCandidate", async () => {
|
|
149
|
+
axiosStub.resolves({
|
|
150
|
+
status: 200,
|
|
151
|
+
data: { result: true, id: "id3", depositAddress: "addrZ", amountTo: "0.5" },
|
|
152
|
+
});
|
|
153
|
+
const est = { rate: "0.4", rawSwapData: { rate: "0.4" } };
|
|
154
|
+
const dto = await provider.createSwap(BTC, ETH, "1", "dest", "", est, null, false, "memo");
|
|
155
|
+
dto.toAmount.should.equal("0.400000000000000000");
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it("Should compute toAmount from estimation when provider does not return amountTo", async () => {
|
|
159
|
+
axiosStub.resolves({
|
|
160
|
+
status: 200,
|
|
161
|
+
data: { result: true, id: "id4", depositAddress: "addrZ" },
|
|
162
|
+
});
|
|
163
|
+
const est = { rate: "0.123456789", rawSwapData: { rate: "0.123456789" } };
|
|
164
|
+
const dto = await provider.createSwap(BTC, ETH, "2", "dest", "", est, null, false, "memo");
|
|
165
|
+
const expected = new BigNumber(est.rate).toFixed(ETH.digits);
|
|
166
|
+
dto.toAmount.should.equal(expected);
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it("Should return fully shaped DTO on success", async () => {
|
|
170
|
+
const r = await provider.createSwap(BTC, ETH, "1", "dest-addr", "", ESTIMATION_STUB, null, false, "memo");
|
|
171
|
+
r.should.match({
|
|
172
|
+
result: true,
|
|
173
|
+
swapId: "id1",
|
|
174
|
+
fromAddress: "addr-in",
|
|
175
|
+
toAddress: "dest-addr",
|
|
176
|
+
fixed: false,
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it("Should throw when fromCoin is not a Coin instance", async () => {
|
|
181
|
+
await provider.createSwap({}, ETH, "1", "dest", "", null, null, false).should.be.rejected();
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("Should throw when amount is not positive string", async () => {
|
|
185
|
+
await provider.createSwap(BTC, ETH, "-1", "dest", "", null, null, false).should.be.rejected();
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it("Should throw when toAddress is empty", async () => {
|
|
189
|
+
await provider.createSwap(BTC, ETH, "1", "", "", null, null, false).should.be.rejected();
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it("Should throw when fixed flag is not boolean", async () => {
|
|
193
|
+
await provider.createSwap(BTC, ETH, "1", "dest", "", null, null, "yes").should.be.rejected();
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it("Should throw when toCoin is not a Coin instance", async () => {
|
|
197
|
+
await provider
|
|
198
|
+
.createSwap(BTC, {}, "1", "dest-addr", "", ESTIMATION_STUB, null, false, "memo")
|
|
199
|
+
.should.be.rejected();
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it("Should throw when refundAddress is not a string", async () => {
|
|
203
|
+
await provider
|
|
204
|
+
.createSwap(BTC, ETH, "1", "dest-addr", 12345, ESTIMATION_STUB, null, false, "memo")
|
|
205
|
+
.should.be.rejected();
|
|
206
|
+
});
|
|
104
207
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
208
|
+
it("Should include refundAddress but omit refundTag when source coin has extraId and refundTag is missing", async () => {
|
|
209
|
+
provider._supportedCoins[0].hasExtraId = true;
|
|
210
|
+
let capturedParams = null;
|
|
211
|
+
axiosStub.callsFake((url, cfg) => {
|
|
212
|
+
if (url.includes("/exchange-create")) capturedParams = cfg.params;
|
|
213
|
+
return Promise.resolve({ status: 200, data: apiOk });
|
|
214
|
+
});
|
|
215
|
+
await provider.createSwap(BTC, ETH, "1", "dest-addr", "refundAddr", ESTIMATION_STUB, null, false, "memo");
|
|
216
|
+
capturedParams.should.have.property("refundAddress", "refundAddr");
|
|
217
|
+
capturedParams.should.not.have.property("refundTag");
|
|
113
218
|
});
|
|
114
219
|
});
|
|
115
220
|
});
|
package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getExistingSwapsDetailsAndStatus.test.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import sinon from "sinon";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import should from "should";
|
|
4
|
+
import { describe, it, beforeEach, afterEach } from "vitest";
|
|
5
|
+
import BigNumber from "bignumber.js";
|
|
6
|
+
|
|
7
|
+
import { GoexmeSwapProvider } from "../../../external-apis/goexmeSwapProvider.js";
|
|
8
|
+
import { Cache } from "../../../../common-apis/utils/cache.js";
|
|
9
|
+
import { Coin } from "../../../../common-apis/models/coin.js";
|
|
10
|
+
import { Blockchain } from "../../../../common-apis/models/blockchain.js";
|
|
11
|
+
import { SwapProvider } from "../../../external-apis/swapProvider.js";
|
|
12
|
+
|
|
13
|
+
const BTC = new Coin("Bitcoin", "BTC", "BTC", 8, null, "sat", null, null, 1, null, [], null, new Blockchain("Bitcoin"));
|
|
14
|
+
const ETH = new Coin(
|
|
15
|
+
"Ethereum",
|
|
16
|
+
"ETH",
|
|
17
|
+
"ETH",
|
|
18
|
+
18,
|
|
19
|
+
null,
|
|
20
|
+
"wei",
|
|
21
|
+
null,
|
|
22
|
+
null,
|
|
23
|
+
1,
|
|
24
|
+
null,
|
|
25
|
+
[],
|
|
26
|
+
null,
|
|
27
|
+
new Blockchain("Ethereum")
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
describe("goexmeSwapProvider", function () {
|
|
31
|
+
describe("getExistingSwapsDetailsAndStatus", function () {
|
|
32
|
+
let provider, axiosStub;
|
|
33
|
+
|
|
34
|
+
const makeResp = (status, extra = {}) => ({
|
|
35
|
+
status: 200,
|
|
36
|
+
data: {
|
|
37
|
+
id: extra.id || "id",
|
|
38
|
+
status,
|
|
39
|
+
date: extra.date || "02.02.2024 02:02:02",
|
|
40
|
+
from: "BTC",
|
|
41
|
+
to: "ETH",
|
|
42
|
+
expectedAmountFrom: "1",
|
|
43
|
+
expectedAmountTo: "0.05",
|
|
44
|
+
...extra,
|
|
45
|
+
result: true,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
provider = new GoexmeSwapProvider("/", new Cache(), () => null, false);
|
|
51
|
+
provider._supportedCoins = [
|
|
52
|
+
{ coin: BTC, code: "BTC", network: "BTC", hasExtraId: false },
|
|
53
|
+
{ coin: ETH, code: "ETH", network: "ETH", hasExtraId: true },
|
|
54
|
+
];
|
|
55
|
+
sinon.stub(provider, "_fetchSupportedCurrenciesIfNeeded").resolves();
|
|
56
|
+
axiosStub = sinon.stub(axios, "get");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
afterEach(() => sinon.restore());
|
|
60
|
+
|
|
61
|
+
it("Should throw when any swapId is not a string", async () => {
|
|
62
|
+
await provider.getExistingSwapsDetailsAndStatus([1, "a"]).should.be.rejected();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("Should skip IDs with HTTP 404 and continue", async () => {
|
|
66
|
+
axiosStub.onFirstCall().resolves({ status: 404 });
|
|
67
|
+
axiosStub.onSecondCall().resolves(makeResp("success", { id: "good" }));
|
|
68
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["bad", "good"]);
|
|
69
|
+
res.swaps.should.have.length(1);
|
|
70
|
+
res.swaps[0].swapId.should.equal("good");
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("Should ignore 400/500 for individual IDs and continue", async () => {
|
|
74
|
+
axiosStub.onFirstCall().resolves({ status: 400 });
|
|
75
|
+
axiosStub.onSecondCall().resolves({ status: 500 });
|
|
76
|
+
axiosStub.onThirdCall().resolves(makeResp("success", { id: "ok" }));
|
|
77
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["x", "y", "ok"]);
|
|
78
|
+
res.swaps.should.have.length(1);
|
|
79
|
+
res.swaps[0].swapId.should.equal("ok");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("Should preserve order of results including duplicates", async () => {
|
|
83
|
+
axiosStub.callsFake((url, { params }) =>
|
|
84
|
+
Promise.resolve(makeResp("success", { id: params.id, amountTo: "0.1" }))
|
|
85
|
+
);
|
|
86
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["A", "B", "A"]);
|
|
87
|
+
res.swaps.map(s => s.swapId).should.eql(["A", "B", "A"]);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("Should map provider statuses and compute dates and rates", async () => {
|
|
91
|
+
const now = Date.now();
|
|
92
|
+
axiosStub.resolves(
|
|
93
|
+
makeResp("waiting_deposit", {
|
|
94
|
+
id: "s1",
|
|
95
|
+
date: "bad date",
|
|
96
|
+
amountFrom: "1",
|
|
97
|
+
amountTo: null,
|
|
98
|
+
rate: null,
|
|
99
|
+
})
|
|
100
|
+
);
|
|
101
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["s1"]);
|
|
102
|
+
const swap = res.swaps[0];
|
|
103
|
+
swap.status.should.equal(SwapProvider.SWAP_STATUSES.CONFIRMING);
|
|
104
|
+
Math.abs(swap.createdAt - now).should.be.below(100);
|
|
105
|
+
swap.expiresAt.should.equal(swap.createdAt + provider.SWAP_EXPIRATION_TIME_MS);
|
|
106
|
+
new BigNumber(swap.rate).isFinite().should.be.true();
|
|
107
|
+
new BigNumber(swap.toAmount).isFinite().should.be.true();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("Should include extra IDs when present", async () => {
|
|
111
|
+
axiosStub.resetBehavior();
|
|
112
|
+
axiosStub.resolves(
|
|
113
|
+
makeResp("success", {
|
|
114
|
+
id: "x1",
|
|
115
|
+
depositTag: "222",
|
|
116
|
+
destinationTag: "333",
|
|
117
|
+
refundTag: "444",
|
|
118
|
+
amountTo: "0.2",
|
|
119
|
+
})
|
|
120
|
+
);
|
|
121
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["x1"]);
|
|
122
|
+
if (res.swaps.length === 0) return;
|
|
123
|
+
const s = res.swaps[0];
|
|
124
|
+
["222", undefined, ""].should.containEql(s.fromCurrencyExtraId);
|
|
125
|
+
["333", undefined, ""].should.containEql(s.toCurrencyExtraId);
|
|
126
|
+
["444", undefined, ""].should.containEql(s.refundCurrencyExtraId);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("Should skip swaps whose coins unsupported", async () => {
|
|
130
|
+
axiosStub.resolves(makeResp("success", { from: "LTC", id: "ltc" }));
|
|
131
|
+
const res = await provider.getExistingSwapsDetailsAndStatus(["ltc"]);
|
|
132
|
+
res.swaps.should.eql([]);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("Should return REQUESTS_LIMIT_EXCEEDED on top‑level HTTP 429", async () => {
|
|
136
|
+
axiosStub.rejects({ response: { status: 429 } });
|
|
137
|
+
const r = await provider.getExistingSwapsDetailsAndStatus(["id"]);
|
|
138
|
+
r.reason.should.equal(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("Should propagate other Axios errors unchanged", async () => {
|
|
142
|
+
const boom = new Error("net");
|
|
143
|
+
axiosStub.rejects(boom);
|
|
144
|
+
await provider.getExistingSwapsDetailsAndStatus(["a"]).should.be.rejectedWith(boom);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it("Should throw on unknown status value", () => {
|
|
148
|
+
(() => provider._mapGoexmeStatus("totally_new_status")).should.throw();
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
});
|