@rabbitio/ui-kit 1.0.0-beta.73 → 1.0.0-beta.75

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 (246) hide show
  1. package/.husky/commit-msg +5 -0
  2. package/coverage/clover.xml +713 -4535
  3. package/coverage/coverage-final.json +96 -157
  4. package/coverage/index.html +73 -328
  5. package/coverage/{ui-kit → rabbit-ui-kit}/index.html +3 -3
  6. package/coverage/{ui-kit → rabbit-ui-kit}/index.js.html +3 -3
  7. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/axiosAdapter.js.html +3 -3
  8. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/index.html +3 -3
  9. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/adapters/qrUtils.js.html +3 -3
  10. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/amountUtils.js.html +3 -3
  11. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/errorUtils.js.html +3 -3
  12. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/apiGroups.js.html +3 -3
  13. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/index.html +3 -3
  14. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/external-apis/ipAddressProviders.js.html +3 -3
  15. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/fiatCurrenciesService.js.html +3 -3
  16. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/globalConstants.jsx.html +3 -3
  17. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/index.html +3 -3
  18. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/blockchain.js.html +3 -3
  19. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/coin.js.html +3 -3
  20. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/index.html +3 -3
  21. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/models/protocol.js.html +3 -3
  22. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/cache.js.html +3 -3
  23. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/emailAPI.js.html +3 -3
  24. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/index.html +3 -3
  25. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/index.html +3 -3
  26. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/logger.js.html +3 -3
  27. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/logging/logsStorage.js.html +3 -3
  28. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/postponeExecution.js.html +3 -3
  29. package/coverage/{ui-kit → rabbit-ui-kit}/src/common-apis/utils/safeStringify.js.html +3 -3
  30. package/coverage/{ui-kit → rabbit-ui-kit}/src/index.html +3 -3
  31. package/coverage/{ui-kit → rabbit-ui-kit}/src/index.js.html +3 -3
  32. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cacheAndConcurrentRequestsResolver.js.html +3 -3
  33. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cachedRobustExternalApiCallerService.js.html +3 -3
  34. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/cancelProcessing.js.html +3 -3
  35. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/concurrentCalculationsMetadataHolder.js.html +3 -3
  36. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/externalApiProvider.js.html +3 -3
  37. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/externalServicesStatsCollector.js.html +3 -3
  38. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/index.html +3 -3
  39. package/coverage/{ui-kit → rabbit-ui-kit}/src/robust-api-caller/robustExternalAPICallerService.js.html +3 -3
  40. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/index.html +25 -25
  41. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/letsExchangeSwapProvider.js.html +82 -25
  42. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +159 -12
  43. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +27 -9
  44. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
  45. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
  46. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +3 -3
  47. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/index.html +3 -3
  48. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/index.html +7 -7
  49. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/publicSwapService.js.html +28 -13
  50. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/index.html +3 -3
  51. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
  52. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowIcon.jsx.html +3 -3
  53. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowTosca.jsx.html +3 -3
  54. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/arrowWhite.jsx.html +3 -3
  55. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/darkRectangle.jsx.html +3 -3
  56. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/determinedError.jsx.html +3 -3
  57. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
  58. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/index.html +3 -3
  59. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/infoIcon.jsx.html +3 -3
  60. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/noticeQuestionIcon.jsx.html +3 -3
  61. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
  62. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/assets/wrappedImages/walletIcon.jsx.html +3 -3
  63. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
  64. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetIcon/index.html +3 -3
  65. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
  66. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/AssetSelection/index.html +3 -3
  67. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
  68. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/BackgroundTitle/index.html +3 -3
  69. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
  70. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/InformationMessage/index.html +3 -3
  71. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Input/Input.jsx.html +3 -3
  72. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Input/index.html +3 -3
  73. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
  74. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/LoadingDots/index.html +3 -3
  75. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/NoticeIcon/NoticeIcon.jsx.html +3 -3
  76. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/NoticeIcon/index.html +3 -3
  77. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/QrCode/QrCode.jsx.html +3 -3
  78. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/QrCode/index.html +3 -3
  79. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/RateSelector/RateSelector.jsx.html +3 -3
  80. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/RateSelector/index.html +3 -3
  81. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
  82. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/SupportChat/index.html +3 -3
  83. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Textarea/Textarea.jsx.html +3 -3
  84. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Textarea/index.html +3 -3
  85. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
  86. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TitleBox/index.html +3 -3
  87. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
  88. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Tooltip/index.html +3 -3
  89. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
  90. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/TwoLinesOfText/index.html +3 -3
  91. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Validation/Validation.jsx.html +3 -3
  92. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/Validation/index.html +3 -3
  93. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Button/Button.jsx.html +3 -3
  94. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Button/index.html +3 -3
  95. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Close/Close.jsx.html +3 -3
  96. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/Close/index.html +3 -3
  97. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
  98. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/LinkButton/index.html +3 -3
  99. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
  100. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
  101. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/AmountInput/AmountInput.jsx.html +3 -3
  102. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/AmountInput/index.html +3 -3
  103. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/CoinPicker/CoinPicker.jsx.html +3 -3
  104. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/CoinPicker/index.html +3 -3
  105. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
  106. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/LineWithIconLink/index.html +3 -3
  107. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
  108. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/molecules/TitledLineWithIconLink/index.html +3 -3
  109. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
  110. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/CoinPickerDialogStep/index.html +3 -3
  111. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/Dialog.jsx.html +3 -3
  112. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
  113. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogButtons/index.html +3 -3
  114. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +3 -3
  115. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/DialogStep/index.html +3 -3
  116. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/Dialog/index.html +3 -3
  117. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx.html +99 -24
  118. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/organisms/SwapForm/index.html +7 -7
  119. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
  120. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/components/templates/DeterminedErrorDialogStep/index.html +3 -3
  121. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/index.html +3 -3
  122. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useCallHandlingErrors.js.html +3 -3
  123. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useIsHydrated.js.html +3 -3
  124. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/hooks/useReferredState.js.html +3 -3
  125. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/index.html +3 -3
  126. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/inputValueProviders.js.html +3 -3
  127. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/textUtils.js.html +3 -3
  128. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/uiUtils.js.html +3 -3
  129. package/coverage/{ui-kit → rabbit-ui-kit}/src/ui-kit/utils/urlQueryUtils.js.html +3 -3
  130. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
  131. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
  132. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
  133. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
  134. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
  135. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
  136. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
  137. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
  138. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
  139. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/index.html +3 -3
  140. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/index.html +3 -3
  141. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
  142. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
  143. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/index.html +3 -3
  144. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
  145. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
  146. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
  147. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
  148. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
  149. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/index.html +3 -3
  150. package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
  151. package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/index.html +3 -3
  152. package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
  153. package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/index.html +3 -3
  154. package/dist/index.cjs +139 -86
  155. package/dist/index.cjs.map +1 -1
  156. package/dist/index.modern.js +99 -51
  157. package/dist/index.modern.js.map +1 -1
  158. package/dist/index.module.js +139 -86
  159. package/dist/index.module.js.map +1 -1
  160. package/dist/index.umd.js +139 -86
  161. package/dist/index.umd.js.map +1 -1
  162. package/package.json +1 -1
  163. package/src/swaps-lib/external-apis/letsExchangeSwapProvider.js +38 -19
  164. package/src/swaps-lib/external-apis/swapProvider.js +50 -1
  165. package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +7 -1
  166. package/src/swaps-lib/services/publicSwapService.js +12 -7
  167. package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +1 -1
  168. package/src/ui-kit/components/organisms/SwapForm/SwapForm.jsx +43 -18
  169. package/coverage/ui-kit/storybook-static/124.c2d01e5e.iframe.bundle.js.html +0 -85
  170. package/coverage/ui-kit/storybook-static/138.56b7edc4.iframe.bundle.js.html +0 -85
  171. package/coverage/ui-kit/storybook-static/312.6f62bbd9.iframe.bundle.js.html +0 -85
  172. package/coverage/ui-kit/storybook-static/341.57a15f57.iframe.bundle.js.html +0 -85
  173. package/coverage/ui-kit/storybook-static/370.73bb343e.iframe.bundle.js.html +0 -85
  174. package/coverage/ui-kit/storybook-static/595.2e40d981.iframe.bundle.js.html +0 -85
  175. package/coverage/ui-kit/storybook-static/607.3ea32459.iframe.bundle.js.html +0 -85
  176. package/coverage/ui-kit/storybook-static/609.8c79ec77.iframe.bundle.js.html +0 -85
  177. package/coverage/ui-kit/storybook-static/666.09fdc1d7.iframe.bundle.js.html +0 -85
  178. package/coverage/ui-kit/storybook-static/797.c87cdf19.iframe.bundle.js.html +0 -85
  179. package/coverage/ui-kit/storybook-static/822.4bc0ebce.iframe.bundle.js.html +0 -85
  180. package/coverage/ui-kit/storybook-static/833.08e3ebb6.iframe.bundle.js.html +0 -85
  181. package/coverage/ui-kit/storybook-static/862.bf6bfe62.iframe.bundle.js.html +0 -85
  182. package/coverage/ui-kit/storybook-static/87.0a1bfeb1.iframe.bundle.js.html +0 -85
  183. package/coverage/ui-kit/storybook-static/893.4b09f929.iframe.bundle.js.html +0 -85
  184. package/coverage/ui-kit/storybook-static/996.846a677b.iframe.bundle.js.html +0 -85
  185. package/coverage/ui-kit/storybook-static/atoms-BackgroundTitle-stories.1a5386a1.iframe.bundle.js.html +0 -85
  186. package/coverage/ui-kit/storybook-static/atoms-LinesOfText-stories.7043a48b.iframe.bundle.js.html +0 -85
  187. package/coverage/ui-kit/storybook-static/atoms-LoadingDots-stories.091245c7.iframe.bundle.js.html +0 -85
  188. package/coverage/ui-kit/storybook-static/atoms-QrCode-stories.e10363b6.iframe.bundle.js.html +0 -85
  189. package/coverage/ui-kit/storybook-static/atoms-RateSelector-stories.af208e9a.iframe.bundle.js.html +0 -85
  190. package/coverage/ui-kit/storybook-static/atoms-Validation-stories.d561b311.iframe.bundle.js.html +0 -85
  191. package/coverage/ui-kit/storybook-static/atoms-buttons-Button-stories.e8e6b930.iframe.bundle.js.html +0 -85
  192. package/coverage/ui-kit/storybook-static/atoms-buttons-Close-stories.0a902a7c.iframe.bundle.js.html +0 -85
  193. package/coverage/ui-kit/storybook-static/atoms-buttons-LinkButton-stories.ca93ab6b.iframe.bundle.js.html +0 -85
  194. package/coverage/ui-kit/storybook-static/index.html +0 -596
  195. package/coverage/ui-kit/storybook-static/main.41f410f2.iframe.bundle.js.html +0 -85
  196. package/coverage/ui-kit/storybook-static/molecules-LineWithIconLink-stories.9721a18c.iframe.bundle.js.html +0 -85
  197. package/coverage/ui-kit/storybook-static/molecules-TitledLineWithIconLink-stories.1383fe3f.iframe.bundle.js.html +0 -85
  198. package/coverage/ui-kit/storybook-static/organisms-Dialog-Dialog-stories.4e6da717.iframe.bundle.js.html +0 -85
  199. package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogButtons-DialogButtons-stories.6f45ae6e.iframe.bundle.js.html +0 -85
  200. package/coverage/ui-kit/storybook-static/organisms-Dialog-DialogStep-DialogStep-stories.74896048.iframe.bundle.js.html +0 -85
  201. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/index.html +0 -116
  202. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/addon-backgrounds/dist/preview.js.html +0 -118
  203. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/formatter-SWP5E3XI.mjs.html +0 -118
  204. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/@storybook/components/dist/index.html +0 -116
  205. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.html +0 -116
  206. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/buffer/index.js.html +0 -118
  207. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.html +0 -116
  208. package/coverage/ui-kit/storybook-static/rabbitio/ui-kit/node_modules/markdown-to-jsx/dist/index.modern.js.html +0 -118
  209. package/coverage/ui-kit/storybook-static/runtime~main.ad918f38.iframe.bundle.js.html +0 -85
  210. package/coverage/ui-kit/storybook-static/sb-addons/actions-9/index.html +0 -116
  211. package/coverage/ui-kit/storybook-static/sb-addons/actions-9/manager-bundle.js.html +0 -94
  212. package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/index.html +0 -116
  213. package/coverage/ui-kit/storybook-static/sb-addons/essentials-backgrounds-2/manager-bundle.js.html +0 -121
  214. package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/index.html +0 -116
  215. package/coverage/ui-kit/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.html +0 -274
  216. package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/index.html +0 -116
  217. package/coverage/ui-kit/storybook-static/sb-addons/essentials-measure-4/manager-bundle.js.html +0 -94
  218. package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/index.html +0 -116
  219. package/coverage/ui-kit/storybook-static/sb-addons/essentials-outline-5/manager-bundle.js.html +0 -94
  220. package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/index.html +0 -116
  221. package/coverage/ui-kit/storybook-static/sb-addons/essentials-toolbars-3/manager-bundle.js.html +0 -94
  222. package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/index.html +0 -116
  223. package/coverage/ui-kit/storybook-static/sb-addons/interactions-7/manager-bundle.js.html +0 -121
  224. package/coverage/ui-kit/storybook-static/sb-addons/links-0/index.html +0 -116
  225. package/coverage/ui-kit/storybook-static/sb-addons/links-0/manager-bundle.js.html +0 -94
  226. package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/index.html +0 -116
  227. package/coverage/ui-kit/storybook-static/sb-addons/onboarding-6/manager-bundle.js.html +0 -1588
  228. package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/index.html +0 -116
  229. package/coverage/ui-kit/storybook-static/sb-addons/viewport-8/manager-bundle.js.html +0 -94
  230. package/coverage/ui-kit/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js.html +0 -88
  231. package/coverage/ui-kit/storybook-static/sb-manager/chunk-2IXBUOFS.js.html +0 -106
  232. package/coverage/ui-kit/storybook-static/sb-manager/chunk-INSKDKQB.js.html +0 -1129
  233. package/coverage/ui-kit/storybook-static/sb-manager/chunk-NGTUFCUO.js.html +0 -112
  234. package/coverage/ui-kit/storybook-static/sb-manager/chunk-UUEAOBSN.js.html +0 -1303
  235. package/coverage/ui-kit/storybook-static/sb-manager/chunk-ZEU7PDD3.js.html +0 -88
  236. package/coverage/ui-kit/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js.html +0 -553
  237. package/coverage/ui-kit/storybook-static/sb-manager/globals-module-info.js.html +0 -88
  238. package/coverage/ui-kit/storybook-static/sb-manager/globals.js.html +0 -88
  239. package/coverage/ui-kit/storybook-static/sb-manager/index.html +0 -281
  240. package/coverage/ui-kit/storybook-static/sb-manager/index.js.html +0 -88
  241. package/coverage/ui-kit/storybook-static/sb-manager/runtime.js.html +0 -88
  242. package/coverage/ui-kit/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js.html +0 -88
  243. package/coverage/ui-kit/storybook-static/sb-preview/globals.js.html +0 -88
  244. package/coverage/ui-kit/storybook-static/sb-preview/index.html +0 -131
  245. package/coverage/ui-kit/storybook-static/sb-preview/runtime.js.html +0 -421
  246. package/coverage/ui-kit/storybook-static/templates-DeterminedErrorDialogStep-stories.3cc14214.iframe.bundle.js.html +0 -85
@@ -4728,7 +4728,7 @@ var SwapForm = function SwapForm(_ref) {
4728
4728
  _ref$formHasBalance = _ref.formHasBalance,
4729
4729
  formHasBalance = _ref$formHasBalance === void 0 ? false : _ref$formHasBalance,
4730
4730
  _ref$retrieveSwapDeta = _ref.retrieveSwapDetails,
4731
- retrieveSwapDetails = _ref$retrieveSwapDeta === void 0 ? function (sendingAssetTicker, receivingAssetTicker, amount, isSwapAll, editedLastInput) {
4731
+ retrieveSwapDetails = _ref$retrieveSwapDeta === void 0 ? function (sendingAssetTicker, receivingAssetTicker, amount, isSwapAll, isFixed, amountIsToReceive) {
4732
4732
  return Promise.resolve();
4733
4733
  } : _ref$retrieveSwapDeta,
4734
4734
  _ref$retrieveInitialS = _ref.retrieveInitialSwapData,
@@ -4755,6 +4755,10 @@ var SwapForm = function SwapForm(_ref) {
4755
4755
  termsOfUseUrl = _ref$termsOfUseUrl === void 0 ? null : _ref$termsOfUseUrl,
4756
4756
  _ref$privacyPolicyUrl = _ref.privacyPolicyUrl,
4757
4757
  privacyPolicyUrl = _ref$privacyPolicyUrl === void 0 ? null : _ref$privacyPolicyUrl,
4758
+ _ref$getExtraIdNameBy = _ref.getExtraIdNameByTicker,
4759
+ getExtraIdNameByTicker = _ref$getExtraIdNameBy === void 0 ? function (ticker) {
4760
+ return null;
4761
+ } : _ref$getExtraIdNameBy,
4758
4762
  _ref$validateAddressB = _ref.validateAddressByTicker,
4759
4763
  validateAddressByTicker = _ref$validateAddressB === void 0 ? function () {
4760
4764
  return false;
@@ -4764,8 +4768,6 @@ var SwapForm = function SwapForm(_ref) {
4764
4768
  swapButtonAlwaysActive = _ref$swapButtonAlways === void 0 ? false : _ref$swapButtonAlways,
4765
4769
  _ref$onIsFixedChange = _ref.onIsFixedChange,
4766
4770
  onIsFixedChange = _ref$onIsFixedChange === void 0 ? function () {} : _ref$onIsFixedChange,
4767
- recipientAddressExtraIdName = _ref.recipientAddressExtraIdName,
4768
- refundAddressExtraIdName = _ref.refundAddressExtraIdName,
4769
4771
  _ref$translations = _ref.translations,
4770
4772
  translations = _ref$translations === void 0 ? {
4771
4773
  swapAllButtonTitles: {
@@ -4809,6 +4811,8 @@ var SwapForm = function SwapForm(_ref) {
4809
4811
  } : _ref$translations;
4810
4812
  var DETAIL_REFRESH_INTERVAL_MS = 1.5 * 60000;
4811
4813
  var IS_FIXED_BY_DEFAULT = false;
4814
+
4815
+ // Updating the states below will insert the new value into the send or receive input field
4812
4816
  var _useState = useState(preservedAmount != null ? preservedAmount : null),
4813
4817
  updateSendInputTo = _useState[0],
4814
4818
  setUpdateSendInputTo = _useState[1];
@@ -4818,15 +4822,18 @@ var SwapForm = function SwapForm(_ref) {
4818
4822
  var _useReferredState = useReferredState(preservedAmount == null || preservedAmount === "" ? null : preservedAmount),
4819
4823
  sendAssetAmount = _useReferredState[0],
4820
4824
  setSendAssetAmount = _useReferredState[1];
4825
+ var _useReferredState2 = useReferredState(null),
4826
+ receiveAssetAmount = _useReferredState2[0],
4827
+ setReceiveAssetAmount = _useReferredState2[1];
4821
4828
  var _useState3 = useState(),
4822
4829
  swapRate = _useState3[0],
4823
4830
  setSwapRate = _useState3[1];
4824
- var _useReferredState2 = useReferredState(null),
4825
- minimalAmount = _useReferredState2[0],
4826
- setMinimalAmount = _useReferredState2[1];
4827
4831
  var _useReferredState3 = useReferredState(null),
4828
- maximumAmount = _useReferredState3[0],
4829
- setMaximumAmount = _useReferredState3[1];
4832
+ minimalAmount = _useReferredState3[0],
4833
+ setMinimalAmount = _useReferredState3[1];
4834
+ var _useReferredState4 = useReferredState(null),
4835
+ maximumAmount = _useReferredState4[0],
4836
+ setMaximumAmount = _useReferredState4[1];
4830
4837
  var _useState4 = useState(),
4831
4838
  validationContent = _useState4[0],
4832
4839
  setValidationContent = _useState4[1];
@@ -4848,15 +4855,17 @@ var SwapForm = function SwapForm(_ref) {
4848
4855
  var _useState10 = useState(false),
4849
4856
  readyToSwap = _useState10[0],
4850
4857
  setReadyToSwap = _useState10[1]; // Basically a param that enables/disables the "Next" button
4858
+ // TODO: [refactoring, moderate] instead of handling preservedAmount at a lot of cases below, just
4859
+ // write single useEffect setting sendAssetAmount to the=is passed value and simplify the logic below. task_id=6453251e49b04c5e88a3cc771479ffb5
4851
4860
  var _useState11 = useState(preservedAmount == null || String(preservedAmount) === "0"),
4852
4861
  isAmountZero = _useState11[0],
4853
4862
  setIsAmountZero = _useState11[1];
4854
- var _useReferredState4 = useReferredState(false),
4855
- isLoading = _useReferredState4[0],
4856
- setIsLoading = _useReferredState4[1]; // Whether the form is in the progress of loading some data (new rates, for example)
4857
- var _useReferredState5 = useReferredState(null),
4858
- isFixedRate = _useReferredState5[0],
4859
- setIsFixedRate = _useReferredState5[1];
4863
+ var _useReferredState5 = useReferredState(false),
4864
+ isLoading = _useReferredState5[0],
4865
+ setIsLoading = _useReferredState5[1]; // Whether the form is in the progress of loading some data (new rates, for example)
4866
+ var _useReferredState6 = useReferredState(null),
4867
+ isFixedRate = _useReferredState6[0],
4868
+ setIsFixedRate = _useReferredState6[1];
4860
4869
  var _useState12 = useState(false),
4861
4870
  isLastEditedReceiving = _useState12[0],
4862
4871
  setIsLastEditedReceiving = _useState12[1];
@@ -4869,39 +4878,39 @@ var SwapForm = function SwapForm(_ref) {
4869
4878
  var _useState15 = useState(true),
4870
4879
  balanceValid = _useState15[0],
4871
4880
  setBalanceValid = _useState15[1]; // Whether the amount is less than total balance
4872
- var _useReferredState6 = useReferredState(null),
4873
- isSwapAll = _useReferredState6[0],
4874
- setIsSwapAll = _useReferredState6[1];
4881
+ var _useReferredState7 = useReferredState(null),
4882
+ isSwapAll = _useReferredState7[0],
4883
+ setIsSwapAll = _useReferredState7[1];
4875
4884
  var _useState16 = useState([]),
4876
4885
  swapAllButtonLoaderReSetter = _useState16[0],
4877
4886
  setSwapAllButtonLoaderReSetter = _useState16[1];
4878
- var _useReferredState7 = useReferredState(null),
4879
- dataUpdateTimeoutId = _useReferredState7[0],
4880
- setDataUpdateTimeoutId = _useReferredState7[1];
4881
4887
  var _useReferredState8 = useReferredState(null),
4882
- idleDataUpdateTimeoutId = _useReferredState8[0],
4883
- setIdleDataUpdateTimeoutId = _useReferredState8[1];
4884
- var _useReferredState9 = useReferredState(""),
4885
- recipientAddress = _useReferredState9[0],
4886
- setRecipientAddress = _useReferredState9[1];
4888
+ dataUpdateTimeoutId = _useReferredState8[0],
4889
+ setDataUpdateTimeoutId = _useReferredState8[1];
4890
+ var _useReferredState9 = useReferredState(null),
4891
+ idleDataUpdateTimeoutId = _useReferredState9[0],
4892
+ setIdleDataUpdateTimeoutId = _useReferredState9[1];
4887
4893
  var _useReferredState10 = useReferredState(""),
4888
- recipientAddressExtraId = _useReferredState10[0],
4889
- setRecipientAddressExtraId = _useReferredState10[1];
4890
- var _useReferredState11 = useReferredState(false),
4891
- isRecipientAddressValid = _useReferredState11[0],
4892
- setIsRecipientAddressValid = _useReferredState11[1];
4894
+ recipientAddress = _useReferredState10[0],
4895
+ setRecipientAddress = _useReferredState10[1];
4896
+ var _useReferredState11 = useReferredState(""),
4897
+ recipientAddressExtraId = _useReferredState11[0],
4898
+ setRecipientAddressExtraId = _useReferredState11[1];
4899
+ var _useReferredState12 = useReferredState(false),
4900
+ isRecipientAddressValid = _useReferredState12[0],
4901
+ setIsRecipientAddressValid = _useReferredState12[1];
4893
4902
  var _useState17 = useState(false),
4894
4903
  isRefundAddressRequired = _useState17[0],
4895
4904
  setIsRefundAddressRequired = _useState17[1];
4896
- var _useReferredState12 = useReferredState(""),
4897
- refundAddress = _useReferredState12[0],
4898
- setRefundAddress = _useReferredState12[1];
4899
4905
  var _useReferredState13 = useReferredState(""),
4900
- refundAddressExtraId = _useReferredState13[0],
4901
- setRefundAddressExtraId = _useReferredState13[1];
4902
- var _useReferredState14 = useReferredState(false),
4903
- isRefundAddressValid = _useReferredState14[0],
4904
- setIsRefundAddressValid = _useReferredState14[1];
4906
+ refundAddress = _useReferredState13[0],
4907
+ setRefundAddress = _useReferredState13[1];
4908
+ var _useReferredState14 = useReferredState(""),
4909
+ refundAddressExtraId = _useReferredState14[0],
4910
+ setRefundAddressExtraId = _useReferredState14[1];
4911
+ var _useReferredState15 = useReferredState(false),
4912
+ isRefundAddressValid = _useReferredState15[0],
4913
+ setIsRefundAddressValid = _useReferredState15[1];
4905
4914
  var callHandlingErrors = useCallHandlingErrors();
4906
4915
  var isHydrated = useIsHydrated();
4907
4916
  var recalculationDelayOnTyping = 1000;
@@ -4909,14 +4918,17 @@ var SwapForm = function SwapForm(_ref) {
4909
4918
  var displayRateSelector = !formHasBalance;
4910
4919
  var handleSendAssetAmountChange = function handleSendAssetAmountChange(amount) {
4911
4920
  setIsLastEditedReceiving(false);
4921
+ var receiveAmount = AmountUtils.trim(BigNumber(amount).times(swapRate), receivingAssetDecimalCount);
4912
4922
  if (amount != null && amount !== "") {
4913
- setUpdateReceiveInputTo(AmountUtils.trim(BigNumber(amount).times(swapRate), receivingAssetDecimalCount));
4923
+ setReceiveAssetAmount(receiveAmount);
4924
+ setUpdateReceiveInputTo(receiveAmount);
4914
4925
  } else {
4915
4926
  setUpdateReceiveInputTo("");
4916
4927
  }
4917
4928
  setSendAssetAmount(amount);
4918
4929
  };
4919
4930
  var handleReceiveAssetAmountChange = function handleReceiveAssetAmountChange(amount) {
4931
+ setReceiveAssetAmount(amount);
4920
4932
  setIsLastEditedReceiving(true);
4921
4933
  var sendAssetAmount = "";
4922
4934
  if (amount != null && amount !== "") {
@@ -5037,14 +5049,12 @@ var SwapForm = function SwapForm(_ref) {
5037
5049
  setIsPairSupported(true);
5038
5050
  setIsSwapCalculated(false);
5039
5051
  return Promise.resolve(retrieveSwapDetails(sendingAssetTicker, receivingAssetTicker, amount, isSwapAll.current, (_isFixedRate$current = isFixedRate.current) != null ? _isFixedRate$current : IS_FIXED_BY_DEFAULT, isFixedRate.current ? isLastEditedReceiving : false)).then(function (response) {
5040
- if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null ? preservedAmount : sendAssetAmount.current)) {
5052
+ if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null ? preservedAmount : isFixedRate.current && isLastEditedReceiving ? receiveAssetAmount.current : sendAssetAmount.current)) {
5041
5053
  // Means amount changed and we no more need to do this exact calculation
5042
5054
  return;
5043
5055
  }
5044
5056
  if (response.result) {
5045
5057
  var swapCreationInfo = response.swapCreationInfo;
5046
- setUpdateSendInputTo(swapCreationInfo.fromAmountCoins);
5047
- setUpdateReceiveInputTo(swapCreationInfo.toAmountCoins);
5048
5058
  if (isSwapAll.current) {
5049
5059
  setIsAmountZero(BigNumber("0").eq(swapCreationInfo.fromAmountCoins));
5050
5060
  }
@@ -5053,6 +5063,8 @@ var SwapForm = function SwapForm(_ref) {
5053
5063
  setIsRefundAddressRequired(swapCreationInfo == null ? void 0 : swapCreationInfo.isRefundAddressRequired);
5054
5064
  processMinMaxAmounts(isSwapAll.current ? swapCreationInfo.fromAmountCoins : amount);
5055
5065
  setIsSwapCalculated(true);
5066
+ setUpdateSendInputTo(swapCreationInfo.fromAmountCoins);
5067
+ setUpdateReceiveInputTo(swapCreationInfo.toAmountCoins);
5056
5068
  } else {
5057
5069
  handleSwapServiceError(response.reason, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins);
5058
5070
  if (isSwapAll.current) {
@@ -5124,7 +5136,7 @@ var SwapForm = function SwapForm(_ref) {
5124
5136
  };
5125
5137
  var handleRateModeChanged = function handleRateModeChanged(isFixed) {
5126
5138
  setIsFixedRate(isFixed);
5127
- requestDataRefresh(sendAssetAmount.current, true);
5139
+ requestDataRefresh(isLastEditedReceiving ? receiveAssetAmount.current : sendAssetAmount.current, true);
5128
5140
  };
5129
5141
  useEffect(function () {
5130
5142
  if (isSwapAll.current === true) {
@@ -5147,7 +5159,7 @@ var SwapForm = function SwapForm(_ref) {
5147
5159
  var isCurrentAmountNotZero = sendAssetAmount.current && !BigNumber("0").eq(sendAssetAmount.current);
5148
5160
  var isPreservedAmountNotZero = preservedAmount && !BigNumber("0").eq(preservedAmount);
5149
5161
  if (isCurrentAmountNotZero) {
5150
- loadFullEstimation(sendAssetAmount.current);
5162
+ loadFullEstimation(isLastEditedReceiving ? receiveAssetAmount.current : sendAssetAmount.current);
5151
5163
  } else if (isPreservedAmountNotZero) {
5152
5164
  loadFullEstimation(preservedAmount, true);
5153
5165
  } else {
@@ -5214,7 +5226,7 @@ var SwapForm = function SwapForm(_ref) {
5214
5226
  if (readyToSwap) {
5215
5227
  timeoutId = setTimeout(function () {
5216
5228
  var _sendAssetAmount$curr;
5217
- return requestDataRefresh((_sendAssetAmount$curr = sendAssetAmount.current) != null ? _sendAssetAmount$curr : preservedAmount, true);
5229
+ return requestDataRefresh(isLastEditedReceiving ? receiveAssetAmount.current : (_sendAssetAmount$curr = sendAssetAmount.current) != null ? _sendAssetAmount$curr : preservedAmount, true);
5218
5230
  }, DETAIL_REFRESH_INTERVAL_MS);
5219
5231
  setIdleDataUpdateTimeoutId(timeoutId);
5220
5232
  } else {
@@ -5242,7 +5254,11 @@ var SwapForm = function SwapForm(_ref) {
5242
5254
  }, [updateSendInputTo, updateReceiveInputTo]);
5243
5255
  useEffect(function () {
5244
5256
  if (swapRate != null && sendAssetAmount.current != null) {
5245
- setUpdateReceiveInputTo(AmountUtils.trim(BigNumber(sendAssetAmount.current).times(swapRate), receivingAssetDecimalCount));
5257
+ if (isLastEditedReceiving) {
5258
+ setUpdateSendInputTo(AmountUtils.trim(BigNumber(receiveAssetAmount.current).div(swapRate), sendingAssetDecimalCount));
5259
+ } else {
5260
+ setUpdateReceiveInputTo(AmountUtils.trim(BigNumber(sendAssetAmount.current).times(swapRate), receivingAssetDecimalCount));
5261
+ }
5246
5262
  }
5247
5263
  // eslint-disable-next-line react-hooks/exhaustive-deps
5248
5264
  }, [swapRate]);
@@ -5257,12 +5273,15 @@ var SwapForm = function SwapForm(_ref) {
5257
5273
  setConfirmButtonTo(composeConfirmButtonTo(sendingAssetTicker, receivingAssetTicker, sendAssetAmount.current));
5258
5274
  if (sendAssetAmount.current == null) return;
5259
5275
  var processingAmount = sendAssetAmount.current === "" ? "0" : sendAssetAmount.current;
5260
- requestDataRefresh(processingAmount);
5276
+ var processingReceivingAmount = receiveAssetAmount.current === "" ? "0" : receiveAssetAmount.current;
5277
+ requestDataRefresh(isLastEditedReceiving ? processingReceivingAmount : processingAmount);
5261
5278
  processMinMaxAmounts(processingAmount);
5262
5279
  setIsAmountZero(BigNumber("0").eq(processingAmount));
5263
5280
  setIsSwapCalculated(false);
5264
5281
  // eslint-disable-next-line react-hooks/exhaustive-deps
5265
5282
  }, [sendAssetAmount.current]);
5283
+ var recipientAddressExtraIdName = getExtraIdNameByTicker(receivingAssetTicker);
5284
+ var refundAddressExtraIdName = getExtraIdNameByTicker(sendingAssetTicker);
5266
5285
  return /*#__PURE__*/React.createElement("div", {
5267
5286
  className: s$9["swap-form"]
5268
5287
  }, /*#__PURE__*/React.createElement(TitleBox, {
@@ -5302,7 +5321,7 @@ var SwapForm = function SwapForm(_ref) {
5302
5321
  upperFormPosition: true,
5303
5322
  errorEncountered: !minimalAmountValid,
5304
5323
  ref: fromAssetSelectionButtonRef,
5305
- isLoading: false,
5324
+ isLoading: isLastEditedReceiving ? isLoading.current : false,
5306
5325
  cryptoAssetToFiatRate: sendingAssetToFiatRate,
5307
5326
  fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
5308
5327
  fiatCurrencyDecimals: fiatCurrencyDecimals,
@@ -5336,7 +5355,7 @@ var SwapForm = function SwapForm(_ref) {
5336
5355
  lowerFormPosition: true,
5337
5356
  estimateAmount: !isFixedRate.current,
5338
5357
  ref: toAssetSelectionButtonRef,
5339
- isLoading: isLoading.current,
5358
+ isLoading: isLastEditedReceiving ? false : isLoading.current,
5340
5359
  cryptoAssetToFiatRate: receivingAssetToFiatRate,
5341
5360
  fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
5342
5361
  fiatCurrencyDecimals: fiatCurrencyDecimals,
@@ -5427,7 +5446,7 @@ var SwapForm = function SwapForm(_ref) {
5427
5446
  mode: "primary",
5428
5447
  content: translations.confirmButtonText,
5429
5448
  onClick: function onClick(resetButtonLoader) {
5430
- return handleConfirmButtonClick(resetButtonLoader, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins, recipientAddress.current, recipientAddressExtraId.current, refundAddress.current, refundAddressExtraId.current);
5449
+ return handleConfirmButtonClick(resetButtonLoader, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins, recipientAddress.current, recipientAddressExtraId.current, refundAddress.current, refundAddressExtraId.current, isLastEditedReceiving);
5431
5450
  },
5432
5451
  fullWidthOnMobiles: true,
5433
5452
  isDisabled: !readyToSwap,
@@ -9663,8 +9682,28 @@ var SwapProvider = /*#__PURE__*/function () {
9663
9682
  * @private
9664
9683
  */;
9665
9684
  _proto._putPopularCoinsFirst = function _putPopularCoinsFirst() {
9685
+ var popularCoinsList = ["BTC", "ETH", "USDTERC20", "USDTTRC20", "USDCERC20", "XRP", "TON", "XMR", "TRX", "DAIERC20", "DOGE", "BNB", "PEPEERC20", "NOTTON", "SOL", "DOT", "LTC", "SHIBERC20", "AVAX", "UNIERC20", "LINKERC20", "MATIC", "BUSDBEP20", "AAVEERC20", "ATOM", "RUNE", "ADA"];
9666
9686
  this._supportedCoins.sort(function (i1, i2) {
9667
- if (i1.isPopular !== i2.isPopular) return i2.isPopular - i1.isPopular;
9687
+ var isInPopularList1 = popularCoinsList.includes(i1.coin.ticker);
9688
+ var isInPopularList2 = popularCoinsList.includes(i2.coin.ticker);
9689
+
9690
+ // If both are in the popularCoinsList, sort by their index in the list
9691
+ if (isInPopularList1 && isInPopularList2) {
9692
+ var index1 = popularCoinsList.indexOf(i1.coin.ticker);
9693
+ var index2 = popularCoinsList.indexOf(i2.coin.ticker);
9694
+ return index1 - index2;
9695
+ }
9696
+
9697
+ // Sort by whether the coin is in the popularCoinsList
9698
+ if (isInPopularList1 && !isInPopularList2) return -1;
9699
+ if (!isInPopularList1 && isInPopularList2) return 1;
9700
+
9701
+ // If both are not in the popularCoinsList, use the isPopular flag - partners can fill it
9702
+ var p1 = i1.isPopular;
9703
+ var p2 = i2.isPopular;
9704
+ if (p1 !== p2) return p2 - p1;
9705
+
9706
+ // By default, sort by the coin ticker
9668
9707
  return i1.coin.ticker.localeCompare(i2.coin.ticker);
9669
9708
  });
9670
9709
  }
@@ -10557,7 +10596,7 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
10557
10596
  var swaps = wo404.map(function (r) {
10558
10597
  return r.data;
10559
10598
  }).map(function (swap, index) {
10560
- var _this6$_supportedCoin, _this6$_supportedCoin2, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
10599
+ var _this6$_supportedCoin, _this6$_supportedCoin2, _swap$blockExplorerTr, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
10561
10600
  var fromCoin = (_this6$_supportedCoin = _this6._supportedCoins.find(function (i) {
10562
10601
  return i.code === swap.from.code && i.network === swap.from.network;
10563
10602
  })) == null ? void 0 : _this6$_supportedCoin.coin;
@@ -10575,7 +10614,8 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
10575
10614
  var status = _this6._mapSwapspaceStatusToRabbitStatus(swap.status, isExpiredByTime);
10576
10615
  var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
10577
10616
  var addressToSendCoinsToSwapspace = swap.from.address;
10578
- 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, swap.blockExplorerTransactionUrl.to, 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);
10617
+ var toUrl = ((_swap$blockExplorerTr = swap.blockExplorerTransactionUrl.to) != null ? _swap$blockExplorerTr : "").replace(/from=swapspace&?/g, "").replaceAll(/&&+/g, "&").replace("?&", "?").replace(/&$/, "").replace(/\?$/, "");
10618
+ 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);
10579
10619
  }).flat();
10580
10620
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
10581
10621
  return {
@@ -11071,6 +11111,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11071
11111
  try {
11072
11112
  var _this3 = this;
11073
11113
  var loggerSource = "getSwapInfo";
11114
+ var min = null;
11115
+ var max = null;
11074
11116
  return Promise.resolve(_catch$1(function () {
11075
11117
  if (!(fromCoin instanceof Coin) || !(toCoin instanceof Coin) || typeof amountCoins !== "string" || BigNumber(amountCoins).lt("0") || fixed !== null && typeof fixed !== "boolean" || amountIsToReceive && !fixed) {
11076
11118
  throw new Error("Wrong input params: " + amountCoins + " " + fromCoin.ticker + " -> " + toCoin.ticker + ", " + (fromCoin instanceof Coin) + ", " + (toCoin instanceof Coin) + ", " + typeof fixed + " " + fixed + ", " + amountIsToReceive);
@@ -11112,11 +11154,9 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11112
11154
  // const extraUsdToFitMinMax = BigNumber("1"); // We correct the limits as the exact limit can fluctuate and cause failed swap creation
11113
11155
  // extraCoinsToFitMinMax = AmountUtils.trim(extraUsdToFitMinMax.div(fromCoinToUsdRate), fromCoin.digits);
11114
11156
  // }
11115
- var min = null;
11116
11157
  if (data != null && data.min_amount) {
11117
11158
  min = AmountUtils.trim(data == null ? void 0 : data.min_amount, amountIsToReceive ? toCoin.digits : fromCoin.digits);
11118
11159
  }
11119
- var max = null;
11120
11160
  if (data != null && data.max_amount) {
11121
11161
  max = AmountUtils.trim(data == null ? void 0 : data.max_amount, amountIsToReceive ? toCoin.digits : fromCoin.digits);
11122
11162
  }
@@ -11169,8 +11209,16 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11169
11209
  };
11170
11210
  });
11171
11211
  }, function (e) {
11172
- var _e$response;
11173
- if ((e == null || (_e$response = e.response) == null ? void 0 : _e$response.status) === 429) {
11212
+ var _e$response, _e$response2;
11213
+ if ((e == null || (_e$response = e.response) == null ? void 0 : _e$response.status) === 404) {
11214
+ return {
11215
+ result: false,
11216
+ reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED,
11217
+ smallestMin: min,
11218
+ greatestMax: max
11219
+ };
11220
+ }
11221
+ if ((e == null || (_e$response2 = e.response) == null ? void 0 : _e$response2.status) === 429) {
11174
11222
  return {
11175
11223
  result: false,
11176
11224
  reason: SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED
@@ -11258,7 +11306,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11258
11306
  throw new Error(errorMessage);
11259
11307
  });
11260
11308
  }, function (e) {
11261
- var _e$response2, _e$response3;
11309
+ var _e$response3, _e$response4;
11262
11310
  Logger.logError(e, loggerSource, "Failed to create swap. Error is: " + safeStringify(e));
11263
11311
  var composeFailResult = function composeFailResult(reason) {
11264
11312
  return {
@@ -11266,8 +11314,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11266
11314
  reason: reason
11267
11315
  };
11268
11316
  };
11269
- var status = e == null || (_e$response2 = e.response) == null ? void 0 : _e$response2.status;
11270
- var data = e == null || (_e$response3 = e.response) == null ? void 0 : _e$response3.data;
11317
+ var status = e == null || (_e$response3 = e.response) == null ? void 0 : _e$response3.status;
11318
+ var data = e == null || (_e$response4 = e.response) == null ? void 0 : _e$response4.data;
11271
11319
  if (status === 429) {
11272
11320
  Logger.log("Returning fail - RPS limit exceeded " + data, loggerSource);
11273
11321
  return composeFailResult(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
@@ -11312,7 +11360,10 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11312
11360
  var isExpiredByTime = expiresAt && expiresAt < Date.now();
11313
11361
  var status = _this5._mapLetsExchangeStatusToRabbitStatus(swap.status, isExpiredByTime);
11314
11362
  var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
11315
- return new ExistingSwap(swapIds[index], status, createdAt, expiresAt, swap.confirmations, AmountUtils.trim(swap.rate, _this5._maxRateDigits), swap.is_float != null ? !swap.is_float : false, swap["return"], swap.deposit, fromCoin, AmountUtils.trim(swap.deposit_amount, fromCoin.digits), swap.hash_in, swap.hash_in ? "" + swap.coin_from_explorer_url + swap.hash_in : null, toCoin, AmountUtils.trim(swap.withdrawal_amount, toDigits), swap.hash_out, swap.hash_out ? "" + swap.coin_to_explorer_url + swap.hash_out : null, swap.withdrawal, "letsexchange", (_swap$deposit_extra_i = swap.deposit_extra_id) != null ? _swap$deposit_extra_i : null, (_swap$withdrawal_extr = swap.withdrawal_extra_id) != null ? _swap$withdrawal_extr : null, (_swap$return_extra_id = swap.return_extra_id) != null ? _swap$return_extra_id : null);
11363
+ var deposit = swap.real_deposit_amount && swap.real_deposit_amount !== "" ? swap.real_deposit_amount : swap.deposit_amount;
11364
+ var withdrawal = swap.real_withdrawal_amount && swap.real_withdrawal_amount !== "" ? swap.real_withdrawal_amount : swap.withdrawal_amount;
11365
+ var rate = BigNumber(withdrawal).div(deposit).toFixed(_this5._maxRateDigits); // We don't use their rate as it excludes their fee
11366
+ return new ExistingSwap(swapIds[index], status, createdAt, expiresAt, swap.confirmations, rate, swap.is_float != null ? !swap.is_float : false, swap["return"], swap.deposit, fromCoin, AmountUtils.trim(deposit, fromCoin.digits), swap.hash_in, swap.hash_in ? "" + swap.coin_from_explorer_url + swap.hash_in : null, toCoin, AmountUtils.trim(withdrawal, toDigits), swap.hash_out, swap.hash_out ? "" + swap.coin_to_explorer_url + swap.hash_out : null, swap.withdrawal, "letsexchange", (_swap$deposit_extra_i = swap.deposit_extra_id) != null ? _swap$deposit_extra_i : null, (_swap$withdrawal_extr = swap.withdrawal_extra_id) != null ? _swap$withdrawal_extr : null, (_swap$return_extra_id = swap.return_extra_id) != null ? _swap$return_extra_id : null);
11316
11367
  }).flat();
11317
11368
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
11318
11369
  return {
@@ -11321,7 +11372,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11321
11372
  };
11322
11373
  });
11323
11374
  }, function (e) {
11324
- var _e$response4, _e$response5;
11375
+ var _e$response5, _e$response6;
11325
11376
  Logger.logError(e, loggerSource, "Failed to get swap details. Error is: " + safeStringify(e));
11326
11377
  var composeFailResult = function composeFailResult(reason) {
11327
11378
  return {
@@ -11329,8 +11380,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11329
11380
  reason: reason
11330
11381
  };
11331
11382
  };
11332
- var status = e == null || (_e$response4 = e.response) == null ? void 0 : _e$response4.status;
11333
- var data = e == null || (_e$response5 = e.response) == null ? void 0 : _e$response5.data;
11383
+ var status = e == null || (_e$response5 = e.response) == null ? void 0 : _e$response5.status;
11384
+ var data = e == null || (_e$response6 = e.response) == null ? void 0 : _e$response6.data;
11334
11385
  if (status === 429) {
11335
11386
  Logger.log("Returning fail - RPS limit exceeded " + data, loggerSource);
11336
11387
  return composeFailResult(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
@@ -11340,21 +11391,22 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11340
11391
  } catch (e) {
11341
11392
  return Promise.reject(e);
11342
11393
  }
11343
- } // TODO: [dev] Serg, please check this during the review to make sure I did no mistakes in statuses mapping.
11344
- // I will remove these comments after the review. https://api.letsexchange.io/doc
11345
- // wait The exchange has just been created and it’s waiting for coins to reach the deposit wallet
11346
- // confirmation The transaction appears in mempool and now it is waiting for necessary network confirmations to start.
11347
- // confirmed The user’s payment is confirmed, the exchange process is about to start.
11348
- // exchanging The exchange process is running.
11349
- // sending Funds are being sent to the recipient`s address.
11350
- // sending_confirmation The outgoing transaction is waiting for network confirmations.
11351
- // success The exchange is completed and the funds are successfully sent to the recipient’s address.
11352
- // aml_check_failed The deposit was marked as risky by AML check service.
11353
- // overdue The deposit receiving time for this transaction has expired.
11354
- // error The transaction has failed. In most cases, the amount that was sent differs from the amount that was specified when creating the transaction.
11355
- // refund The exchange failed and the coins were refunded to the user's wallet.
11356
- ;
11394
+ };
11357
11395
  _proto._mapLetsExchangeStatusToRabbitStatus = function _mapLetsExchangeStatusToRabbitStatus(status, isExpiredByTime) {
11396
+ /**
11397
+ * Lets exchange statuses description
11398
+ * wait - The exchange has just been created and it’s waiting for coins to reach the deposit wallet
11399
+ * confirmation - The transaction appears in mempool and now it is waiting for necessary network confirmations to start.
11400
+ * confirmed - The user’s payment is confirmed, the exchange process is about to start.
11401
+ * exchanging - The exchange process is running.
11402
+ * sending - Funds are being sent to the recipient`s address.
11403
+ * sending_confirmation - The outgoing transaction is waiting for network confirmations.
11404
+ * success - The exchange is completed and the funds are successfully sent to the recipient’s address.
11405
+ * aml_check_failed - The deposit was marked as risky by AML check service.
11406
+ * overdue - The deposit receiving time for this transaction has expired.
11407
+ * error - The transaction has failed. In most cases, the amount that was sent differs from the amount that was specified when creating the transaction.
11408
+ * refund - The exchange failed and the coins were refunded to the user's wallet.
11409
+ */
11358
11410
  switch (status) {
11359
11411
  case "wait":
11360
11412
  if (isExpiredByTime) {
@@ -11368,7 +11420,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11368
11420
  case "exchanging":
11369
11421
  return SwapProvider.SWAP_STATUSES.EXCHANGING;
11370
11422
  case "sending":
11371
- return SwapProvider.SWAP_STATUSES.PAYMENT_RECEIVED;
11423
+ return SwapProvider.SWAP_STATUSES.EXCHANGING;
11372
11424
  case "sending_confirmation":
11373
11425
  return SwapProvider.SWAP_STATUSES.EXCHANGING;
11374
11426
  case "success":
@@ -11588,7 +11640,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11588
11640
  *
11589
11641
  * @param fromCoin {Coin}
11590
11642
  * @param toCoin {Coin}
11591
- * @param fromAmountCoins {string}
11643
+ * @param amountCoins {string}
11592
11644
  * @param [fixed=false] {boolean|null} null means fixed or float doesn't matter
11593
11645
  * @param [withoutFiat=false] {boolean} pass true if you don't need the fiat equivalent - this will diminish requests count
11594
11646
  * @param [amountIsToReceive=false] {boolean} whether the given amount is receiving amount.
@@ -11607,7 +11659,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11607
11659
  * }>}
11608
11660
  */
11609
11661
  ;
11610
- _proto.getPublicSwapDetails = function getPublicSwapDetails(fromCoin, toCoin, fromAmountCoins, fixed, withoutFiat, amountIsToReceive) {
11662
+ _proto.getPublicSwapDetails = function getPublicSwapDetails(fromCoin, toCoin, amountCoins, fixed, withoutFiat, amountIsToReceive) {
11611
11663
  if (fixed === void 0) {
11612
11664
  fixed = false;
11613
11665
  }
@@ -11624,7 +11676,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11624
11676
  function _temp2(_getCoinToUSDTRate) {
11625
11677
  var _getCoinToUSDTRate$ra;
11626
11678
  var coinUsdtRate = withoutFiat ? _getCoinToUSDTRate : (_getCoinToUSDTRate$ra = _getCoinToUSDTRate == null ? void 0 : _getCoinToUSDTRate.rate) != null ? _getCoinToUSDTRate$ra : null;
11627
- return Promise.resolve((fixed ? _this7._fixedSwapProvider : _this7._swapProvider).getSwapInfo(fromCoin, toCoin, fromAmountCoins, fixed, coinUsdtRate, amountIsToReceive)).then(function (details) {
11679
+ return Promise.resolve((fixed ? _this7._fixedSwapProvider : _this7._swapProvider).getSwapInfo(fromCoin, toCoin, amountCoins, fixed, coinUsdtRate, amountIsToReceive)).then(function (details) {
11628
11680
  var _result$swapCreationI, _result$swapCreationI2;
11629
11681
  // eslint-disable-next-line no-console
11630
11682
  console.log("getSwapInfo result: ", details);
@@ -11664,13 +11716,14 @@ var PublicSwapService = /*#__PURE__*/function () {
11664
11716
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.NO_FIXED_BUT_HAVE_FLOATING_PUBLIC_SWAP_OPTION);
11665
11717
  }
11666
11718
  }
11667
- var fromAmountBigNumber = BigNumber(fromAmountCoins);
11668
- if (typeof min === "string" && fromAmountBigNumber.lt(min)) {
11719
+ var amountBigNumber = BigNumber(amountCoins);
11720
+ if (typeof min === "string" && amountBigNumber.lt(min)) {
11669
11721
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.AMOUNT_LESS_THAN_MIN_SWAPPABLE);
11670
- } else if (typeof max === "string" && fromAmountBigNumber.gt(max)) {
11722
+ } else if (typeof max === "string" && amountBigNumber.gt(max)) {
11671
11723
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.AMOUNT_HIGHER_THAN_MAX_SWAPPABLE);
11672
11724
  }
11673
- var toAmountCoins = AmountUtils.trim(fromAmountBigNumber.times(details.rate), fromCoin.digits);
11725
+ var fromAmountCoins = amountIsToReceive ? AmountUtils.trim(amountBigNumber.div(details.rate), fromCoin.digits) : amountCoins;
11726
+ var toAmountCoins = amountIsToReceive ? amountCoins : AmountUtils.trim(amountBigNumber.times(details.rate), toCoin.digits);
11674
11727
  var result = {
11675
11728
  result: true,
11676
11729
  swapCreationInfo: new BaseSwapCreationInfo(fromCoin, toCoin, fromAmountCoins, toAmountCoins, details.rate, details.rawSwapData, min, fiatMin, max, fiatMax, details.durationMinutesRange, details.fixed, details.isRefundAddressRequired)