@rabbitio/ui-kit 1.0.0-beta.110 → 1.0.0-beta.112

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 (212) hide show
  1. package/.env +1 -1
  2. package/.env.example +1 -1
  3. package/coverage/clover.xml +1411 -1410
  4. package/coverage/coverage-final.json +18 -18
  5. package/coverage/index.html +17 -17
  6. package/coverage/ui-kit/index.html +1 -1
  7. package/coverage/ui-kit/index.js.html +1 -1
  8. package/coverage/ui-kit/src/common-apis/adapters/analyticsAdapters/googleAnalyticsAdapter.js.html +1 -1
  9. package/coverage/ui-kit/src/common-apis/adapters/analyticsAdapters/index.html +1 -1
  10. package/coverage/ui-kit/src/common-apis/adapters/analyticsAdapters/metrikaAdapter.js.html +1 -1
  11. package/coverage/ui-kit/src/common-apis/adapters/analyticsAdapters/mixpanelAdapter.js.html +1 -1
  12. package/coverage/ui-kit/src/common-apis/adapters/axiosAdapter.js.html +1 -1
  13. package/coverage/ui-kit/src/common-apis/adapters/index.html +1 -1
  14. package/coverage/ui-kit/src/common-apis/adapters/qrUtils.js.html +1 -1
  15. package/coverage/ui-kit/src/common-apis/external-apis/apiGroups.js.html +1 -1
  16. package/coverage/ui-kit/src/common-apis/external-apis/emailAPI.js.html +1 -1
  17. package/coverage/ui-kit/src/common-apis/external-apis/index.html +1 -1
  18. package/coverage/ui-kit/src/common-apis/external-apis/ipAddressProviders.js.html +1 -1
  19. package/coverage/ui-kit/src/common-apis/globalConstants.jsx.html +1 -1
  20. package/coverage/ui-kit/src/common-apis/index.html +1 -1
  21. package/coverage/ui-kit/src/common-apis/models/blockchain.js.html +4 -4
  22. package/coverage/ui-kit/src/common-apis/models/coin.js.html +221 -221
  23. package/coverage/ui-kit/src/common-apis/models/index.html +1 -1
  24. package/coverage/ui-kit/src/common-apis/models/protocol.js.html +3 -3
  25. package/coverage/ui-kit/src/common-apis/services/fiatCurrenciesService.js.html +1 -1
  26. package/coverage/ui-kit/src/common-apis/services/index.html +1 -1
  27. package/coverage/ui-kit/src/common-apis/utils/amountUtils.js.html +21 -21
  28. package/coverage/ui-kit/src/common-apis/utils/cache.js.html +6 -6
  29. package/coverage/ui-kit/src/common-apis/utils/errorUtils.js.html +13 -13
  30. package/coverage/ui-kit/src/common-apis/utils/index.html +1 -1
  31. package/coverage/ui-kit/src/common-apis/utils/logging/index.html +1 -1
  32. package/coverage/ui-kit/src/common-apis/utils/logging/logger.js.html +22 -22
  33. package/coverage/ui-kit/src/common-apis/utils/logging/logsStorage.js.html +3 -3
  34. package/coverage/ui-kit/src/common-apis/utils/postponeExecution.js.html +1 -1
  35. package/coverage/ui-kit/src/common-apis/utils/rabbitTicker.js.html +10 -10
  36. package/coverage/ui-kit/src/common-apis/utils/safeStringify.js.html +27 -27
  37. package/coverage/ui-kit/src/index.html +1 -1
  38. package/coverage/ui-kit/src/index.js.html +1 -1
  39. package/coverage/ui-kit/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +1 -1
  40. package/coverage/ui-kit/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +1 -1
  41. package/coverage/ui-kit/src/robust-api-caller/cancelProcessing.js.html +1 -1
  42. package/coverage/ui-kit/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +1 -1
  43. package/coverage/ui-kit/src/robust-api-caller/externalApiProvider.js.html +1 -1
  44. package/coverage/ui-kit/src/robust-api-caller/externalServicesStatsCollector.js.html +1 -1
  45. package/coverage/ui-kit/src/robust-api-caller/index.html +1 -1
  46. package/coverage/ui-kit/src/robust-api-caller/robustExternalAPICallerService.js.html +1 -1
  47. package/coverage/ui-kit/src/swaps-lib/external-apis/exolixSwapProvider.js.html +66 -45
  48. package/coverage/ui-kit/src/swaps-lib/external-apis/goexmeSwapProvider.js.html +521 -545
  49. package/coverage/ui-kit/src/swaps-lib/external-apis/index.html +27 -27
  50. package/coverage/ui-kit/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +1 -1
  51. package/coverage/ui-kit/src/swaps-lib/external-apis/swapProvider.js.html +328 -328
  52. package/coverage/ui-kit/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +76 -52
  53. package/coverage/ui-kit/src/swaps-lib/external-apis/utils.js.html +14 -14
  54. package/coverage/ui-kit/src/swaps-lib/models/baseSwapCreationInfo.js.html +1 -1
  55. package/coverage/ui-kit/src/swaps-lib/models/existingSwap.js.html +141 -141
  56. package/coverage/ui-kit/src/swaps-lib/models/existingSwapWithFiatData.js.html +1 -1
  57. package/coverage/ui-kit/src/swaps-lib/models/index.html +1 -1
  58. package/coverage/ui-kit/src/swaps-lib/models/partner.js.html +1 -1
  59. package/coverage/ui-kit/src/swaps-lib/models/swapProviderCoinInfo.js.html +73 -73
  60. package/coverage/ui-kit/src/swaps-lib/services/index.html +1 -1
  61. package/coverage/ui-kit/src/swaps-lib/services/publicSwapService.js.html +1 -1
  62. package/coverage/ui-kit/src/swaps-lib/utils/index.html +1 -1
  63. package/coverage/ui-kit/src/swaps-lib/utils/swapUtils.js.html +1 -1
  64. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +1 -1
  65. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +1 -1
  66. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +1 -1
  67. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +1 -1
  68. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +1 -1
  69. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +1 -1
  70. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/index.html +1 -1
  71. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +1 -1
  72. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/messageIcon.jsx.html +1 -1
  73. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +1 -1
  74. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +1 -1
  75. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/supportDialogImage.jsx.html +1 -1
  76. package/coverage/ui-kit/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +1 -1
  77. package/coverage/ui-kit/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +1 -1
  78. package/coverage/ui-kit/src/ui-kit/components/atoms/AssetIcon/index.html +1 -1
  79. package/coverage/ui-kit/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +1 -1
  80. package/coverage/ui-kit/src/ui-kit/components/atoms/AssetSelection/index.html +1 -1
  81. package/coverage/ui-kit/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +1 -1
  82. package/coverage/ui-kit/src/ui-kit/components/atoms/BackgroundTitle/index.html +1 -1
  83. package/coverage/ui-kit/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +1 -1
  84. package/coverage/ui-kit/src/ui-kit/components/atoms/InformationMessage/index.html +1 -1
  85. package/coverage/ui-kit/src/ui-kit/components/atoms/Input/Input.jsx.html +1 -1
  86. package/coverage/ui-kit/src/ui-kit/components/atoms/Input/index.html +1 -1
  87. package/coverage/ui-kit/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +1 -1
  88. package/coverage/ui-kit/src/ui-kit/components/atoms/LoadingDots/index.html +1 -1
  89. package/coverage/ui-kit/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +1 -1
  90. package/coverage/ui-kit/src/ui-kit/components/atoms/NoticeIcon/index.html +1 -1
  91. package/coverage/ui-kit/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +7 -25
  92. package/coverage/ui-kit/src/ui-kit/components/atoms/QrCode/index.html +5 -5
  93. package/coverage/ui-kit/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +1 -1
  94. package/coverage/ui-kit/src/ui-kit/components/atoms/RateSelector/index.html +1 -1
  95. package/coverage/ui-kit/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +1 -1
  96. package/coverage/ui-kit/src/ui-kit/components/atoms/SupportChat/index.html +1 -1
  97. package/coverage/ui-kit/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +1 -1
  98. package/coverage/ui-kit/src/ui-kit/components/atoms/Textarea/index.html +1 -1
  99. package/coverage/ui-kit/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +1 -1
  100. package/coverage/ui-kit/src/ui-kit/components/atoms/TitleBox/index.html +1 -1
  101. package/coverage/ui-kit/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +1 -1
  102. package/coverage/ui-kit/src/ui-kit/components/atoms/Tooltip/index.html +1 -1
  103. package/coverage/ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +1 -1
  104. package/coverage/ui-kit/src/ui-kit/components/atoms/TwoLinesOfText/index.html +1 -1
  105. package/coverage/ui-kit/src/ui-kit/components/atoms/Validation/Validation.jsx.html +1 -1
  106. package/coverage/ui-kit/src/ui-kit/components/atoms/Validation/index.html +1 -1
  107. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +1 -1
  108. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/Button/index.html +1 -1
  109. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +1 -1
  110. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/Close/index.html +1 -1
  111. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +1 -1
  112. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/LinkButton/index.html +1 -1
  113. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +1 -1
  114. package/coverage/ui-kit/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +1 -1
  115. package/coverage/ui-kit/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +1 -1
  116. package/coverage/ui-kit/src/ui-kit/components/molecules/AmountInput/index.html +1 -1
  117. package/coverage/ui-kit/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +1 -1
  118. package/coverage/ui-kit/src/ui-kit/components/molecules/CoinPicker/index.html +1 -1
  119. package/coverage/ui-kit/src/ui-kit/components/molecules/ColoredNotice/ColoredNotice.jsx.html +1 -1
  120. package/coverage/ui-kit/src/ui-kit/components/molecules/ColoredNotice/index.html +1 -1
  121. package/coverage/ui-kit/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +1 -1
  122. package/coverage/ui-kit/src/ui-kit/components/molecules/LineWithIconLink/index.html +1 -1
  123. package/coverage/ui-kit/src/ui-kit/components/molecules/LogoCarousel/LogoCarousel.jsx.html +1 -1
  124. package/coverage/ui-kit/src/ui-kit/components/molecules/LogoCarousel/index.html +1 -1
  125. package/coverage/ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/SearchableCoinsList.jsx.html +1 -1
  126. package/coverage/ui-kit/src/ui-kit/components/molecules/SearchableCoinsList/index.html +1 -1
  127. package/coverage/ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +1 -1
  128. package/coverage/ui-kit/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +1 -1
  129. package/coverage/ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +1 -1
  130. package/coverage/ui-kit/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +1 -1
  131. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +1 -1
  132. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +1 -1
  133. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +1 -1
  134. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +1 -1
  135. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +1 -1
  136. package/coverage/ui-kit/src/ui-kit/components/organisms/Dialog/index.html +1 -1
  137. package/coverage/ui-kit/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +1 -1
  138. package/coverage/ui-kit/src/ui-kit/components/organisms/SwapForm/index.html +1 -1
  139. package/coverage/ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/WaitlistSubscription.jsx.html +1 -1
  140. package/coverage/ui-kit/src/ui-kit/components/organisms/WaitlistSubscription/index.html +1 -1
  141. package/coverage/ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +1 -1
  142. package/coverage/ui-kit/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +1 -1
  143. package/coverage/ui-kit/src/ui-kit/hooks/index.html +1 -1
  144. package/coverage/ui-kit/src/ui-kit/hooks/useCallHandlingErrors.js.html +1 -1
  145. package/coverage/ui-kit/src/ui-kit/hooks/useIsHydrated.js.html +1 -1
  146. package/coverage/ui-kit/src/ui-kit/hooks/useReferredState.js.html +1 -1
  147. package/coverage/ui-kit/src/ui-kit/utils/index.html +1 -1
  148. package/coverage/ui-kit/src/ui-kit/utils/inputValueProviders.js.html +1 -1
  149. package/coverage/ui-kit/src/ui-kit/utils/searchCoins.js.html +1 -1
  150. package/coverage/ui-kit/src/ui-kit/utils/textUtils.js.html +1 -1
  151. package/coverage/ui-kit/src/ui-kit/utils/uiUtils.js.html +1 -1
  152. package/coverage/ui-kit/src/ui-kit/utils/urlQueryUtils.js.html +1 -1
  153. package/coverage/ui-kit/stories/atoms/BackgroundTitle.stories.jsx.html +1 -1
  154. package/coverage/ui-kit/stories/atoms/LinesOfText.stories.jsx.html +1 -1
  155. package/coverage/ui-kit/stories/atoms/LoadingDots.stories.jsx.html +1 -1
  156. package/coverage/ui-kit/stories/atoms/QrCode.stories.jsx.html +1 -1
  157. package/coverage/ui-kit/stories/atoms/RateSelector.stories.jsx.html +1 -1
  158. package/coverage/ui-kit/stories/atoms/Validation.stories.jsx.html +1 -1
  159. package/coverage/ui-kit/stories/atoms/buttons/Button.stories.jsx.html +1 -1
  160. package/coverage/ui-kit/stories/atoms/buttons/Close.stories.jsx.html +1 -1
  161. package/coverage/ui-kit/stories/atoms/buttons/LinkButton.stories.jsx.html +1 -1
  162. package/coverage/ui-kit/stories/atoms/buttons/index.html +1 -1
  163. package/coverage/ui-kit/stories/atoms/index.html +1 -1
  164. package/coverage/ui-kit/stories/molecules/AmountInput.stories.jsx.html +1 -1
  165. package/coverage/ui-kit/stories/molecules/CoinPicker.stories.jsx.html +1 -1
  166. package/coverage/ui-kit/stories/molecules/ColoredNotice.stories.jsx.html +1 -1
  167. package/coverage/ui-kit/stories/molecules/LineWithIconLink.stories.jsx.html +1 -1
  168. package/coverage/ui-kit/stories/molecules/LogoCarousel.stories.jsx.html +1 -1
  169. package/coverage/ui-kit/stories/molecules/TitledLineWithIconLink.stories.jsx.html +1 -1
  170. package/coverage/ui-kit/stories/molecules/index.html +1 -1
  171. package/coverage/ui-kit/stories/organisms/Dialog/Dialog.stories.jsx.html +1 -1
  172. package/coverage/ui-kit/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +1 -1
  173. package/coverage/ui-kit/stories/organisms/Dialog/DialogButtons/index.html +1 -1
  174. package/coverage/ui-kit/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +1 -1
  175. package/coverage/ui-kit/stories/organisms/Dialog/DialogStep/index.html +1 -1
  176. package/coverage/ui-kit/stories/organisms/Dialog/index.html +1 -1
  177. package/coverage/ui-kit/stories/organisms/WaitlistSubscription.stories.jsx.html +1 -1
  178. package/coverage/ui-kit/stories/organisms/index.html +1 -1
  179. package/coverage/ui-kit/stories/stubs/coins.jsx.html +1 -1
  180. package/coverage/ui-kit/stories/stubs/exampleContent.jsx.html +1 -1
  181. package/coverage/ui-kit/stories/stubs/index.html +1 -1
  182. package/coverage/ui-kit/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +1 -1
  183. package/coverage/ui-kit/stories/templates/index.html +1 -1
  184. package/dist/index.cjs +94 -92
  185. package/dist/index.cjs.map +1 -1
  186. package/dist/index.css +4 -12
  187. package/dist/index.css.map +1 -1
  188. package/dist/index.modern.js +82 -78
  189. package/dist/index.modern.js.map +1 -1
  190. package/dist/index.module.js +94 -92
  191. package/dist/index.module.js.map +1 -1
  192. package/dist/index.umd.js +94 -92
  193. package/dist/index.umd.js.map +1 -1
  194. package/package.json +1 -1
  195. package/src/common-apis/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +9 -5
  196. package/src/swaps-lib/external-apis/exolixSwapProvider.js +46 -39
  197. package/src/swaps-lib/external-apis/goexmeSwapProvider.js +29 -37
  198. package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +54 -46
  199. package/src/swaps-lib/models/existingSwap.js +1 -1
  200. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_convertCurrencyMeta.test.js +80 -0
  201. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_ensurePairsLoaded.test.js +77 -0
  202. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +50 -123
  203. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/createSwap.test.js +184 -72
  204. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getExistingSwapsDetailsAndStatus.test.js +151 -0
  205. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/getSwapInfo.test.js +155 -104
  206. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/helpers.test.js +26 -0
  207. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/PairSupport.int.test.js +57 -57
  208. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/_fetchSupportedCurrenciesIfNeeded.int.test.js +289 -126
  209. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/createSwap.int.test.js +320 -225
  210. package/src/swaps-lib/test/external-apis/goexmeSwapProvider/integration/getSwapInfo.int.test.js +138 -127
  211. package/src/ui-kit/components/atoms/QrCode/QrCode.jsx +2 -8
  212. package/src/ui-kit/components/atoms/QrCode/qr-code.module.scss +4 -11
package/dist/index.umd.js CHANGED
@@ -5870,7 +5870,7 @@
5870
5870
  }
5871
5871
  };
5872
5872
 
5873
- var s$8 = {"qr-code":"_VZ0dT","fill":"_hFE1l"};
5873
+ var s$8 = {"qr-code":"_VZ0dT"};
5874
5874
 
5875
5875
  /**
5876
5876
  * QrCode component renders a QR code for a provided crypto address.
@@ -5878,7 +5878,6 @@
5878
5878
  * @component
5879
5879
  * @param {Object} props - The props for the component.
5880
5880
  * @param {string} props.address - The crypto address to generate the QR code for.
5881
- * @param {boolean} [props.fill=false] - If true, applies additional CSS class to fill the container.
5882
5881
  *
5883
5882
  * @returns {JSX.Element} A div containing the generated QR code.
5884
5883
  */
@@ -5895,9 +5894,7 @@
5895
5894
  return result;
5896
5895
  }
5897
5896
  var QrCode = function QrCode(_ref) {
5898
- var address = _ref.address,
5899
- _ref$fill = _ref.fill,
5900
- fill = _ref$fill === void 0 ? false : _ref$fill;
5897
+ var address = _ref.address;
5901
5898
  var canvasRef = React.useRef();
5902
5899
  React.useEffect(function () {
5903
5900
  (function () {
@@ -5920,16 +5917,12 @@
5920
5917
  })();
5921
5918
  }, [address]);
5922
5919
  return /*#__PURE__*/React__default["default"].createElement("div", {
5923
- className: s$8["qr-code"] + (fill ? " " + s$8["fill"] : ""),
5920
+ className: s$8["qr-code"],
5924
5921
  ref: canvasRef
5925
5922
  });
5926
5923
  };
5927
5924
  QrCode.propTypes = {
5928
- address: PropTypes.string.isRequired,
5929
- fill: PropTypes.bool
5930
- };
5931
- QrCode.defaultProps = {
5932
- fill: false
5925
+ address: PropTypes.string.isRequired
5933
5926
  };
5934
5927
 
5935
5928
  var s$7 = {"first-line-text":"_IGz2I","wrap":"_eKd8P","break":"_mT5i4","full-text":"_PVKxC","shorted":"_wB5qV","horizontal":"_lqJz-","line":"_MGRy0","second-line-text":"_hdF64"};
@@ -10671,7 +10664,7 @@
10671
10664
  * @param {number} expiresAt - The timestamp when the swap expires.
10672
10665
  * @param {number|null} confirmations - The number of confirmations the swap has received, or null.
10673
10666
  * @param {string} rate - The exchange rate for the swap.
10674
- * @param {null} fixed - Indicates if the rate is fixed.
10667
+ * @param {boolean} fixed - Indicates if the rate is fixed.
10675
10668
  * @param {string|null} refundAddress - The address to refund to in case of failure, or null.
10676
10669
  * @param {string} payToAddress - The address to send the funds to.
10677
10670
  * @param {Coin} fromCoin - The coin that is being swapped from.
@@ -12040,32 +12033,43 @@
12040
12033
  return getNotFailingOn404(swapId);
12041
12034
  }))).then(function (responses) {
12042
12035
  var wo404 = responses.flat();
12043
- Logger.log("All swaps RAW: " + JSON.stringify(wo404.map(function (r) {
12036
+ Logger.log("All swaps RAW swapspace: " + JSON.stringify(wo404.map(function (r) {
12044
12037
  return r.data;
12045
12038
  })), loggerSource);
12046
12039
  var swaps = wo404.map(function (r) {
12047
12040
  return r.data;
12048
12041
  }).map(function (swap, index) {
12049
- var _this6$_supportedCoin, _this6$_supportedCoin2, _swap$blockExplorerTr, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
12050
- var fromCoin = (_this6$_supportedCoin = _this6._supportedCoins.find(function (i) {
12051
- return i.code === swap.from.code && i.network === swap.from.network;
12052
- })) == null ? void 0 : _this6$_supportedCoin.coin;
12053
- var toCoin = (_this6$_supportedCoin2 = _this6._supportedCoins.find(function (i) {
12054
- return i.code === swap.to.code && i.network === swap.to.network;
12055
- })) == null ? void 0 : _this6$_supportedCoin2.coin;
12056
- if (!fromCoin || !toCoin) {
12057
- return []; // We skip swaps with not supported coins for now
12042
+ try {
12043
+ var _this6$_supportedCoin, _this6$_supportedCoin2, _this6$_supportedCoin3, _this6$_supportedCoin4, _swap$blockExplorerTr, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
12044
+ var fromCoin = (_this6$_supportedCoin = (_this6$_supportedCoin2 = _this6._supportedCoins.find(function (i) {
12045
+ return i.code === swap.from.code && i.network === swap.from.network;
12046
+ })) == null ? void 0 : _this6$_supportedCoin2.coin) != null ? _this6$_supportedCoin : {
12047
+ ticker: toRabbitTicker(swap.from.code, swap.from.network),
12048
+ digits: 8
12049
+ };
12050
+ var toCoin = (_this6$_supportedCoin3 = (_this6$_supportedCoin4 = _this6._supportedCoins.find(function (i) {
12051
+ return i.code === swap.to.code && i.network === swap.to.network;
12052
+ })) == null ? void 0 : _this6$_supportedCoin4.coin) != null ? _this6$_supportedCoin3 : {
12053
+ ticker: toRabbitTicker(swap.to.code, swap.to.network),
12054
+ digits: 8
12055
+ };
12056
+ if (!fromCoin || !toCoin) {
12057
+ return []; // We skip swaps with not supported coins for now
12058
+ }
12059
+ var toUtcTimestamp = function toUtcTimestamp(timeStr) {
12060
+ return Date.parse(timeStr.match(/.+[Zz]$/) ? timeStr : timeStr + "Z");
12061
+ };
12062
+ var expiresAt = toUtcTimestamp(swap.timestamps.expiresAt);
12063
+ var isExpiredByTime = expiresAt < Date.now();
12064
+ var status = _this6._mapSwapspaceStatusToRabbitStatus(swap.status, isExpiredByTime);
12065
+ var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
12066
+ var addressToSendCoinsToSwapspace = swap.from.address;
12067
+ var toUrl = ((_swap$blockExplorerTr = swap.blockExplorerTransactionUrl.to) != null ? _swap$blockExplorerTr : "").replace(/from=swapspace&?/g, "").replaceAll(/&&+/g, "&").replace("?&", "?").replace(/&$/, "").replace(/\?$/, "");
12068
+ return new ExistingSwap(swapIds[index], status, toUtcTimestamp(swap.timestamps.createdAt), expiresAt, swap.confirmations, AmountUtils.trim(swap.rate, _this6._maxRateDigits), swap.fixed, swap.refundAddress, addressToSendCoinsToSwapspace, fromCoin, AmountUtils.trim(swap.from.amount, fromCoin.digits), swap.from.transactionHash, swap.blockExplorerTransactionUrl.from, toCoin, AmountUtils.trim(swap.to.amount, toDigits), swap.to.transactionHash, toUrl, swap.to.address, swap.partner, (_swap$from$extraId = swap.from.extraId) != null ? _swap$from$extraId : null, (_swap$to$extraId = swap.to.extraId) != null ? _swap$to$extraId : null, (_swap$refundExtraId = swap.refundExtraId) != null ? _swap$refundExtraId : null);
12069
+ } catch (e) {
12070
+ console.log("Failed to parse loaded swap", e);
12071
+ return [];
12058
12072
  }
12059
- var toUtcTimestamp = function toUtcTimestamp(timeStr) {
12060
- return Date.parse(timeStr.match(/.+[Zz]$/) ? timeStr : timeStr + "Z");
12061
- };
12062
- var expiresAt = toUtcTimestamp(swap.timestamps.expiresAt);
12063
- var isExpiredByTime = expiresAt < Date.now();
12064
- var status = _this6._mapSwapspaceStatusToRabbitStatus(swap.status, isExpiredByTime);
12065
- var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
12066
- var addressToSendCoinsToSwapspace = swap.from.address;
12067
- var toUrl = ((_swap$blockExplorerTr = swap.blockExplorerTransactionUrl.to) != null ? _swap$blockExplorerTr : "").replace(/from=swapspace&?/g, "").replaceAll(/&&+/g, "&").replace("?&", "?").replace(/&$/, "").replace(/\?$/, "");
12068
- return new ExistingSwap(swapIds[index], status, toUtcTimestamp(swap.timestamps.createdAt), expiresAt, swap.confirmations, AmountUtils.trim(swap.rate, _this6._maxRateDigits), swap.fixed, swap.refundAddress, addressToSendCoinsToSwapspace, fromCoin, AmountUtils.trim(swap.from.amount, fromCoin.digits), swap.from.transactionHash, swap.blockExplorerTransactionUrl.from, toCoin, AmountUtils.trim(swap.to.amount, toDigits), swap.to.transactionHash, toUrl, swap.to.address, swap.partner, (_swap$from$extraId = swap.from.extraId) != null ? _swap$from$extraId : null, (_swap$to$extraId = swap.to.extraId) != null ? _swap$to$extraId : null, (_swap$refundExtraId = swap.refundExtraId) != null ? _swap$refundExtraId : null);
12069
12073
  }).flat();
12070
12074
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
12071
12075
  return {
@@ -13094,25 +13098,36 @@
13094
13098
  var swaps = fetchedSwaps.map(function (r) {
13095
13099
  return r.data;
13096
13100
  }).map(function (swap, index) {
13097
- var _this5$_supportedCoin, _this5$_supportedCoin2, _swap$depositExtraId, _swap$withdrawalExtra, _swap$refundExtraId;
13098
- var fromCoin = (_this5$_supportedCoin = _this5._supportedCoins.find(function (i) {
13099
- return i.code === swap.coinFrom.coinCode && i.network === swap.coinFrom.network;
13100
- })) == null ? void 0 : _this5$_supportedCoin.coin;
13101
- var toCoin = (_this5$_supportedCoin2 = _this5._supportedCoins.find(function (i) {
13102
- return i.code === swap.coinTo.coinCode && i.network === swap.coinTo.network;
13103
- })) == null ? void 0 : _this5$_supportedCoin2.coin;
13104
- if (!fromCoin || !toCoin) {
13105
- return []; // We skip swaps with not supported coins for now
13101
+ try {
13102
+ var _this5$_supportedCoin, _this5$_supportedCoin2, _this5$_supportedCoin3, _this5$_supportedCoin4, _swap$depositExtraId, _swap$withdrawalExtra, _swap$refundExtraId;
13103
+ var fromCoin = (_this5$_supportedCoin = (_this5$_supportedCoin2 = _this5._supportedCoins.find(function (i) {
13104
+ return i.code === swap.coinFrom.coinCode && i.network === swap.coinFrom.network;
13105
+ })) == null ? void 0 : _this5$_supportedCoin2.coin) != null ? _this5$_supportedCoin : {
13106
+ ticker: toRabbitTicker(swap.coinFrom.coinCode, swap.coinFrom.network),
13107
+ digits: 8
13108
+ };
13109
+ var toCoin = (_this5$_supportedCoin3 = (_this5$_supportedCoin4 = _this5._supportedCoins.find(function (i) {
13110
+ return i.code === swap.coinTo.coinCode && i.network === swap.coinTo.network;
13111
+ })) == null ? void 0 : _this5$_supportedCoin4.coin) != null ? _this5$_supportedCoin3 : {
13112
+ ticker: toRabbitTicker(swap.coinTo.coinCode, swap.coinTo.network),
13113
+ digits: 8
13114
+ };
13115
+ if (!fromCoin || !toCoin) {
13116
+ return []; // We skip swaps with not supported coins for now
13117
+ }
13118
+ var toUtcTimestamp = function toUtcTimestamp(timeStr) {
13119
+ return Date.parse(timeStr.match(/.+[Zz]$/) ? timeStr : timeStr + "Z");
13120
+ };
13121
+ var createdAt = toUtcTimestamp(swap.createdAt);
13122
+ var expiresAt = createdAt + 25 * 60 * 1000; // Hack with hard-coded 25 minutes
13123
+ var isExpiredByTime = expiresAt < Date.now();
13124
+ var status = _this5._mapExolixStatusToRabbitStatus(swap.status, isExpiredByTime);
13125
+ var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
13126
+ return new ExistingSwap(swapIds[index], status, createdAt, expiresAt, -1, AmountUtils.trim(swap.rate, _this5._maxRateDigits), (swap == null ? void 0 : swap.rateType) === "fixed", swap.refundAddress, swap.depositAddress, fromCoin, AmountUtils.trim(swap.amount, fromCoin.digits), swap.hashIn.hash, swap.hashIn.link, toCoin, AmountUtils.trim(swap.amountTo, toDigits), swap.hashOut.hash, swap.hashOut.link, swap.withdrawalAddress, _this5.id, (_swap$depositExtraId = swap.depositExtraId) != null ? _swap$depositExtraId : null, (_swap$withdrawalExtra = swap.withdrawalExtraId) != null ? _swap$withdrawalExtra : null, (_swap$refundExtraId = swap.refundExtraId) != null ? _swap$refundExtraId : null);
13127
+ } catch (e) {
13128
+ console.log("Failed to parse loaded swap", e);
13129
+ return [];
13106
13130
  }
13107
- var toUtcTimestamp = function toUtcTimestamp(timeStr) {
13108
- return Date.parse(timeStr.match(/.+[Zz]$/) ? timeStr : timeStr + "Z");
13109
- };
13110
- var createdAt = toUtcTimestamp(swap.createdAt);
13111
- var expiresAt = createdAt + 25 * 60 * 1000; // Hack with hard-coded 25 minutes
13112
- var isExpiredByTime = expiresAt < Date.now();
13113
- var status = _this5._mapExolixStatusToRabbitStatus(swap.status, isExpiredByTime);
13114
- var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
13115
- return new ExistingSwap(swapIds[index], status, createdAt, expiresAt, -1, AmountUtils.trim(swap.rate, _this5._maxRateDigits), (swap == null ? void 0 : swap.rateType) === "fixed", swap.refundAddress, swap.depositAddress, fromCoin, AmountUtils.trim(swap.amount, fromCoin.digits), swap.hashIn.hash, swap.hashIn.link, toCoin, AmountUtils.trim(swap.amountTo, toDigits), swap.hashOut.hash, swap.hashOut.link, swap.withdrawalAddress, _this5.id, (_swap$depositExtraId = swap.depositExtraId) != null ? _swap$depositExtraId : null, (_swap$withdrawalExtra = swap.withdrawalExtraId) != null ? _swap$withdrawalExtra : null, (_swap$refundExtraId = swap.refundExtraId) != null ? _swap$refundExtraId : null);
13116
13131
  }).flat();
13117
13132
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
13118
13133
  return {
@@ -13470,10 +13485,7 @@
13470
13485
  };
13471
13486
  }
13472
13487
 
13473
- /* --------------------------------------------------------
13474
- * Convert amountTo → ratio so that downstream code can do
13475
- * amountFrom * rate === amountTo
13476
- * -------------------------------------------------------- */
13488
+ // Convert amountTo → ratio so that downstream code can do amountFrom * rate === amountTo
13477
13489
  var rateRatio = null;
13478
13490
  if (response.data.rate != null && BigNumber__default["default"](amountCoins).gt(0)) {
13479
13491
  rateRatio = AmountUtils.trim(BigNumber__default["default"](response.data.rate).div(amountCoins).toString(), _this4._maxRateDigits);
@@ -13490,10 +13502,6 @@
13490
13502
  rawSwapData: response.data,
13491
13503
  /**
13492
13504
  * GoExme never requires a refund address.
13493
- *
13494
- * The official API documentation marks `destinationTag` / `refundTag` as **optional**.
13495
- * Support chat confirmation (2025‑06‑27): "Yes, it's optional and can be omitted even for small amounts."
13496
- *
13497
13505
  */
13498
13506
  isRefundAddressRequired: false
13499
13507
  };
@@ -13516,23 +13524,28 @@
13516
13524
  /**
13517
13525
  * Creates a swap on GoExme.
13518
13526
  *
13519
- * We cannot rely on what upper layers put into
13520
- * `proprietarySwapEstimationData.rate`:
13521
- * • sometimes it is the **amountTo** (GoExme original value);
13522
- * • sometimes it is already a **ratio** – but we cannot know.
13527
+ * The `proprietarySwapEstimationData` object **must** carry two distinct values
13528
+ * produced by a prior `/rate` call:
13529
+ *
13530
+ * • `rawSwapData.rate` **amountTo**
13531
+ * (the exact number of coins GoExme will send to the user);
13532
+ * • `rate` – **ratio**
13533
+ * (`amountTo / amountFrom`, i.e. Rabbit‑style per‑coin rate).
13523
13534
  *
13524
- * The only safe approach: treat any numeric value we get from
13525
- * estimation as amountTo, then derive the ratio ourselves.
13535
+ * Processing steps
13536
+ * ----------------
13537
+ * 1. Determine **amountTo** (`rawSwapData.rate`).
13538
+ * 2. Compute the canonical per‑coin **ratio**:
13526
13539
  *
13527
- * Steps:
13528
- * 1. Pick the first non-null of
13529
- * estimation.rawSwapData.rate
13530
- * estimation.rate
13531
- * (both are amountTo for GoExme).
13532
- * 2. Store it as `toAmountCalculated`.
13533
- * 3. Compute `rateRatio = toAmount / amountFrom`.
13534
- * → both mandatory fields (`rate`, `withdrawal.amount`)
13535
- * are always present, avoiding schema validation errors.
13540
+ * ratio = amountTo / amountFrom
13541
+ *
13542
+ * 3. Return both numbers for downstream code:
13543
+ * `rate` → ratio (Rabbit convention);
13544
+ * `toAmount` amountTo (final coins the user receives).
13545
+ *
13546
+ * This guarantees the invariant:
13547
+ *
13548
+ * amountFrom * rate === toAmount
13536
13549
  */
13537
13550
  ;
13538
13551
  _proto.createSwap = function createSwap(fromCoin, toCoin, amount, toAddress, refundAddress, proprietarySwapEstimationData, clientIpAddress, fixed, toCurrencyExtraId, refundExtraId, amountIsToReceive) {
@@ -13566,6 +13579,11 @@
13566
13579
  fix: true
13567
13580
  } : {});
13568
13581
  params.amount = amount;
13582
+
13583
+ // Add refundAddress only if extraId is present:
13584
+ // GoExme documents these fields as optional, and support (2025‑06‑27) confirmed that.
13585
+ // Extract amountTo from estimation (first non-null source).
13586
+ // Derive ratio so that amountFrom * ratio = amountTo.
13569
13587
  if (toCoinInfo.hasExtraId && toCurrencyExtraId) params.destinationTag = toCurrencyExtraId;
13570
13588
  if (refundAddress) {
13571
13589
  params.refundAddress = refundAddress;
@@ -13581,13 +13599,6 @@
13581
13599
  Logger.log(errMsg, loggerSource);
13582
13600
  throw new Error(errMsg);
13583
13601
  }
13584
-
13585
- /*------------------------------------------------------------
13586
- * Extract amountTo from estimation (first non-null source).
13587
- *-----------------------------------------------------------*/
13588
- /*------------------------------------------------------------
13589
- * Derive ratio so that amountFrom * ratio = amountTo.
13590
- *-----------------------------------------------------------*/
13591
13602
  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;
13592
13603
  if (amountToCandidate == null) {
13593
13604
  throw new Error("Estimation does not contain amountTo/rate");
@@ -13651,22 +13662,18 @@
13651
13662
  }
13652
13663
  };
13653
13664
  return Promise.resolve(Promise.all(swapIds.map(fetchOne))).then(function (statusResponses) {
13654
- /* helper: normalize coin code using CODE_TRANSLATIONS */
13665
+ // helper: normalize coin code using CODE_TRANSLATIONS
13655
13666
  var normalize = function normalize(code) {
13656
13667
  var _CODE_TRANSLATIONS$co2;
13657
13668
  return (_CODE_TRANSLATIONS$co2 = CODE_TRANSLATIONS[code.toUpperCase()]) != null ? _CODE_TRANSLATIONS$co2 : code.toUpperCase();
13658
13669
  };
13659
13670
  var swaps = statusResponses.map(function (statusData, swapIndex) {
13660
- var _ref5, _statusData$amountFro, _ref6, _statusData$amountTo, _statusData$refundAdd, _statusData$txId;
13671
+ var _ref5, _statusData$amountFro, _ref6, _statusData$amountTo, _statusData$refundAdd;
13661
13672
  if (!statusData) return null;
13662
-
13663
- /* ------------------ coins ------------------ */
13664
13673
  var fromCoinTicker = toRabbitTicker(normalize(statusData.from), "");
13665
13674
  var toCoinTicker = toRabbitTicker(normalize(statusData.to), "");
13666
13675
  var fromCoin = _this6.getCoinByTickerIfPresent(fromCoinTicker);
13667
13676
  var toCoin = _this6.getCoinByTickerIfPresent(toCoinTicker);
13668
-
13669
- /* fallback: look up by raw provider code if ticker lookup failed */
13670
13677
  if (!fromCoin) {
13671
13678
  var _byCode$coin;
13672
13679
  var byCode = _this6._supportedCoins.find(function (c) {
@@ -13674,7 +13681,6 @@
13674
13681
  });
13675
13682
  fromCoin = (_byCode$coin = byCode == null ? void 0 : byCode.coin) != null ? _byCode$coin : null;
13676
13683
  }
13677
- /* fallback: look up by raw provider code if ticker lookup failed */
13678
13684
  if (!toCoin) {
13679
13685
  var _byCode$coin2;
13680
13686
  var _byCode = _this6._supportedCoins.find(function (c) {
@@ -13683,12 +13689,8 @@
13683
13689
  toCoin = (_byCode$coin2 = _byCode == null ? void 0 : _byCode.coin) != null ? _byCode$coin2 : null;
13684
13690
  }
13685
13691
  if (!fromCoin || !toCoin) return null;
13686
-
13687
- /* timestamps */
13688
13692
  var createdAt = GoexmeSwapProvider._parseGoexmeDate(statusData.date);
13689
13693
  var expiresAt = createdAt + _this6.SWAP_EXPIRATION_TIME_MS;
13690
-
13691
- /* amounts & rate */
13692
13694
  var amountFromEffective = (_ref5 = (_statusData$amountFro = statusData.amountFrom) != null ? _statusData$amountFro : statusData.expectedAmountFrom) != null ? _ref5 : "0";
13693
13695
  var amountToEffective = (_ref6 = (_statusData$amountTo = statusData.amountTo) != null ? _statusData$amountTo : statusData.expectedAmountTo) != null ? _ref6 : null;
13694
13696
  var rateVal = statusData.rate;
@@ -13703,7 +13705,7 @@
13703
13705
  }
13704
13706
  if (toAmountCalculated == null) toAmountCalculated = "0";
13705
13707
  var toAmountTrimmed = AmountUtils.trim(toAmountCalculated, toCoin.digits);
13706
- 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), null, null, toCoin, toAmountTrimmed, (_statusData$txId = statusData.txId) != null ? _statusData$txId : null, null, statusData.destinationAddress, _this6.id, statusData.depositTag || null, statusData.destinationTag || null, statusData.refundTag || null);
13708
+ 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);
13707
13709
  }).filter(Boolean);
13708
13710
  return {
13709
13711
  result: true,