@rabbitio/ui-kit 1.0.0-beta.74 → 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 +700 -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 +54 -18
  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 +87 -45
  155. package/dist/index.cjs.map +1 -1
  156. package/dist/index.modern.js +84 -45
  157. package/dist/index.modern.js.map +1 -1
  158. package/dist/index.module.js +87 -45
  159. package/dist/index.module.js.map +1 -1
  160. package/dist/index.umd.js +87 -45
  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 +24 -12
  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
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">ui-kit/stories/organisms/Dialog/DialogButtons</a> DialogButtons.stories.jsx</h1>
22
+ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">rabbit-ui-kit/stories/organisms/Dialog/DialogButtons</a> DialogButtons.stories.jsx</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -313,7 +313,7 @@
313
313
  <div class='footer quiet pad2 space-top1 center small'>
314
314
  Code coverage generated by
315
315
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
316
- at 2024-06-19T03:22:53.756Z
316
+ at 2024-06-19T13:47:53.680Z
317
317
  </div>
318
318
  <script src="../../../../../prettify.js"></script>
319
319
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/organisms/Dialog/DialogButtons</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/organisms/Dialog/DialogButtons</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../../../index.html">All files</a> ui-kit/stories/organisms/Dialog/DialogButtons</h1>
22
+ <h1><a href="../../../../../index.html">All files</a> rabbit-ui-kit/stories/organisms/Dialog/DialogButtons</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2024-06-19T03:22:53.756Z
104
+ at 2024-06-19T13:47:53.680Z
105
105
  </div>
106
106
  <script src="../../../../../prettify.js"></script>
107
107
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">ui-kit/stories/organisms/Dialog/DialogStep</a> DialogStep.stories.jsx</h1>
22
+ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">rabbit-ui-kit/stories/organisms/Dialog/DialogStep</a> DialogStep.stories.jsx</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -322,7 +322,7 @@
322
322
  <div class='footer quiet pad2 space-top1 center small'>
323
323
  Code coverage generated by
324
324
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
325
- at 2024-06-19T03:22:53.756Z
325
+ at 2024-06-19T13:47:53.680Z
326
326
  </div>
327
327
  <script src="../../../../../prettify.js"></script>
328
328
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/organisms/Dialog/DialogStep</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/organisms/Dialog/DialogStep</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../../../index.html">All files</a> ui-kit/stories/organisms/Dialog/DialogStep</h1>
22
+ <h1><a href="../../../../../index.html">All files</a> rabbit-ui-kit/stories/organisms/Dialog/DialogStep</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2024-06-19T03:22:53.756Z
104
+ at 2024-06-19T13:47:53.680Z
105
105
  </div>
106
106
  <script src="../../../../../prettify.js"></script>
107
107
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/organisms/Dialog</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/organisms/Dialog</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../../index.html">All files</a> ui-kit/stories/organisms/Dialog</h1>
22
+ <h1><a href="../../../../index.html">All files</a> rabbit-ui-kit/stories/organisms/Dialog</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2024-06-19T03:22:53.756Z
104
+ at 2024-06-19T13:47:53.680Z
105
105
  </div>
106
106
  <script src="../../../../prettify.js"></script>
107
107
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/stubs/exampleContent.jsx</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/stubs/exampleContent.jsx</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../index.html">All files</a> / <a href="index.html">ui-kit/stories/stubs</a> exampleContent.jsx</h1>
22
+ <h1><a href="../../../index.html">All files</a> / <a href="index.html">rabbit-ui-kit/stories/stubs</a> exampleContent.jsx</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -130,7 +130,7 @@
130
130
  <div class='footer quiet pad2 space-top1 center small'>
131
131
  Code coverage generated by
132
132
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
133
- at 2024-06-19T03:22:53.756Z
133
+ at 2024-06-19T13:47:53.680Z
134
134
  </div>
135
135
  <script src="../../../prettify.js"></script>
136
136
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/stubs</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/stubs</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../index.html">All files</a> ui-kit/stories/stubs</h1>
22
+ <h1><a href="../../../index.html">All files</a> rabbit-ui-kit/stories/stubs</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2024-06-19T03:22:53.756Z
104
+ at 2024-06-19T13:47:53.680Z
105
105
  </div>
106
106
  <script src="../../../prettify.js"></script>
107
107
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/templates/DeterminedErrorDialogStep.stories.jsx</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/templates/DeterminedErrorDialogStep.stories.jsx</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../index.html">All files</a> / <a href="index.html">ui-kit/stories/templates</a> DeterminedErrorDialogStep.stories.jsx</h1>
22
+ <h1><a href="../../../index.html">All files</a> / <a href="index.html">rabbit-ui-kit/stories/templates</a> DeterminedErrorDialogStep.stories.jsx</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -175,7 +175,7 @@
175
175
  <div class='footer quiet pad2 space-top1 center small'>
176
176
  Code coverage generated by
177
177
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
178
- at 2024-06-19T03:22:53.756Z
178
+ at 2024-06-19T13:47:53.680Z
179
179
  </div>
180
180
  <script src="../../../prettify.js"></script>
181
181
  <script>
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for ui-kit/stories/templates</title>
6
+ <title>Code coverage report for rabbit-ui-kit/stories/templates</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../../../prettify.css" />
9
9
  <link rel="stylesheet" href="../../../base.css" />
@@ -19,7 +19,7 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../../index.html">All files</a> ui-kit/stories/templates</h1>
22
+ <h1><a href="../../../index.html">All files</a> rabbit-ui-kit/stories/templates</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2024-06-19T03:22:53.756Z
104
+ at 2024-06-19T13:47:53.680Z
105
105
  </div>
106
106
  <script src="../../../prettify.js"></script>
107
107
  <script>
package/dist/index.cjs CHANGED
@@ -4741,7 +4741,7 @@ var SwapForm = function SwapForm(_ref) {
4741
4741
  _ref$formHasBalance = _ref.formHasBalance,
4742
4742
  formHasBalance = _ref$formHasBalance === void 0 ? false : _ref$formHasBalance,
4743
4743
  _ref$retrieveSwapDeta = _ref.retrieveSwapDetails,
4744
- retrieveSwapDetails = _ref$retrieveSwapDeta === void 0 ? function (sendingAssetTicker, receivingAssetTicker, amount, isSwapAll, editedLastInput) {
4744
+ retrieveSwapDetails = _ref$retrieveSwapDeta === void 0 ? function (sendingAssetTicker, receivingAssetTicker, amount, isSwapAll, isFixed, amountIsToReceive) {
4745
4745
  return Promise.resolve();
4746
4746
  } : _ref$retrieveSwapDeta,
4747
4747
  _ref$retrieveInitialS = _ref.retrieveInitialSwapData,
@@ -4768,6 +4768,10 @@ var SwapForm = function SwapForm(_ref) {
4768
4768
  termsOfUseUrl = _ref$termsOfUseUrl === void 0 ? null : _ref$termsOfUseUrl,
4769
4769
  _ref$privacyPolicyUrl = _ref.privacyPolicyUrl,
4770
4770
  privacyPolicyUrl = _ref$privacyPolicyUrl === void 0 ? null : _ref$privacyPolicyUrl,
4771
+ _ref$getExtraIdNameBy = _ref.getExtraIdNameByTicker,
4772
+ getExtraIdNameByTicker = _ref$getExtraIdNameBy === void 0 ? function (ticker) {
4773
+ return null;
4774
+ } : _ref$getExtraIdNameBy,
4771
4775
  _ref$validateAddressB = _ref.validateAddressByTicker,
4772
4776
  validateAddressByTicker = _ref$validateAddressB === void 0 ? function () {
4773
4777
  return false;
@@ -4777,8 +4781,6 @@ var SwapForm = function SwapForm(_ref) {
4777
4781
  swapButtonAlwaysActive = _ref$swapButtonAlways === void 0 ? false : _ref$swapButtonAlways,
4778
4782
  _ref$onIsFixedChange = _ref.onIsFixedChange,
4779
4783
  onIsFixedChange = _ref$onIsFixedChange === void 0 ? function () {} : _ref$onIsFixedChange,
4780
- recipientAddressExtraIdName = _ref.recipientAddressExtraIdName,
4781
- refundAddressExtraIdName = _ref.refundAddressExtraIdName,
4782
4784
  _ref$translations = _ref.translations,
4783
4785
  translations = _ref$translations === void 0 ? {
4784
4786
  swapAllButtonTitles: {
@@ -5060,14 +5062,12 @@ var SwapForm = function SwapForm(_ref) {
5060
5062
  setIsPairSupported(true);
5061
5063
  setIsSwapCalculated(false);
5062
5064
  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) {
5063
- if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null ? preservedAmount : sendAssetAmount.current)) {
5065
+ if (!isSwapAll.current && String(amount) !== String(isForPreserved && sendAssetAmount.current == null ? preservedAmount : isFixedRate.current && isLastEditedReceiving ? receiveAssetAmount.current : sendAssetAmount.current)) {
5064
5066
  // Means amount changed and we no more need to do this exact calculation
5065
5067
  return;
5066
5068
  }
5067
5069
  if (response.result) {
5068
5070
  var swapCreationInfo = response.swapCreationInfo;
5069
- setUpdateSendInputTo(swapCreationInfo.fromAmountCoins);
5070
- setUpdateReceiveInputTo(swapCreationInfo.toAmountCoins);
5071
5071
  if (isSwapAll.current) {
5072
5072
  setIsAmountZero(bignumber_js.BigNumber("0").eq(swapCreationInfo.fromAmountCoins));
5073
5073
  }
@@ -5076,6 +5076,8 @@ var SwapForm = function SwapForm(_ref) {
5076
5076
  setIsRefundAddressRequired(swapCreationInfo == null ? void 0 : swapCreationInfo.isRefundAddressRequired);
5077
5077
  processMinMaxAmounts(isSwapAll.current ? swapCreationInfo.fromAmountCoins : amount);
5078
5078
  setIsSwapCalculated(true);
5079
+ setUpdateSendInputTo(swapCreationInfo.fromAmountCoins);
5080
+ setUpdateReceiveInputTo(swapCreationInfo.toAmountCoins);
5079
5081
  } else {
5080
5082
  handleSwapServiceError(response.reason, setValidationContent, setBalanceValid, setMinimalAmountValid, setMaximumAmountValid, setIsPairSupported, setIsSameCoins);
5081
5083
  if (isSwapAll.current) {
@@ -5265,7 +5267,11 @@ var SwapForm = function SwapForm(_ref) {
5265
5267
  }, [updateSendInputTo, updateReceiveInputTo]);
5266
5268
  React.useEffect(function () {
5267
5269
  if (swapRate != null && sendAssetAmount.current != null) {
5268
- setUpdateReceiveInputTo(AmountUtils.trim(bignumber_js.BigNumber(sendAssetAmount.current).times(swapRate), receivingAssetDecimalCount));
5270
+ if (isLastEditedReceiving) {
5271
+ setUpdateSendInputTo(AmountUtils.trim(bignumber_js.BigNumber(receiveAssetAmount.current).div(swapRate), sendingAssetDecimalCount));
5272
+ } else {
5273
+ setUpdateReceiveInputTo(AmountUtils.trim(bignumber_js.BigNumber(sendAssetAmount.current).times(swapRate), receivingAssetDecimalCount));
5274
+ }
5269
5275
  }
5270
5276
  // eslint-disable-next-line react-hooks/exhaustive-deps
5271
5277
  }, [swapRate]);
@@ -5287,6 +5293,8 @@ var SwapForm = function SwapForm(_ref) {
5287
5293
  setIsSwapCalculated(false);
5288
5294
  // eslint-disable-next-line react-hooks/exhaustive-deps
5289
5295
  }, [sendAssetAmount.current]);
5296
+ var recipientAddressExtraIdName = getExtraIdNameByTicker(receivingAssetTicker);
5297
+ var refundAddressExtraIdName = getExtraIdNameByTicker(sendingAssetTicker);
5290
5298
  return /*#__PURE__*/React__default["default"].createElement("div", {
5291
5299
  className: s$9["swap-form"]
5292
5300
  }, /*#__PURE__*/React__default["default"].createElement(TitleBox, {
@@ -5326,7 +5334,7 @@ var SwapForm = function SwapForm(_ref) {
5326
5334
  upperFormPosition: true,
5327
5335
  errorEncountered: !minimalAmountValid,
5328
5336
  ref: fromAssetSelectionButtonRef,
5329
- isLoading: false,
5337
+ isLoading: isLastEditedReceiving ? isLoading.current : false,
5330
5338
  cryptoAssetToFiatRate: sendingAssetToFiatRate,
5331
5339
  fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
5332
5340
  fiatCurrencyDecimals: fiatCurrencyDecimals,
@@ -5360,7 +5368,7 @@ var SwapForm = function SwapForm(_ref) {
5360
5368
  lowerFormPosition: true,
5361
5369
  estimateAmount: !isFixedRate.current,
5362
5370
  ref: toAssetSelectionButtonRef,
5363
- isLoading: isLoading.current,
5371
+ isLoading: isLastEditedReceiving ? false : isLoading.current,
5364
5372
  cryptoAssetToFiatRate: receivingAssetToFiatRate,
5365
5373
  fiatCurrencyCode: formHasFiat ? fiatCurrencyCode : null,
5366
5374
  fiatCurrencyDecimals: fiatCurrencyDecimals,
@@ -9687,8 +9695,28 @@ var SwapProvider = /*#__PURE__*/function () {
9687
9695
  * @private
9688
9696
  */;
9689
9697
  _proto._putPopularCoinsFirst = function _putPopularCoinsFirst() {
9698
+ 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"];
9690
9699
  this._supportedCoins.sort(function (i1, i2) {
9691
- if (i1.isPopular !== i2.isPopular) return i2.isPopular - i1.isPopular;
9700
+ var isInPopularList1 = popularCoinsList.includes(i1.coin.ticker);
9701
+ var isInPopularList2 = popularCoinsList.includes(i2.coin.ticker);
9702
+
9703
+ // If both are in the popularCoinsList, sort by their index in the list
9704
+ if (isInPopularList1 && isInPopularList2) {
9705
+ var index1 = popularCoinsList.indexOf(i1.coin.ticker);
9706
+ var index2 = popularCoinsList.indexOf(i2.coin.ticker);
9707
+ return index1 - index2;
9708
+ }
9709
+
9710
+ // Sort by whether the coin is in the popularCoinsList
9711
+ if (isInPopularList1 && !isInPopularList2) return -1;
9712
+ if (!isInPopularList1 && isInPopularList2) return 1;
9713
+
9714
+ // If both are not in the popularCoinsList, use the isPopular flag - partners can fill it
9715
+ var p1 = i1.isPopular;
9716
+ var p2 = i2.isPopular;
9717
+ if (p1 !== p2) return p2 - p1;
9718
+
9719
+ // By default, sort by the coin ticker
9692
9720
  return i1.coin.ticker.localeCompare(i2.coin.ticker);
9693
9721
  });
9694
9722
  }
@@ -10581,7 +10609,7 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
10581
10609
  var swaps = wo404.map(function (r) {
10582
10610
  return r.data;
10583
10611
  }).map(function (swap, index) {
10584
- var _this6$_supportedCoin, _this6$_supportedCoin2, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
10612
+ var _this6$_supportedCoin, _this6$_supportedCoin2, _swap$blockExplorerTr, _swap$from$extraId, _swap$to$extraId, _swap$refundExtraId;
10585
10613
  var fromCoin = (_this6$_supportedCoin = _this6._supportedCoins.find(function (i) {
10586
10614
  return i.code === swap.from.code && i.network === swap.from.network;
10587
10615
  })) == null ? void 0 : _this6$_supportedCoin.coin;
@@ -10599,7 +10627,8 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
10599
10627
  var status = _this6._mapSwapspaceStatusToRabbitStatus(swap.status, isExpiredByTime);
10600
10628
  var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
10601
10629
  var addressToSendCoinsToSwapspace = swap.from.address;
10602
- 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);
10630
+ var toUrl = ((_swap$blockExplorerTr = swap.blockExplorerTransactionUrl.to) != null ? _swap$blockExplorerTr : "").replace(/from=swapspace&?/g, "").replaceAll(/&&+/g, "&").replace("?&", "?").replace(/&$/, "").replace(/\?$/, "");
10631
+ 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);
10603
10632
  }).flat();
10604
10633
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
10605
10634
  return {
@@ -11095,6 +11124,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11095
11124
  try {
11096
11125
  var _this3 = this;
11097
11126
  var loggerSource = "getSwapInfo";
11127
+ var min = null;
11128
+ var max = null;
11098
11129
  return Promise.resolve(_catch$1(function () {
11099
11130
  if (!(fromCoin instanceof Coin) || !(toCoin instanceof Coin) || typeof amountCoins !== "string" || bignumber_js.BigNumber(amountCoins).lt("0") || fixed !== null && typeof fixed !== "boolean" || amountIsToReceive && !fixed) {
11100
11131
  throw new Error("Wrong input params: " + amountCoins + " " + fromCoin.ticker + " -> " + toCoin.ticker + ", " + (fromCoin instanceof Coin) + ", " + (toCoin instanceof Coin) + ", " + typeof fixed + " " + fixed + ", " + amountIsToReceive);
@@ -11136,11 +11167,9 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11136
11167
  // const extraUsdToFitMinMax = BigNumber("1"); // We correct the limits as the exact limit can fluctuate and cause failed swap creation
11137
11168
  // extraCoinsToFitMinMax = AmountUtils.trim(extraUsdToFitMinMax.div(fromCoinToUsdRate), fromCoin.digits);
11138
11169
  // }
11139
- var min = null;
11140
11170
  if (data != null && data.min_amount) {
11141
11171
  min = AmountUtils.trim(data == null ? void 0 : data.min_amount, amountIsToReceive ? toCoin.digits : fromCoin.digits);
11142
11172
  }
11143
- var max = null;
11144
11173
  if (data != null && data.max_amount) {
11145
11174
  max = AmountUtils.trim(data == null ? void 0 : data.max_amount, amountIsToReceive ? toCoin.digits : fromCoin.digits);
11146
11175
  }
@@ -11193,8 +11222,16 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11193
11222
  };
11194
11223
  });
11195
11224
  }, function (e) {
11196
- var _e$response;
11197
- if ((e == null || (_e$response = e.response) == null ? void 0 : _e$response.status) === 429) {
11225
+ var _e$response, _e$response2;
11226
+ if ((e == null || (_e$response = e.response) == null ? void 0 : _e$response.status) === 404) {
11227
+ return {
11228
+ result: false,
11229
+ reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED,
11230
+ smallestMin: min,
11231
+ greatestMax: max
11232
+ };
11233
+ }
11234
+ if ((e == null || (_e$response2 = e.response) == null ? void 0 : _e$response2.status) === 429) {
11198
11235
  return {
11199
11236
  result: false,
11200
11237
  reason: SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED
@@ -11282,7 +11319,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11282
11319
  throw new Error(errorMessage);
11283
11320
  });
11284
11321
  }, function (e) {
11285
- var _e$response2, _e$response3;
11322
+ var _e$response3, _e$response4;
11286
11323
  Logger.logError(e, loggerSource, "Failed to create swap. Error is: " + safeStringify(e));
11287
11324
  var composeFailResult = function composeFailResult(reason) {
11288
11325
  return {
@@ -11290,8 +11327,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11290
11327
  reason: reason
11291
11328
  };
11292
11329
  };
11293
- var status = e == null || (_e$response2 = e.response) == null ? void 0 : _e$response2.status;
11294
- var data = e == null || (_e$response3 = e.response) == null ? void 0 : _e$response3.data;
11330
+ var status = e == null || (_e$response3 = e.response) == null ? void 0 : _e$response3.status;
11331
+ var data = e == null || (_e$response4 = e.response) == null ? void 0 : _e$response4.data;
11295
11332
  if (status === 429) {
11296
11333
  Logger.log("Returning fail - RPS limit exceeded " + data, loggerSource);
11297
11334
  return composeFailResult(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
@@ -11336,7 +11373,10 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11336
11373
  var isExpiredByTime = expiresAt && expiresAt < Date.now();
11337
11374
  var status = _this5._mapLetsExchangeStatusToRabbitStatus(swap.status, isExpiredByTime);
11338
11375
  var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
11339
- 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);
11376
+ var deposit = swap.real_deposit_amount && swap.real_deposit_amount !== "" ? swap.real_deposit_amount : swap.deposit_amount;
11377
+ var withdrawal = swap.real_withdrawal_amount && swap.real_withdrawal_amount !== "" ? swap.real_withdrawal_amount : swap.withdrawal_amount;
11378
+ var rate = bignumber_js.BigNumber(withdrawal).div(deposit).toFixed(_this5._maxRateDigits); // We don't use their rate as it excludes their fee
11379
+ 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);
11340
11380
  }).flat();
11341
11381
  Logger.log("Swap details result " + safeStringify(swaps), loggerSource);
11342
11382
  return {
@@ -11345,7 +11385,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11345
11385
  };
11346
11386
  });
11347
11387
  }, function (e) {
11348
- var _e$response4, _e$response5;
11388
+ var _e$response5, _e$response6;
11349
11389
  Logger.logError(e, loggerSource, "Failed to get swap details. Error is: " + safeStringify(e));
11350
11390
  var composeFailResult = function composeFailResult(reason) {
11351
11391
  return {
@@ -11353,8 +11393,8 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11353
11393
  reason: reason
11354
11394
  };
11355
11395
  };
11356
- var status = e == null || (_e$response4 = e.response) == null ? void 0 : _e$response4.status;
11357
- var data = e == null || (_e$response5 = e.response) == null ? void 0 : _e$response5.data;
11396
+ var status = e == null || (_e$response5 = e.response) == null ? void 0 : _e$response5.status;
11397
+ var data = e == null || (_e$response6 = e.response) == null ? void 0 : _e$response6.data;
11358
11398
  if (status === 429) {
11359
11399
  Logger.log("Returning fail - RPS limit exceeded " + data, loggerSource);
11360
11400
  return composeFailResult(SwapProvider.COMMON_ERRORS.REQUESTS_LIMIT_EXCEEDED);
@@ -11364,21 +11404,22 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11364
11404
  } catch (e) {
11365
11405
  return Promise.reject(e);
11366
11406
  }
11367
- } // TODO: [dev] Serg, please check this during the review to make sure I did no mistakes in statuses mapping.
11368
- // I will remove these comments after the review. https://api.letsexchange.io/doc
11369
- // wait The exchange has just been created and it’s waiting for coins to reach the deposit wallet
11370
- // confirmation The transaction appears in mempool and now it is waiting for necessary network confirmations to start.
11371
- // confirmed The user’s payment is confirmed, the exchange process is about to start.
11372
- // exchanging The exchange process is running.
11373
- // sending Funds are being sent to the recipient`s address.
11374
- // sending_confirmation The outgoing transaction is waiting for network confirmations.
11375
- // success The exchange is completed and the funds are successfully sent to the recipient’s address.
11376
- // aml_check_failed The deposit was marked as risky by AML check service.
11377
- // overdue The deposit receiving time for this transaction has expired.
11378
- // error The transaction has failed. In most cases, the amount that was sent differs from the amount that was specified when creating the transaction.
11379
- // refund The exchange failed and the coins were refunded to the user's wallet.
11380
- ;
11407
+ };
11381
11408
  _proto._mapLetsExchangeStatusToRabbitStatus = function _mapLetsExchangeStatusToRabbitStatus(status, isExpiredByTime) {
11409
+ /**
11410
+ * Lets exchange statuses description
11411
+ * wait - The exchange has just been created and it’s waiting for coins to reach the deposit wallet
11412
+ * confirmation - The transaction appears in mempool and now it is waiting for necessary network confirmations to start.
11413
+ * confirmed - The user’s payment is confirmed, the exchange process is about to start.
11414
+ * exchanging - The exchange process is running.
11415
+ * sending - Funds are being sent to the recipient`s address.
11416
+ * sending_confirmation - The outgoing transaction is waiting for network confirmations.
11417
+ * success - The exchange is completed and the funds are successfully sent to the recipient’s address.
11418
+ * aml_check_failed - The deposit was marked as risky by AML check service.
11419
+ * overdue - The deposit receiving time for this transaction has expired.
11420
+ * error - The transaction has failed. In most cases, the amount that was sent differs from the amount that was specified when creating the transaction.
11421
+ * refund - The exchange failed and the coins were refunded to the user's wallet.
11422
+ */
11382
11423
  switch (status) {
11383
11424
  case "wait":
11384
11425
  if (isExpiredByTime) {
@@ -11392,7 +11433,7 @@ var LetsExchangeSwapProvider = /*#__PURE__*/function (_SwapProvider) {
11392
11433
  case "exchanging":
11393
11434
  return SwapProvider.SWAP_STATUSES.EXCHANGING;
11394
11435
  case "sending":
11395
- return SwapProvider.SWAP_STATUSES.PAYMENT_RECEIVED;
11436
+ return SwapProvider.SWAP_STATUSES.EXCHANGING;
11396
11437
  case "sending_confirmation":
11397
11438
  return SwapProvider.SWAP_STATUSES.EXCHANGING;
11398
11439
  case "success":
@@ -11612,7 +11653,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11612
11653
  *
11613
11654
  * @param fromCoin {Coin}
11614
11655
  * @param toCoin {Coin}
11615
- * @param fromAmountCoins {string}
11656
+ * @param amountCoins {string}
11616
11657
  * @param [fixed=false] {boolean|null} null means fixed or float doesn't matter
11617
11658
  * @param [withoutFiat=false] {boolean} pass true if you don't need the fiat equivalent - this will diminish requests count
11618
11659
  * @param [amountIsToReceive=false] {boolean} whether the given amount is receiving amount.
@@ -11631,7 +11672,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11631
11672
  * }>}
11632
11673
  */
11633
11674
  ;
11634
- _proto.getPublicSwapDetails = function getPublicSwapDetails(fromCoin, toCoin, fromAmountCoins, fixed, withoutFiat, amountIsToReceive) {
11675
+ _proto.getPublicSwapDetails = function getPublicSwapDetails(fromCoin, toCoin, amountCoins, fixed, withoutFiat, amountIsToReceive) {
11635
11676
  if (fixed === void 0) {
11636
11677
  fixed = false;
11637
11678
  }
@@ -11648,7 +11689,7 @@ var PublicSwapService = /*#__PURE__*/function () {
11648
11689
  function _temp2(_getCoinToUSDTRate) {
11649
11690
  var _getCoinToUSDTRate$ra;
11650
11691
  var coinUsdtRate = withoutFiat ? _getCoinToUSDTRate : (_getCoinToUSDTRate$ra = _getCoinToUSDTRate == null ? void 0 : _getCoinToUSDTRate.rate) != null ? _getCoinToUSDTRate$ra : null;
11651
- return Promise.resolve((fixed ? _this7._fixedSwapProvider : _this7._swapProvider).getSwapInfo(fromCoin, toCoin, fromAmountCoins, fixed, coinUsdtRate, amountIsToReceive)).then(function (details) {
11692
+ return Promise.resolve((fixed ? _this7._fixedSwapProvider : _this7._swapProvider).getSwapInfo(fromCoin, toCoin, amountCoins, fixed, coinUsdtRate, amountIsToReceive)).then(function (details) {
11652
11693
  var _result$swapCreationI, _result$swapCreationI2;
11653
11694
  // eslint-disable-next-line no-console
11654
11695
  console.log("getSwapInfo result: ", details);
@@ -11688,13 +11729,14 @@ var PublicSwapService = /*#__PURE__*/function () {
11688
11729
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.NO_FIXED_BUT_HAVE_FLOATING_PUBLIC_SWAP_OPTION);
11689
11730
  }
11690
11731
  }
11691
- var fromAmountBigNumber = bignumber_js.BigNumber(fromAmountCoins);
11692
- if (typeof min === "string" && fromAmountBigNumber.lt(min)) {
11732
+ var amountBigNumber = bignumber_js.BigNumber(amountCoins);
11733
+ if (typeof min === "string" && amountBigNumber.lt(min)) {
11693
11734
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.AMOUNT_LESS_THAN_MIN_SWAPPABLE);
11694
- } else if (typeof max === "string" && fromAmountBigNumber.gt(max)) {
11735
+ } else if (typeof max === "string" && amountBigNumber.gt(max)) {
11695
11736
  return composeFailResult(PublicSwapService.PUBLIC_SWAP_DETAILS_FAIL_REASONS.AMOUNT_HIGHER_THAN_MAX_SWAPPABLE);
11696
11737
  }
11697
- var toAmountCoins = AmountUtils.trim(fromAmountBigNumber.times(details.rate), fromCoin.digits);
11738
+ var fromAmountCoins = amountIsToReceive ? AmountUtils.trim(amountBigNumber.div(details.rate), fromCoin.digits) : amountCoins;
11739
+ var toAmountCoins = amountIsToReceive ? amountCoins : AmountUtils.trim(amountBigNumber.times(details.rate), toCoin.digits);
11698
11740
  var result = {
11699
11741
  result: true,
11700
11742
  swapCreationInfo: new BaseSwapCreationInfo(fromCoin, toCoin, fromAmountCoins, toAmountCoins, details.rate, details.rawSwapData, min, fiatMin, max, fiatMax, details.durationMinutesRange, details.fixed, details.isRefundAddressRequired)