@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.
Files changed (204) hide show
  1. package/.env +1 -0
  2. package/.env.example +1 -1
  3. package/coverage/clover.xml +1686 -1723
  4. package/coverage/coverage-final.json +118 -118
  5. package/coverage/index.html +86 -86
  6. package/coverage/{rabbit-ui-kit → ui-kit}/index.html +3 -3
  7. package/coverage/{rabbit-ui-kit → ui-kit}/index.js.html +3 -3
  8. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +3 -3
  9. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/index.html +3 -3
  10. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js.html +3 -3
  11. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +3 -3
  12. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/axiosAdapter.js.html +3 -3
  13. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/index.html +3 -3
  14. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/adapters/qrUtils.js.html +3 -3
  15. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/apiGroups.js.html +3 -3
  16. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/emailAPI.js.html +3 -3
  17. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/index.html +3 -3
  18. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/external-apis/ipAddressProviders.js.html +3 -3
  19. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/globalConstants.jsx.html +3 -3
  20. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/index.html +3 -3
  21. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/blockchain.js.html +6 -6
  22. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/coin.js.html +223 -223
  23. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/index.html +3 -3
  24. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/models/protocol.js.html +5 -5
  25. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/fiatCurrenciesService.js.html +3 -3
  26. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/services/index.html +3 -3
  27. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/amountUtils.js.html +51 -51
  28. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/cache.js.html +8 -8
  29. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/errorUtils.js.html +15 -15
  30. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/index.html +3 -3
  31. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/index.html +3 -3
  32. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logger.js.html +24 -24
  33. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/logging/logsStorage.js.html +5 -5
  34. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/postponeExecution.js.html +3 -3
  35. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/rabbitTicker.js.html +12 -12
  36. package/coverage/{rabbit-ui-kit → ui-kit}/src/common-apis/utils/safeStringify.js.html +29 -29
  37. package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +3 -3
  38. package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +3 -3
  39. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +3 -3
  40. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +3 -3
  41. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/cancelProcessing.js.html +3 -3
  42. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +3 -3
  43. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalApiProvider.js.html +3 -3
  44. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/externalServicesStatsCollector.js.html +3 -3
  45. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/index.html +3 -3
  46. package/coverage/{rabbit-ui-kit → ui-kit}/src/robust-api-caller/robustExternalAPICallerService.js.html +14 -14
  47. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/exolixSwapProvider.js.html +3 -3
  48. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/goexmeSwapProvider.js.html +566 -677
  49. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +29 -29
  50. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +3 -3
  51. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +349 -349
  52. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +3 -3
  53. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/utils.js.html +16 -16
  54. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
  55. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwap.js.html +143 -143
  56. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +103 -103
  57. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +16 -16
  58. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/partner.js.html +3 -3
  59. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/swapProviderCoinInfo.js.html +75 -75
  60. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/index.html +3 -3
  61. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/publicSwapService.js.html +3 -3
  62. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +3 -3
  63. package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
  64. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +3 -3
  65. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +3 -3
  66. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +3 -3
  67. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +3 -3
  68. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +3 -3
  69. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
  70. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/index.html +3 -3
  71. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +3 -3
  72. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +3 -3
  73. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +3 -3
  74. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
  75. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +3 -3
  76. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +3 -3
  77. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
  78. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetIcon/index.html +3 -3
  79. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
  80. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/AssetSelection/index.html +3 -3
  81. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
  82. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/index.html +3 -3
  83. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
  84. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/InformationMessage/index.html +3 -3
  85. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/Input.jsx.html +3 -3
  86. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Input/index.html +3 -3
  87. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
  88. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/LoadingDots/index.html +3 -3
  89. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +3 -3
  90. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/NoticeIcon/index.html +3 -3
  91. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +3 -3
  92. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/QrCode/index.html +3 -3
  93. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +3 -3
  94. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/RateSelector/index.html +3 -3
  95. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
  96. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/SupportChat/index.html +3 -3
  97. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +3 -3
  98. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Textarea/index.html +3 -3
  99. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
  100. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TitleBox/index.html +3 -3
  101. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
  102. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Tooltip/index.html +3 -3
  103. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
  104. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/index.html +3 -3
  105. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/Validation.jsx.html +3 -3
  106. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/Validation/index.html +3 -3
  107. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +3 -3
  108. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Button/index.html +3 -3
  109. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +3 -3
  110. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/Close/index.html +3 -3
  111. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
  112. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/index.html +3 -3
  113. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
  114. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
  115. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +3 -3
  116. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/AmountInput/index.html +3 -3
  117. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +3 -3
  118. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/CoinPicker/index.html +3 -3
  119. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +3 -3
  120. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/ColoredNotice/index.html +3 -3
  121. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
  122. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/index.html +3 -3
  123. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +3 -3
  124. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/LogoCarousel/index.html +3 -3
  125. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +3 -3
  126. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/SearchableCoinsList/index.html +3 -3
  127. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
  128. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +3 -3
  129. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
  130. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +3 -3
  131. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +3 -3
  132. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
  133. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +3 -3
  134. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +3 -3
  135. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +3 -3
  136. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/Dialog/index.html +3 -3
  137. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +3 -3
  138. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/SwapForm/index.html +3 -3
  139. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +3 -3
  140. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/organisms/WaitlistSubscription/index.html +3 -3
  141. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
  142. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +3 -3
  143. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/index.html +3 -3
  144. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useCallHandlingErrors.js.html +3 -3
  145. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useIsHydrated.js.html +3 -3
  146. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/hooks/useReferredState.js.html +3 -3
  147. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/index.html +3 -3
  148. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/inputValueProviders.js.html +3 -3
  149. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/searchCoins.js.html +3 -3
  150. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/textUtils.js.html +3 -3
  151. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/uiUtils.js.html +3 -3
  152. package/coverage/{rabbit-ui-kit → ui-kit}/src/ui-kit/utils/urlQueryUtils.js.html +3 -3
  153. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
  154. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
  155. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
  156. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
  157. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
  158. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
  159. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
  160. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
  161. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
  162. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +3 -3
  163. package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/index.html +3 -3
  164. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/AmountInput.stories.jsx.html +3 -3
  165. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/CoinPicker.stories.jsx.html +3 -3
  166. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/ColoredNotice.stories.jsx.html +3 -3
  167. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
  168. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LogoCarousel.stories.jsx.html +3 -3
  169. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
  170. package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/index.html +3 -3
  171. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
  172. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
  173. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
  174. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
  175. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
  176. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/index.html +3 -3
  177. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/WaitlistSubscription.stories.jsx.html +3 -3
  178. package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/index.html +3 -3
  179. package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/coins.jsx.html +3 -3
  180. package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
  181. package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/index.html +3 -3
  182. package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
  183. package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +3 -3
  184. package/dist/index.cjs +120 -169
  185. package/dist/index.cjs.map +1 -1
  186. package/dist/index.modern.js +36 -71
  187. package/dist/index.modern.js.map +1 -1
  188. package/dist/index.module.js +120 -169
  189. package/dist/index.module.js.map +1 -1
  190. package/dist/index.umd.js +120 -169
  191. package/dist/index.umd.js.map +1 -1
  192. package/package.json +1 -1
  193. package/src/swaps-lib/external-apis/goexmeSwapProvider.js +40 -77
  194. package/src/swaps-lib/models/existingSwap.js +1 -1
  195. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_convertCurrencyMeta.test.js +80 -0
  196. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +50 -123
  197. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/createSwap.test.js +177 -72
  198. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getExistingSwapsDetailsAndStatus.test.js +151 -0
  199. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getSwapInfo.test.js +140 -104
  200. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/helpers.test.js +26 -0
  201. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/PairSupport.int.test.js +31 -60
  202. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/_fetchSupportedCurrenciesIfNeeded.int.test.js +261 -126
  203. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/createSwap.int.test.js +319 -225
  204. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/getSwapInfo.int.test.js +137 -127
package/dist/index.umd.js CHANGED
@@ -10664,7 +10664,7 @@
10664
10664
  * @param {number} expiresAt - The timestamp when the swap expires.
10665
10665
  * @param {number|null} confirmations - The number of confirmations the swap has received, or null.
10666
10666
  * @param {string} rate - The exchange rate for the swap.
10667
- * @param {null} fixed - Indicates if the rate is fixed.
10667
+ * @param {boolean} fixed - Indicates if the rate is fixed.
10668
10668
  * @param {string|null} refundAddress - The address to refund to in case of failure, or null.
10669
10669
  * @param {string} payToAddress - The address to send the funds to.
10670
10670
  * @param {Coin} fromCoin - The coin that is being swapped from.
@@ -13269,23 +13269,13 @@
13269
13269
  }
13270
13270
  };
13271
13271
  _this.COINS_EXPIRATION_TIME_MS = 5 * 60 * 1000;
13272
- _this.PAIRS_EXPIRATION_TIME_MS = 5 * 60 * 1000;
13273
13272
  _this.SWAP_EXPIRATION_TIME_MS = 4 * 60 * 60 * 1000;
13274
- _this._pairsCache = null;
13275
- _this._pairsCacheTimestamp = 0;
13276
13273
  return _this;
13277
13274
  }
13278
13275
  var _proto = GoexmeSwapProvider.prototype;
13279
13276
  _proto.getSwapCreationInfoTtlMs = function getSwapCreationInfoTtlMs() {
13280
13277
  return 30000;
13281
13278
  };
13282
- _proto._isPairSupported = function _isPairSupported(fromInfo, toInfo) {
13283
- if (!this._pairsCache || !this._pairsCache[fromInfo.code]) return false;
13284
- var toSet = this._pairsCache[fromInfo.code];
13285
- /* GoExme may list either the raw provider code **or**
13286
- * the “pretty” Rabbit ticker in `/pairs`, so we test both. */
13287
- return toSet.has(toInfo.code) || toSet.has(toInfo.coin.ticker);
13288
- };
13289
13279
  _proto._findInfoByTicker = function _findInfoByTicker(ticker) {
13290
13280
  return this._supportedCoins.find(function (i) {
13291
13281
  return i.coin.ticker === ticker;
@@ -13350,36 +13340,6 @@
13350
13340
  // extraIdName (only if needed)
13351
13341
  0, FALLBACK_ASSET_ICON_URL, true, true, null, true);
13352
13342
  };
13353
- _proto._ensurePairsLoaded = function _ensurePairsLoaded() {
13354
- try {
13355
- var _this3 = this;
13356
- var loggerSource = "Goexme._ensurePairsLoaded";
13357
- return Promise.resolve(_catch$2(function () {
13358
- if (_this3._pairsCache && Date.now() - _this3._pairsCacheTimestamp < _this3.PAIRS_EXPIRATION_TIME_MS) return;
13359
- return Promise.resolve(axios__default["default"].get(_this3._URL + "/pairs", _extends({}, _this3.axiosPreset, createRobustTimeoutSetupForAxios(), {
13360
- params: {
13361
- key: _this3._apiKey
13362
- }
13363
- }))).then(function (response) {
13364
- if (response.status !== 200 || typeof response.data !== "object") {
13365
- throw new Error("Failed to load /pairs");
13366
- }
13367
- _this3._pairsCache = Object.fromEntries(Object.entries(response.data).map(function (_ref3) {
13368
- var from = _ref3[0],
13369
- arr = _ref3[1];
13370
- return [from.toUpperCase(), new Set(arr.map(function (v) {
13371
- return v.toUpperCase();
13372
- }))];
13373
- }));
13374
- _this3._pairsCacheTimestamp = Date.now();
13375
- });
13376
- }, function (e) {
13377
- improveAndRethrow(e, loggerSource);
13378
- }));
13379
- } catch (e) {
13380
- return Promise.reject(e);
13381
- }
13382
- };
13383
13343
  _proto._mapGoexmeStatus = function _mapGoexmeStatus(status) {
13384
13344
  switch (status) {
13385
13345
  case "new":
@@ -13432,87 +13392,84 @@
13432
13392
  amountIsToReceive = false;
13433
13393
  }
13434
13394
  try {
13435
- var _this4 = this;
13395
+ var _this3 = this;
13436
13396
  var loggerSource = "Goexme.getSwapInfo";
13437
13397
  return Promise.resolve(_catch$2(function () {
13438
13398
  if (amountIsToReceive) throw new Error("amountIsToReceive is not supported by GoExme");
13439
13399
  if (!(fromCoin instanceof Coin) || !(toCoin instanceof Coin) || BigNumber__default["default"](amountCoins).lte(0)) throw new Error("Invalid params for getSwapInfo");
13440
- return Promise.resolve(_this4._fetchSupportedCurrenciesIfNeeded()).then(function () {
13441
- return Promise.resolve(_this4._ensurePairsLoaded()).then(function () {
13442
- var fromCoinInfo = _this4._findInfoByTicker(fromCoin.ticker);
13443
- var toCoinInfo = _this4._findInfoByTicker(toCoin.ticker);
13444
- if (!fromCoinInfo || !toCoinInfo || !_this4._isPairSupported(fromCoinInfo, toCoinInfo)) {
13400
+ return Promise.resolve(_this3._fetchSupportedCurrenciesIfNeeded()).then(function () {
13401
+ var fromCoinInfo = _this3._findInfoByTicker(fromCoin.ticker);
13402
+ var toCoinInfo = _this3._findInfoByTicker(toCoin.ticker);
13403
+ if (!fromCoinInfo || !toCoinInfo) {
13404
+ return {
13405
+ result: false,
13406
+ reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
13407
+ };
13408
+ }
13409
+ var params = _extends({
13410
+ key: _this3._apiKey,
13411
+ from: fromCoinInfo.code,
13412
+ to: toCoinInfo.code,
13413
+ amount: amountCoins
13414
+ }, fixed ? {
13415
+ fix: true
13416
+ } : {});
13417
+ return Promise.resolve(axios__default["default"].get(_this3._URL + "/rate", _extends({}, _this3.axiosPreset, createRobustTimeoutSetupForAxios(), {
13418
+ params: params
13419
+ }))).then(function (response) {
13420
+ var _response$data, _response$data$minamo, _response$data$maxamo;
13421
+ if (response.status !== 200 || ((_response$data = response.data) == null ? void 0 : _response$data.result) !== true || !response.data) {
13422
+ Logger.log("Unexpected response from /rate: " + response.status + ": " + safeStringify(response.data), loggerSource);
13445
13423
  return {
13446
13424
  result: false,
13447
13425
  reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
13448
13426
  };
13449
13427
  }
13450
- var params = _extends({
13451
- key: _this4._apiKey,
13452
- from: fromCoinInfo.code,
13453
- to: toCoinInfo.code,
13454
- amount: amountCoins
13455
- }, fixed ? {
13456
- fix: true
13457
- } : {});
13458
- return Promise.resolve(axios__default["default"].get(_this4._URL + "/rate", _extends({}, _this4.axiosPreset, createRobustTimeoutSetupForAxios(), {
13459
- params: params
13460
- }))).then(function (response) {
13461
- var _response$data, _response$data$minamo, _response$data$maxamo;
13462
- if (response.status !== 200 || ((_response$data = response.data) == null ? void 0 : _response$data.result) !== true || !response.data) {
13463
- Logger.log("Unexpected response from /rate: " + response.status + ": " + safeStringify(response.data), loggerSource);
13464
- return {
13465
- result: false,
13466
- reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
13467
- };
13468
- }
13469
- var pairMinRaw = (_response$data$minamo = response.data.minamount) != null ? _response$data$minamo : null;
13470
- var pairMaxRaw = (_response$data$maxamo = response.data.maxamount) != null ? _response$data$maxamo : null;
13471
- var pairMin = pairMinRaw ? AmountUtils.trim(pairMinRaw, fromCoin.digits) : null;
13472
- var pairMax = pairMaxRaw ? AmountUtils.trim(pairMaxRaw, fromCoin.digits) : null;
13473
- if (pairMin && BigNumber__default["default"](amountCoins).lt(pairMin)) {
13474
- return {
13475
- result: false,
13476
- reason: SwapProvider.NO_SWAPS_REASONS.TOO_LOW,
13477
- smallestMin: pairMin
13478
- };
13479
- }
13480
- if (pairMax && BigNumber__default["default"](amountCoins).gt(pairMax)) {
13481
- return {
13482
- result: false,
13483
- reason: SwapProvider.NO_SWAPS_REASONS.TOO_HIGH,
13484
- greatestMax: pairMax
13485
- };
13486
- }
13487
-
13488
- /* --------------------------------------------------------
13489
- * Convert amountTo → ratio so that downstream code can do
13490
- * amountFrom * rate === amountTo
13491
- * -------------------------------------------------------- */
13492
- var rateRatio = null;
13493
- if (response.data.rate != null && BigNumber__default["default"](amountCoins).gt(0)) {
13494
- rateRatio = AmountUtils.trim(BigNumber__default["default"](response.data.rate).div(amountCoins).toString(), _this4._maxRateDigits);
13495
- }
13428
+ var pairMinRaw = (_response$data$minamo = response.data.minamount) != null ? _response$data$minamo : null;
13429
+ var pairMaxRaw = (_response$data$maxamo = response.data.maxamount) != null ? _response$data$maxamo : null;
13430
+ var pairMin = pairMinRaw ? AmountUtils.trim(pairMinRaw, fromCoin.digits) : null;
13431
+ var pairMax = pairMaxRaw ? AmountUtils.trim(pairMaxRaw, fromCoin.digits) : null;
13432
+ if (pairMin && BigNumber__default["default"](amountCoins).lt(pairMin)) {
13496
13433
  return {
13497
- result: true,
13498
- min: pairMin,
13499
- max: pairMax,
13500
- smallestMin: pairMin,
13501
- greatestMax: pairMax,
13502
- rate: rateRatio,
13503
- durationMinutesRange: null,
13504
- fixed: !!response.data.fix,
13505
- rawSwapData: response.data,
13506
- /**
13507
- * GoExme never requires a refund address.
13508
- *
13509
- * The official API documentation marks `destinationTag` / `refundTag` as **optional**.
13510
- * Support chat confirmation (2025‑06‑27): "Yes, it's optional and can be omitted even for small amounts."
13511
- *
13512
- */
13513
- isRefundAddressRequired: false
13434
+ result: false,
13435
+ reason: SwapProvider.NO_SWAPS_REASONS.TOO_LOW,
13436
+ smallestMin: pairMin
13514
13437
  };
13515
- });
13438
+ }
13439
+ if (pairMax && BigNumber__default["default"](amountCoins).gt(pairMax)) {
13440
+ return {
13441
+ result: false,
13442
+ reason: SwapProvider.NO_SWAPS_REASONS.TOO_HIGH,
13443
+ greatestMax: pairMax
13444
+ };
13445
+ }
13446
+ if (response.data.rate == null || BigNumber__default["default"](response.data.rate).isNaN() || BigNumber__default["default"](response.data.rate).lte(0)) {
13447
+ return {
13448
+ result: false,
13449
+ reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
13450
+ };
13451
+ }
13452
+
13453
+ // Convert amountTo → ratio so that downstream code can do amountFrom * rate === amountTo
13454
+ var rateRatio = null;
13455
+ if (response.data.rate != null && BigNumber__default["default"](amountCoins).gt(0)) {
13456
+ rateRatio = AmountUtils.trim(BigNumber__default["default"](response.data.rate).div(amountCoins).toString(), _this3._maxRateDigits);
13457
+ }
13458
+ return {
13459
+ result: true,
13460
+ min: pairMin,
13461
+ max: pairMax,
13462
+ smallestMin: pairMin,
13463
+ greatestMax: pairMax,
13464
+ rate: rateRatio,
13465
+ durationMinutesRange: null,
13466
+ fixed: !!response.data.fix,
13467
+ rawSwapData: response.data,
13468
+ /**
13469
+ * GoExme never requires a refund address.
13470
+ */
13471
+ isRefundAddressRequired: false
13472
+ };
13516
13473
  });
13517
13474
  });
13518
13475
  }, function (e) {
@@ -13531,23 +13488,28 @@
13531
13488
  /**
13532
13489
  * Creates a swap on GoExme.
13533
13490
  *
13534
- * We cannot rely on what upper layers put into
13535
- * `proprietarySwapEstimationData.rate`:
13536
- * • sometimes it is the **amountTo** (GoExme original value);
13537
- * • sometimes it is already a **ratio** – but we cannot know.
13491
+ * The `proprietarySwapEstimationData` object **must** carry two distinct values
13492
+ * produced by a prior `/rate` call:
13493
+ *
13494
+ * • `rawSwapData.rate` **amountTo**
13495
+ * (the exact number of coins GoExme will send to the user);
13496
+ * • `rate` – **ratio**
13497
+ * (`amountTo / amountFrom`, i.e. Rabbit‑style per‑coin rate).
13498
+ *
13499
+ * Processing steps
13500
+ * ----------------
13501
+ * 1. Determine **amountTo** (`rawSwapData.rate`).
13502
+ * 2. Compute the canonical per‑coin **ratio**:
13538
13503
  *
13539
- * The only safe approach: treat any numeric value we get from
13540
- * estimation as amountTo, then derive the ratio ourselves.
13504
+ * ratio = amountTo / amountFrom
13541
13505
  *
13542
- * Steps:
13543
- * 1. Pick the first non-null of
13544
- * estimation.rawSwapData.rate
13545
- * – estimation.rate
13546
- * (both are amountTo for GoExme).
13547
- * 2. Store it as `toAmountCalculated`.
13548
- * 3. Compute `rateRatio = toAmount / amountFrom`.
13549
- * → both mandatory fields (`rate`, `withdrawal.amount`)
13550
- * are always present, avoiding schema validation errors.
13506
+ * 3. Return both numbers for downstream code:
13507
+ * `rate` → ratio (Rabbit convention);
13508
+ * `toAmount` → amountTo (final coins the user receives).
13509
+ *
13510
+ * This guarantees the invariant:
13511
+ *
13512
+ * amountFrom * rate === toAmount
13551
13513
  */
13552
13514
  ;
13553
13515
  _proto.createSwap = function createSwap(fromCoin, toCoin, amount, toAddress, refundAddress, proprietarySwapEstimationData, clientIpAddress, fixed, toCurrencyExtraId, refundExtraId, amountIsToReceive) {
@@ -13561,19 +13523,19 @@
13561
13523
  amountIsToReceive = false;
13562
13524
  }
13563
13525
  try {
13564
- var _this5 = this;
13526
+ var _this4 = this;
13565
13527
  var loggerSource = "Goexme.createSwap";
13566
13528
  return Promise.resolve(_catch$2(function () {
13567
13529
  if (amountIsToReceive) throw new Error("amountIsToReceive is not supported by GoExme");
13568
- return Promise.resolve(_this5._fetchSupportedCurrenciesIfNeeded()).then(function () {
13569
- var fromCoinInfo = _this5._findInfoByTicker(fromCoin.ticker);
13570
- var toCoinInfo = _this5._findInfoByTicker(toCoin.ticker);
13571
- if (!fromCoinInfo || !toCoinInfo || !_this5._isPairSupported(fromCoinInfo, toCoinInfo)) {
13530
+ return Promise.resolve(_this4._fetchSupportedCurrenciesIfNeeded()).then(function () {
13531
+ var fromCoinInfo = _this4._findInfoByTicker(fromCoin.ticker);
13532
+ var toCoinInfo = _this4._findInfoByTicker(toCoin.ticker);
13533
+ if (!fromCoinInfo || !toCoinInfo) {
13572
13534
  throw new Error("Unsupported pair " + fromCoin.ticker + " -> " + toCoin.ticker);
13573
13535
  }
13574
- _this5._validateCreateSwapParams(fromCoin, toCoin, amount, toAddress, refundAddress, fixed, toCurrencyExtraId, refundExtraId, amountIsToReceive, fromCoinInfo, toCoinInfo);
13536
+ _this4._validateCreateSwapParams(fromCoin, toCoin, amount, toAddress, refundAddress, fixed, toCurrencyExtraId, refundExtraId, amountIsToReceive, fromCoinInfo, toCoinInfo);
13575
13537
  var params = _extends({
13576
- key: _this5._apiKey,
13538
+ key: _this4._apiKey,
13577
13539
  from: fromCoinInfo.code,
13578
13540
  to: toCoinInfo.code,
13579
13541
  destinationAddress: toAddress
@@ -13581,34 +13543,32 @@
13581
13543
  fix: true
13582
13544
  } : {});
13583
13545
  params.amount = amount;
13546
+
13547
+ // Add refundAddress only if extraId is present:
13548
+ // GoExme documents these fields as optional, and support (2025‑06‑27) confirmed that.
13549
+ // Extract amountTo from estimation (first non-null source).
13550
+ // Derive ratio so that amountFrom * ratio = amountTo.
13584
13551
  if (toCoinInfo.hasExtraId && toCurrencyExtraId) params.destinationTag = toCurrencyExtraId;
13585
13552
  if (refundAddress) {
13586
13553
  params.refundAddress = refundAddress;
13587
13554
  if (fromCoinInfo.hasExtraId && refundExtraId) params.refundTag = refundExtraId;
13588
13555
  }
13589
- return Promise.resolve(axios__default["default"].get(_this5._URL + "/exchange-create", _extends({}, _this5.axiosPreset, createRobustTimeoutSetupForAxios(), {
13556
+ return Promise.resolve(axios__default["default"].get(_this4._URL + "/exchange-create", _extends({}, _this4.axiosPreset, createRobustTimeoutSetupForAxios(), {
13590
13557
  params: params
13591
13558
  }))).then(function (response) {
13592
- var _ref4, _proprietarySwapEstim, _proprietarySwapEstim2, _data$depositTag;
13559
+ var _ref3, _proprietarySwapEstim, _proprietarySwapEstim2, _data$depositTag;
13593
13560
  var data = response.data;
13594
13561
  if ((data == null ? void 0 : data.result) !== true || !(data != null && data.id) || !(data != null && data.depositAddress)) {
13595
13562
  var errMsg = "Goexme createSwap failed: " + safeStringify(data != null ? data : {});
13596
13563
  Logger.log(errMsg, loggerSource);
13597
13564
  throw new Error(errMsg);
13598
13565
  }
13599
-
13600
- /*------------------------------------------------------------
13601
- * Extract amountTo from estimation (first non-null source).
13602
- *-----------------------------------------------------------*/
13603
- /*------------------------------------------------------------
13604
- * Derive ratio so that amountFrom * ratio = amountTo.
13605
- *-----------------------------------------------------------*/
13606
- var amountToCandidate = (_ref4 = (_proprietarySwapEstim = proprietarySwapEstimationData == null || (_proprietarySwapEstim2 = proprietarySwapEstimationData.rawSwapData) == null ? void 0 : _proprietarySwapEstim2.rate) != null ? _proprietarySwapEstim : proprietarySwapEstimationData == null ? void 0 : proprietarySwapEstimationData.rate) != null ? _ref4 : null;
13566
+ var amountToCandidate = (_ref3 = (_proprietarySwapEstim = proprietarySwapEstimationData == null || (_proprietarySwapEstim2 = proprietarySwapEstimationData.rawSwapData) == null ? void 0 : _proprietarySwapEstim2.rate) != null ? _proprietarySwapEstim : proprietarySwapEstimationData == null ? void 0 : proprietarySwapEstimationData.rate) != null ? _ref3 : null;
13607
13567
  if (amountToCandidate == null) {
13608
13568
  throw new Error("Estimation does not contain amountTo/rate");
13609
13569
  }
13610
13570
  var toAmountCalculated = AmountUtils.trim(amountToCandidate, toCoin.digits);
13611
- var rateRatio = AmountUtils.trim(BigNumber__default["default"](toAmountCalculated).div(amount).toString(), _this5._maxRateDigits);
13571
+ var rateRatio = AmountUtils.trim(BigNumber__default["default"](toAmountCalculated).div(amount).toString(), _this4._maxRateDigits);
13612
13572
  return {
13613
13573
  result: true,
13614
13574
  swapId: data.id,
@@ -13645,7 +13605,7 @@
13645
13605
  };
13646
13606
  _proto.getExistingSwapsDetailsAndStatus = function getExistingSwapsDetailsAndStatus(swapIds) {
13647
13607
  try {
13648
- var _this6 = this;
13608
+ var _this5 = this;
13649
13609
  var loggerSource = "Goexme.getExistingSwapsDetailsAndStatus";
13650
13610
  return Promise.resolve(_catch$2(function () {
13651
13611
  if (swapIds.some(function (id) {
@@ -13653,9 +13613,9 @@
13653
13613
  })) throw new Error("swapIds must be strings");
13654
13614
  var fetchOne = function fetchOne(id) {
13655
13615
  try {
13656
- return Promise.resolve(axios__default["default"].get(_this6._URL + "/exchange-status", _extends({}, _this6.axiosPreset, createRobustTimeoutSetupForAxios(), {
13616
+ return Promise.resolve(axios__default["default"].get(_this5._URL + "/exchange-status", _extends({}, _this5.axiosPreset, createRobustTimeoutSetupForAxios(), {
13657
13617
  params: {
13658
- key: _this6._apiKey,
13618
+ key: _this5._apiKey,
13659
13619
  id: id
13660
13620
  }
13661
13621
  }))).then(function (response) {
@@ -13666,59 +13626,50 @@
13666
13626
  }
13667
13627
  };
13668
13628
  return Promise.resolve(Promise.all(swapIds.map(fetchOne))).then(function (statusResponses) {
13669
- /* helper: normalize coin code using CODE_TRANSLATIONS */
13629
+ // helper: normalize coin code using CODE_TRANSLATIONS
13670
13630
  var normalize = function normalize(code) {
13671
13631
  var _CODE_TRANSLATIONS$co2;
13672
13632
  return (_CODE_TRANSLATIONS$co2 = CODE_TRANSLATIONS[code.toUpperCase()]) != null ? _CODE_TRANSLATIONS$co2 : code.toUpperCase();
13673
13633
  };
13674
13634
  var swaps = statusResponses.map(function (statusData, swapIndex) {
13675
- var _ref5, _statusData$amountFro, _ref6, _statusData$amountTo, _statusData$refundAdd;
13635
+ var _ref4, _statusData$amountFro, _ref5, _statusData$amountTo, _statusData$refundAdd;
13676
13636
  if (!statusData) return null;
13677
-
13678
- /* ------------------ coins ------------------ */
13679
13637
  var fromCoinTicker = toRabbitTicker(normalize(statusData.from), "");
13680
13638
  var toCoinTicker = toRabbitTicker(normalize(statusData.to), "");
13681
- var fromCoin = _this6.getCoinByTickerIfPresent(fromCoinTicker);
13682
- var toCoin = _this6.getCoinByTickerIfPresent(toCoinTicker);
13683
-
13684
- /* fallback: look up by raw provider code if ticker lookup failed */
13639
+ var fromCoin = _this5.getCoinByTickerIfPresent(fromCoinTicker);
13640
+ var toCoin = _this5.getCoinByTickerIfPresent(toCoinTicker);
13685
13641
  if (!fromCoin) {
13686
13642
  var _byCode$coin;
13687
- var byCode = _this6._supportedCoins.find(function (c) {
13643
+ var byCode = _this5._supportedCoins.find(function (c) {
13688
13644
  return c.code === statusData.from;
13689
13645
  });
13690
13646
  fromCoin = (_byCode$coin = byCode == null ? void 0 : byCode.coin) != null ? _byCode$coin : null;
13691
13647
  }
13692
- /* fallback: look up by raw provider code if ticker lookup failed */
13693
13648
  if (!toCoin) {
13694
13649
  var _byCode$coin2;
13695
- var _byCode = _this6._supportedCoins.find(function (c) {
13650
+ var _byCode = _this5._supportedCoins.find(function (c) {
13696
13651
  return c.code === statusData.to;
13697
13652
  });
13698
13653
  toCoin = (_byCode$coin2 = _byCode == null ? void 0 : _byCode.coin) != null ? _byCode$coin2 : null;
13699
13654
  }
13700
13655
  if (!fromCoin || !toCoin) return null;
13701
-
13702
- /* timestamps */
13703
13656
  var createdAt = GoexmeSwapProvider._parseGoexmeDate(statusData.date);
13704
- var expiresAt = createdAt + _this6.SWAP_EXPIRATION_TIME_MS;
13705
-
13706
- /* amounts & rate */
13707
- var amountFromEffective = (_ref5 = (_statusData$amountFro = statusData.amountFrom) != null ? _statusData$amountFro : statusData.expectedAmountFrom) != null ? _ref5 : "0";
13708
- var amountToEffective = (_ref6 = (_statusData$amountTo = statusData.amountTo) != null ? _statusData$amountTo : statusData.expectedAmountTo) != null ? _ref6 : null;
13657
+ var expiresAt = createdAt + _this5.SWAP_EXPIRATION_TIME_MS;
13658
+ var amountFromEffective = (_ref4 = (_statusData$amountFro = statusData.amountFrom) != null ? _statusData$amountFro : statusData.expectedAmountFrom) != null ? _ref4 : "0";
13659
+ var amountToEffective = (_ref5 = (_statusData$amountTo = statusData.amountTo) != null ? _statusData$amountTo : statusData.expectedAmountTo) != null ? _ref5 : null;
13709
13660
  var rateVal = statusData.rate;
13710
13661
  if (rateVal == null && amountFromEffective && amountToEffective) {
13711
13662
  rateVal = BigNumber__default["default"](amountToEffective).div(amountFromEffective).toString();
13712
13663
  }
13713
13664
  if (rateVal == null) rateVal = "0";
13714
- var rateTrimmed = AmountUtils.trim(rateVal, _this6._maxRateDigits);
13665
+ var rateTrimmed = AmountUtils.trim(rateVal, _this5._maxRateDigits);
13715
13666
  var toAmountCalculated = amountToEffective;
13716
13667
  if (toAmountCalculated == null && rateVal && amountFromEffective) {
13717
13668
  toAmountCalculated = BigNumber__default["default"](amountFromEffective).times(rateVal).toString();
13718
13669
  }
13719
13670
  if (toAmountCalculated == null) toAmountCalculated = "0";
13720
13671
  var toAmountTrimmed = AmountUtils.trim(toAmountCalculated, toCoin.digits);
13721
- return new ExistingSwap(swapIds[swapIndex], _this6._mapGoexmeStatus(statusData.status), createdAt, expiresAt, -1, rateTrimmed, null, (_statusData$refundAdd = statusData.refundAddress) != null ? _statusData$refundAdd : "", statusData.depositAddress, fromCoin, AmountUtils.trim(amountFromEffective, fromCoin.digits), statusData.depositHash, null, toCoin, toAmountTrimmed, statusData.txId, null, statusData.destinationAddress, _this6.id, statusData.depositTag || null, statusData.destinationTag || null, statusData.refundTag || null);
13672
+ return new ExistingSwap(swapIds[swapIndex], _this5._mapGoexmeStatus(statusData.status), createdAt, expiresAt, -1, rateTrimmed, null, (_statusData$refundAdd = statusData.refundAddress) != null ? _statusData$refundAdd : "", statusData.depositAddress, fromCoin, AmountUtils.trim(amountFromEffective, fromCoin.digits), statusData.depositHash, null, toCoin, toAmountTrimmed, statusData.txId, null, statusData.destinationAddress, _this5.id, statusData.depositTag || null, statusData.destinationTag || null, statusData.refundTag || null);
13722
13673
  }).filter(Boolean);
13723
13674
  return {
13724
13675
  result: true,
@@ -13739,8 +13690,8 @@
13739
13690
  };
13740
13691
  _proto.getPartnersList = function getPartnersList() {
13741
13692
  try {
13742
- var _this7 = this;
13743
- return Promise.resolve([new Partner(_this7.id, "GoExme", "https://storage.swapspace.co/static/c9c19112c41a4caebf08196766eaead480e33bce2d4201c572a39c1800cb95e2.svg", KYC_LEVELS.LOW)]);
13693
+ var _this6 = this;
13694
+ return Promise.resolve([new Partner(_this6.id, "GoExme", "https://storage.swapspace.co/static/c9c19112c41a4caebf08196766eaead480e33bce2d4201c572a39c1800cb95e2.svg", KYC_LEVELS.LOW)]);
13744
13695
  } catch (e) {
13745
13696
  return Promise.reject(e);
13746
13697
  }