@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
package/dist/index.modern.js
CHANGED
|
@@ -8727,7 +8727,7 @@ class ExistingSwap {
|
|
|
8727
8727
|
* @param {number} expiresAt - The timestamp when the swap expires.
|
|
8728
8728
|
* @param {number|null} confirmations - The number of confirmations the swap has received, or null.
|
|
8729
8729
|
* @param {string} rate - The exchange rate for the swap.
|
|
8730
|
-
* @param {
|
|
8730
|
+
* @param {boolean} fixed - Indicates if the rate is fixed.
|
|
8731
8731
|
* @param {string|null} refundAddress - The address to refund to in case of failure, or null.
|
|
8732
8732
|
* @param {string} payToAddress - The address to send the funds to.
|
|
8733
8733
|
* @param {Coin} fromCoin - The coin that is being swapped from.
|
|
@@ -10701,21 +10701,11 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10701
10701
|
validateStatus: s => [200, 400, 404].includes(s)
|
|
10702
10702
|
};
|
|
10703
10703
|
this.COINS_EXPIRATION_TIME_MS = 5 * 60 * 1000;
|
|
10704
|
-
this.PAIRS_EXPIRATION_TIME_MS = 5 * 60 * 1000;
|
|
10705
10704
|
this.SWAP_EXPIRATION_TIME_MS = 4 * 60 * 60 * 1000;
|
|
10706
|
-
this._pairsCache = null;
|
|
10707
|
-
this._pairsCacheTimestamp = 0;
|
|
10708
10705
|
}
|
|
10709
10706
|
getSwapCreationInfoTtlMs() {
|
|
10710
10707
|
return 30000;
|
|
10711
10708
|
}
|
|
10712
|
-
_isPairSupported(fromInfo, toInfo) {
|
|
10713
|
-
if (!this._pairsCache || !this._pairsCache[fromInfo.code]) return false;
|
|
10714
|
-
const toSet = this._pairsCache[fromInfo.code];
|
|
10715
|
-
/* GoExme may list either the raw provider code **or**
|
|
10716
|
-
* the “pretty” Rabbit ticker in `/pairs`, so we test both. */
|
|
10717
|
-
return toSet.has(toInfo.code) || toSet.has(toInfo.coin.ticker);
|
|
10718
|
-
}
|
|
10719
10709
|
_findInfoByTicker(ticker) {
|
|
10720
10710
|
return this._supportedCoins.find(i => i.coin.ticker === ticker) || null;
|
|
10721
10711
|
}
|
|
@@ -10763,24 +10753,6 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10763
10753
|
// extraIdName (only if needed)
|
|
10764
10754
|
0, FALLBACK_ASSET_ICON_URL, true, true, null, true);
|
|
10765
10755
|
}
|
|
10766
|
-
async _ensurePairsLoaded() {
|
|
10767
|
-
const loggerSource = "Goexme._ensurePairsLoaded";
|
|
10768
|
-
try {
|
|
10769
|
-
if (this._pairsCache && Date.now() - this._pairsCacheTimestamp < this.PAIRS_EXPIRATION_TIME_MS) return;
|
|
10770
|
-
const response = await axios.get(`${this._URL}/pairs`, _extends({}, this.axiosPreset, createRobustTimeoutSetupForAxios(), {
|
|
10771
|
-
params: {
|
|
10772
|
-
key: this._apiKey
|
|
10773
|
-
}
|
|
10774
|
-
}));
|
|
10775
|
-
if (response.status !== 200 || typeof response.data !== "object") {
|
|
10776
|
-
throw new Error("Failed to load /pairs");
|
|
10777
|
-
}
|
|
10778
|
-
this._pairsCache = Object.fromEntries(Object.entries(response.data).map(([from, arr]) => [from.toUpperCase(), new Set(arr.map(v => v.toUpperCase()))]));
|
|
10779
|
-
this._pairsCacheTimestamp = Date.now();
|
|
10780
|
-
} catch (e) {
|
|
10781
|
-
improveAndRethrow(e, loggerSource);
|
|
10782
|
-
}
|
|
10783
|
-
}
|
|
10784
10756
|
_mapGoexmeStatus(status) {
|
|
10785
10757
|
switch (status) {
|
|
10786
10758
|
case "new":
|
|
@@ -10832,10 +10804,9 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10832
10804
|
if (amountIsToReceive) throw new Error("amountIsToReceive is not supported by GoExme");
|
|
10833
10805
|
if (!(fromCoin instanceof Coin) || !(toCoin instanceof Coin) || BigNumber$1(amountCoins).lte(0)) throw new Error("Invalid params for getSwapInfo");
|
|
10834
10806
|
await this._fetchSupportedCurrenciesIfNeeded();
|
|
10835
|
-
await this._ensurePairsLoaded();
|
|
10836
10807
|
const fromCoinInfo = this._findInfoByTicker(fromCoin.ticker);
|
|
10837
10808
|
const toCoinInfo = this._findInfoByTicker(toCoin.ticker);
|
|
10838
|
-
if (!fromCoinInfo || !toCoinInfo
|
|
10809
|
+
if (!fromCoinInfo || !toCoinInfo) {
|
|
10839
10810
|
return {
|
|
10840
10811
|
result: false,
|
|
10841
10812
|
reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
|
|
@@ -10877,11 +10848,14 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10877
10848
|
greatestMax: pairMax
|
|
10878
10849
|
};
|
|
10879
10850
|
}
|
|
10851
|
+
if (response.data.rate == null || BigNumber$1(response.data.rate).isNaN() || BigNumber$1(response.data.rate).lte(0)) {
|
|
10852
|
+
return {
|
|
10853
|
+
result: false,
|
|
10854
|
+
reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
|
|
10855
|
+
};
|
|
10856
|
+
}
|
|
10880
10857
|
|
|
10881
|
-
|
|
10882
|
-
* Convert amountTo → ratio so that downstream code can do
|
|
10883
|
-
* amountFrom * rate === amountTo
|
|
10884
|
-
* -------------------------------------------------------- */
|
|
10858
|
+
// Convert amountTo → ratio so that downstream code can do amountFrom * rate === amountTo
|
|
10885
10859
|
let rateRatio = null;
|
|
10886
10860
|
if (response.data.rate != null && BigNumber$1(amountCoins).gt(0)) {
|
|
10887
10861
|
rateRatio = AmountUtils.trim(BigNumber$1(response.data.rate).div(amountCoins).toString(), this._maxRateDigits);
|
|
@@ -10898,10 +10872,6 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10898
10872
|
rawSwapData: response.data,
|
|
10899
10873
|
/**
|
|
10900
10874
|
* GoExme never requires a refund address.
|
|
10901
|
-
*
|
|
10902
|
-
* The official API documentation marks `destinationTag` / `refundTag` as **optional**.
|
|
10903
|
-
* Support chat confirmation (2025‑06‑27): "Yes, it's optional and can be omitted even for small amounts."
|
|
10904
|
-
*
|
|
10905
10875
|
*/
|
|
10906
10876
|
isRefundAddressRequired: false
|
|
10907
10877
|
};
|
|
@@ -10919,23 +10889,28 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10919
10889
|
/**
|
|
10920
10890
|
* Creates a swap on GoExme.
|
|
10921
10891
|
*
|
|
10922
|
-
*
|
|
10923
|
-
* `
|
|
10924
|
-
*
|
|
10925
|
-
* •
|
|
10892
|
+
* The `proprietarySwapEstimationData` object **must** carry two distinct values
|
|
10893
|
+
* produced by a prior `/rate` call:
|
|
10894
|
+
*
|
|
10895
|
+
* • `rawSwapData.rate` – **amountTo**
|
|
10896
|
+
* (the exact number of coins GoExme will send to the user);
|
|
10897
|
+
* • `rate` – **ratio**
|
|
10898
|
+
* (`amountTo / amountFrom`, i.e. Rabbit‑style per‑coin rate).
|
|
10899
|
+
*
|
|
10900
|
+
* Processing steps
|
|
10901
|
+
* ----------------
|
|
10902
|
+
* 1. Determine **amountTo** (`rawSwapData.rate`).
|
|
10903
|
+
* 2. Compute the canonical per‑coin **ratio**:
|
|
10926
10904
|
*
|
|
10927
|
-
*
|
|
10928
|
-
* estimation as amountTo, then derive the ratio ourselves.
|
|
10905
|
+
* ratio = amountTo / amountFrom
|
|
10929
10906
|
*
|
|
10930
|
-
*
|
|
10931
|
-
*
|
|
10932
|
-
*
|
|
10933
|
-
*
|
|
10934
|
-
*
|
|
10935
|
-
*
|
|
10936
|
-
*
|
|
10937
|
-
* → both mandatory fields (`rate`, `withdrawal.amount`)
|
|
10938
|
-
* are always present, avoiding schema validation errors.
|
|
10907
|
+
* 3. Return both numbers for downstream code:
|
|
10908
|
+
* • `rate` → ratio (Rabbit convention);
|
|
10909
|
+
* • `toAmount` → amountTo (final coins the user receives).
|
|
10910
|
+
*
|
|
10911
|
+
* This guarantees the invariant:
|
|
10912
|
+
*
|
|
10913
|
+
* amountFrom * rate === toAmount
|
|
10939
10914
|
*/
|
|
10940
10915
|
async createSwap(fromCoin, toCoin, amount, toAddress, refundAddress, proprietarySwapEstimationData, clientIpAddress, fixed, toCurrencyExtraId = "", refundExtraId = "", amountIsToReceive = false) {
|
|
10941
10916
|
const loggerSource = "Goexme.createSwap";
|
|
@@ -10945,7 +10920,7 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10945
10920
|
await this._fetchSupportedCurrenciesIfNeeded();
|
|
10946
10921
|
const fromCoinInfo = this._findInfoByTicker(fromCoin.ticker);
|
|
10947
10922
|
const toCoinInfo = this._findInfoByTicker(toCoin.ticker);
|
|
10948
|
-
if (!fromCoinInfo || !toCoinInfo
|
|
10923
|
+
if (!fromCoinInfo || !toCoinInfo) {
|
|
10949
10924
|
throw new Error(`Unsupported pair ${fromCoin.ticker} -> ${toCoin.ticker}`);
|
|
10950
10925
|
}
|
|
10951
10926
|
this._validateCreateSwapParams(fromCoin, toCoin, amount, toAddress, refundAddress, fixed, toCurrencyExtraId, refundExtraId, amountIsToReceive, fromCoinInfo, toCoinInfo);
|
|
@@ -10958,6 +10933,9 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10958
10933
|
fix: true
|
|
10959
10934
|
} : {});
|
|
10960
10935
|
params.amount = amount;
|
|
10936
|
+
|
|
10937
|
+
// Add refundAddress only if extraId is present:
|
|
10938
|
+
// GoExme documents these fields as optional, and support (2025‑06‑27) confirmed that.
|
|
10961
10939
|
if (toCoinInfo.hasExtraId && toCurrencyExtraId) params.destinationTag = toCurrencyExtraId;
|
|
10962
10940
|
if (refundAddress) {
|
|
10963
10941
|
params.refundAddress = refundAddress;
|
|
@@ -10973,18 +10951,14 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
10973
10951
|
throw new Error(errMsg);
|
|
10974
10952
|
}
|
|
10975
10953
|
|
|
10976
|
-
|
|
10977
|
-
* Extract amountTo from estimation (first non-null source).
|
|
10978
|
-
*-----------------------------------------------------------*/
|
|
10954
|
+
// Extract amountTo from estimation (first non-null source).
|
|
10979
10955
|
const amountToCandidate = (_ref = (_proprietarySwapEstim = proprietarySwapEstimationData == null || (_proprietarySwapEstim2 = proprietarySwapEstimationData.rawSwapData) == null ? void 0 : _proprietarySwapEstim2.rate) != null ? _proprietarySwapEstim : proprietarySwapEstimationData == null ? void 0 : proprietarySwapEstimationData.rate) != null ? _ref : null;
|
|
10980
10956
|
if (amountToCandidate == null) {
|
|
10981
10957
|
throw new Error("Estimation does not contain amountTo/rate");
|
|
10982
10958
|
}
|
|
10983
10959
|
const toAmountCalculated = AmountUtils.trim(amountToCandidate, toCoin.digits);
|
|
10984
10960
|
|
|
10985
|
-
|
|
10986
|
-
* Derive ratio so that amountFrom * ratio = amountTo.
|
|
10987
|
-
*-----------------------------------------------------------*/
|
|
10961
|
+
// Derive ratio so that amountFrom * ratio = amountTo.
|
|
10988
10962
|
const rateRatio = AmountUtils.trim(BigNumber$1(toAmountCalculated).div(amount).toString(), this._maxRateDigits);
|
|
10989
10963
|
return {
|
|
10990
10964
|
result: true,
|
|
@@ -11031,7 +11005,7 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
11031
11005
|
};
|
|
11032
11006
|
const statusResponses = await Promise.all(swapIds.map(fetchOne));
|
|
11033
11007
|
|
|
11034
|
-
|
|
11008
|
+
// helper: normalize coin code using CODE_TRANSLATIONS
|
|
11035
11009
|
const normalize = code => {
|
|
11036
11010
|
var _CODE_TRANSLATIONS$co2;
|
|
11037
11011
|
return (_CODE_TRANSLATIONS$co2 = CODE_TRANSLATIONS[code.toUpperCase()]) != null ? _CODE_TRANSLATIONS$co2 : code.toUpperCase();
|
|
@@ -11039,32 +11013,23 @@ class GoexmeSwapProvider extends SwapProvider {
|
|
|
11039
11013
|
const swaps = statusResponses.map((statusData, swapIndex) => {
|
|
11040
11014
|
var _ref2, _statusData$amountFro, _ref3, _statusData$amountTo, _statusData$refundAdd;
|
|
11041
11015
|
if (!statusData) return null;
|
|
11042
|
-
|
|
11043
|
-
/* ------------------ coins ------------------ */
|
|
11044
11016
|
const fromCoinTicker = toRabbitTicker(normalize(statusData.from), "");
|
|
11045
11017
|
const toCoinTicker = toRabbitTicker(normalize(statusData.to), "");
|
|
11046
11018
|
let fromCoin = this.getCoinByTickerIfPresent(fromCoinTicker);
|
|
11047
11019
|
let toCoin = this.getCoinByTickerIfPresent(toCoinTicker);
|
|
11048
|
-
|
|
11049
|
-
/* fallback: look up by raw provider code if ticker lookup failed */
|
|
11050
11020
|
if (!fromCoin) {
|
|
11051
11021
|
var _byCode$coin;
|
|
11052
11022
|
const byCode = this._supportedCoins.find(c => c.code === statusData.from);
|
|
11053
11023
|
fromCoin = (_byCode$coin = byCode == null ? void 0 : byCode.coin) != null ? _byCode$coin : null;
|
|
11054
11024
|
}
|
|
11055
|
-
/* fallback: look up by raw provider code if ticker lookup failed */
|
|
11056
11025
|
if (!toCoin) {
|
|
11057
11026
|
var _byCode$coin2;
|
|
11058
11027
|
const byCode = this._supportedCoins.find(c => c.code === statusData.to);
|
|
11059
11028
|
toCoin = (_byCode$coin2 = byCode == null ? void 0 : byCode.coin) != null ? _byCode$coin2 : null;
|
|
11060
11029
|
}
|
|
11061
11030
|
if (!fromCoin || !toCoin) return null;
|
|
11062
|
-
|
|
11063
|
-
/* timestamps */
|
|
11064
11031
|
const createdAt = GoexmeSwapProvider._parseGoexmeDate(statusData.date);
|
|
11065
11032
|
const expiresAt = createdAt + this.SWAP_EXPIRATION_TIME_MS;
|
|
11066
|
-
|
|
11067
|
-
/* amounts & rate */
|
|
11068
11033
|
const amountFromEffective = (_ref2 = (_statusData$amountFro = statusData.amountFrom) != null ? _statusData$amountFro : statusData.expectedAmountFrom) != null ? _ref2 : "0";
|
|
11069
11034
|
const amountToEffective = (_ref3 = (_statusData$amountTo = statusData.amountTo) != null ? _statusData$amountTo : statusData.expectedAmountTo) != null ? _ref3 : null;
|
|
11070
11035
|
let rateVal = statusData.rate;
|