@rabbitio/ui-kit 1.0.0-beta.53 → 1.0.0-beta.55

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 (184) hide show
  1. package/.husky/commit-msg +4 -13
  2. package/coverage/clover.xml +189 -4094
  3. package/coverage/coverage-final.json +96 -154
  4. package/coverage/index.html +98 -338
  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/assets/wrappedImages/arrowIcon.jsx.html +3 -3
  8. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/arrowTosca.jsx.html +3 -3
  9. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/arrowWhite.jsx.html +3 -3
  10. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/darkRectangle.jsx.html +3 -3
  11. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/determinedError.jsx.html +3 -3
  12. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
  13. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/index.html +3 -3
  14. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/infoIcon.jsx.html +3 -3
  15. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
  16. package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/walletIcon.jsx.html +3 -3
  17. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/axiosAdapter.js.html +3 -3
  18. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/index.html +3 -3
  19. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/qrUtils.js.html +3 -3
  20. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/amountUtils.js.html +3 -3
  21. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/errorUtils.js.html +3 -3
  22. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/apiGroups.js.html +3 -3
  23. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/index.html +3 -3
  24. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/ipAddressProviders.js.html +3 -3
  25. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/fiatCurrenciesService.js.html +3 -3
  26. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/index.html +3 -3
  27. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/blockchain.js.html +3 -3
  28. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/coin.js.html +3 -3
  29. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/index.html +3 -3
  30. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/protocol.js.html +3 -3
  31. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/cache.js.html +3 -3
  32. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/emailAPI.js.html +3 -3
  33. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/index.html +7 -22
  34. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/index.html +3 -3
  35. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/logger.js.html +3 -3
  36. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/logsStorage.js.html +3 -3
  37. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/postponeExecution.js.html +3 -3
  38. package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/safeStringify.js.html +3 -3
  39. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
  40. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetIcon/index.html +3 -3
  41. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
  42. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetSelection/index.html +3 -3
  43. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
  44. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/BackgroundTitle/index.html +3 -3
  45. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
  46. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/InformationMessage/index.html +3 -3
  47. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Input/Input.jsx.html +3 -3
  48. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Input/index.html +3 -3
  49. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
  50. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/LoadingDots/index.html +3 -3
  51. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/NoticeIcon/NoticeIcon.jsx.html +6 -9
  52. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/NoticeIcon/index.html +7 -7
  53. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/QrCode/QrCode.jsx.html +3 -3
  54. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/QrCode/index.html +3 -3
  55. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
  56. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/SupportChat/index.html +3 -3
  57. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Textarea/Textarea.jsx.html +3 -3
  58. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Textarea/index.html +3 -3
  59. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
  60. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TitleBox/index.html +3 -3
  61. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
  62. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Tooltip/index.html +3 -3
  63. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
  64. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TwoLinesOfText/index.html +3 -3
  65. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Validation/Validation.jsx.html +3 -3
  66. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Validation/index.html +3 -3
  67. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Button/Button.jsx.html +3 -3
  68. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Button/index.html +3 -3
  69. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Close/Close.jsx.html +3 -3
  70. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Close/index.html +3 -3
  71. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
  72. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/LinkButton/index.html +3 -3
  73. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
  74. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
  75. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/index.html +3 -3
  76. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/useCallHandlingErrors.js.html +3 -3
  77. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/useReferredState.js.html +3 -3
  78. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/AmountInput/AmountInput.jsx.html +7 -16
  79. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/AmountInput/index.html +7 -7
  80. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/CoinPicker/CoinPicker.jsx.html +5 -5
  81. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/CoinPicker/index.html +3 -3
  82. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
  83. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/LineWithIconLink/index.html +3 -3
  84. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
  85. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/TitledLineWithIconLink/index.html +3 -3
  86. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
  87. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/CoinPickerDialogStep/index.html +3 -3
  88. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/Dialog.jsx.html +3 -3
  89. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
  90. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogButtons/index.html +3 -3
  91. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +14 -8
  92. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogStep/index.html +7 -7
  93. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/index.html +3 -3
  94. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/SwapForm/SwapForm.jsx.html +93 -105
  95. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/SwapForm/index.html +7 -7
  96. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
  97. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/templates/DeterminedErrorDialogStep/index.html +3 -3
  98. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/index.html +3 -3
  99. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/inputValueProviders.js.html +3 -3
  100. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/textUtils.js.html +3 -3
  101. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/uiUtils.js.html +3 -3
  102. package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/urlQueryUtils.js.html +3 -3
  103. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Close/close.jsx.html +3 -3
  104. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Close/index.html +3 -3
  105. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/LinkButton/index.html +3 -3
  106. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/LinkButton/linkButton.jsx.html +3 -3
  107. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Tooltip/index.html +3 -3
  108. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Tooltip/tooltip.jsx.html +3 -3
  109. package/coverage/{ui-kit/src/common/utils/iconsUtils.js.html → rabbit-ui-kit/src/constants/globalConstants.jsx.html} +23 -14
  110. package/coverage/rabbit-ui-kit/src/constants/index.html +116 -0
  111. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/DialogStep/dialogStep.js.html +3 -3
  112. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/DialogStep/index.html +3 -3
  113. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/dialog.js.html +3 -3
  114. package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/index.html +3 -3
  115. package/coverage/{ui-kit → rabbit-ui-kit}/src/index.html +7 -7
  116. package/coverage/{ui-kit → rabbit-ui-kit}/src/index.js.html +18 -6
  117. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js.html +3 -3
  118. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js.html +3 -3
  119. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cancelProcessing.js.html +3 -3
  120. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js.html +3 -3
  121. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/externalApiProvider.js.html +3 -3
  122. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/externalServicesStatsCollector.js.html +3 -3
  123. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/index.html +3 -3
  124. package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/robustExternalAPICallerService.js.html +3 -3
  125. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/index.html +3 -3
  126. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +3 -3
  127. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +6 -6
  128. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
  129. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
  130. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +3 -3
  131. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/index.html +3 -3
  132. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/index.html +3 -3
  133. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/publicSwapService.js.html +5 -5
  134. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/index.html +3 -3
  135. package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
  136. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
  137. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
  138. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
  139. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
  140. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
  141. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
  142. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
  143. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
  144. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/index.html +3 -3
  145. package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/index.html +3 -3
  146. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
  147. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
  148. package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/index.html +3 -3
  149. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +21 -6
  150. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
  151. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
  152. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
  153. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
  154. package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/index.html +7 -7
  155. package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
  156. package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/index.html +3 -3
  157. package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
  158. package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/index.html +3 -3
  159. package/dist/index.cjs +102 -102
  160. package/dist/index.cjs.map +1 -1
  161. package/dist/index.css +58 -43
  162. package/dist/index.css.map +1 -1
  163. package/dist/index.modern.js +99 -103
  164. package/dist/index.modern.js.map +1 -1
  165. package/dist/index.module.js +101 -103
  166. package/dist/index.module.js.map +1 -1
  167. package/dist/index.umd.js +102 -102
  168. package/dist/index.umd.js.map +1 -1
  169. package/package.json +1 -1
  170. package/src/components/atoms/NoticeIcon/NoticeIcon.jsx +0 -1
  171. package/src/components/atoms/TwoLinesOfText/lines-of-text.module.scss +2 -0
  172. package/src/components/molecules/AmountInput/AmountInput.jsx +1 -4
  173. package/src/components/molecules/CoinPicker/CoinPicker.jsx +2 -2
  174. package/src/components/molecules/CoinPicker/coin-picker.module.scss +11 -6
  175. package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +4 -2
  176. package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +16 -2
  177. package/src/components/organisms/Dialog/dialog.module.scss +8 -5
  178. package/src/components/organisms/SwapForm/SwapForm.jsx +87 -91
  179. package/src/components/organisms/SwapForm/swap-form.module.scss +1 -2
  180. package/src/constants/globalConstants.jsx +4 -0
  181. package/src/index.js +4 -0
  182. package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +3 -3
  183. package/src/swaps-lib/services/publicSwapService.js +2 -2
  184. package/src/common/utils/iconsUtils.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabbitio/ui-kit",
3
- "version": "1.0.0-beta.53",
3
+ "version": "1.0.0-beta.55",
4
4
  "description": "Rabbit.io react.js components kit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -35,7 +35,6 @@ export const NoticeIcon = ({
35
35
  <div ref={noticeRef} className={s["notice-icon"]}>
36
36
  {titleNoticeIcon ? (
37
37
  <img
38
- // src={titleNoticeIcon ? titleNoticeIcon : exclamationIcon}
39
38
  src={titleNoticeIcon}
40
39
  alt="title icon"
41
40
  onClick={() => setShowTooltip((prev) => !prev)}
@@ -47,6 +47,7 @@
47
47
  .line {
48
48
  width: 20px;
49
49
  margin: 0 Margin("3");
50
+ text-align: left;
50
51
  // font-family: NunitoSans;
51
52
 
52
53
  @media (max-width: $phone-width) {
@@ -58,5 +59,6 @@
58
59
  .second-line-text {
59
60
  color: SolidColor("grey");
60
61
  white-space: nowrap;
62
+ text-align: left;
61
63
  // font-family: NunitoSans;
62
64
  }
@@ -55,7 +55,6 @@ export const AmountInput = React.forwardRef(
55
55
  },
56
56
  buttonForwardRef
57
57
  ) => {
58
- // const { t } = useTranslation();
59
58
  const callHandlingErrors = useCallHandlingErrors();
60
59
 
61
60
  const [coinAmountValue, setCoinAmountValue] = useState("");
@@ -193,9 +192,7 @@ export const AmountInput = React.forwardRef(
193
192
  ? isSendAll
194
193
  ? linkButtonActiveText
195
194
  : linkButtonInactiveText
196
- : // ? t("molecules.AmountInput.send-all-enabled")
197
- // : t("molecules.AmountInput.send-all-disabled")
198
- null
195
+ : null
199
196
  }
200
197
  linkButtonClick={handleSendAllClick}
201
198
  >
@@ -11,7 +11,7 @@ import { logErrorOrOutputToConsole } from "../../../common/errorUtils.js";
11
11
  import { RadioButtonWithText } from "../../atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx";
12
12
  import { Input } from "../../atoms/Input/Input.jsx";
13
13
  import { InformationMessage } from "../../atoms/InformationMessage/InformationMessage.jsx";
14
- import { FALLBACK_ICON_URL } from "../../../common/utils/iconsUtils.js";
14
+ import { FALLBACK_ASSET_ICON_URL } from "../../../constants/globalConstants.jsx";
15
15
  import { AssetIcon } from "../../atoms/AssetIcon/AssetIcon.jsx";
16
16
  import { Button } from "../../atoms/buttons/Button/Button.jsx";
17
17
  import { LoadingDots } from "../../atoms/LoadingDots/LoadingDots.jsx";
@@ -447,7 +447,7 @@ export const CoinPicker = ({
447
447
  assetIconProtocolSrc
448
448
  }
449
449
  fallbackSrc={
450
- FALLBACK_ICON_URL
450
+ FALLBACK_ASSET_ICON_URL
451
451
  }
452
452
  />
453
453
  <div
@@ -32,7 +32,10 @@
32
32
  position: absolute;
33
33
  width: 100%;
34
34
  height: 20px;
35
- background: linear-gradient(rgba(SolidColor("dark"), 0.05), rgba(255, 255, 255, 0));
35
+ background: linear-gradient(
36
+ rgba(SolidColor("dark"), 0.05),
37
+ rgba(255, 255, 255, 0)
38
+ );
36
39
  left: 0;
37
40
  z-index: 1;
38
41
  transition: 0.2s opacity ease;
@@ -129,19 +132,21 @@
129
132
  min-width: 0;
130
133
  line-height: 20px;
131
134
 
132
- .name {
135
+ .name,
136
+ .amount {
133
137
  color: inherit;
134
- font-weight: $bold;
135
138
  line-height: inherit;
136
139
  user-select: none;
140
+ text-align: left;
141
+ }
142
+
143
+ .name {
144
+ font-weight: $bold;
137
145
  }
138
146
 
139
147
  .amount {
140
- color: inherit;
141
148
  font-weight: $semi-bold;
142
- line-height: inherit;
143
149
  opacity: 0.5;
144
- user-select: none;
145
150
  }
146
151
  }
147
152
 
@@ -298,7 +298,8 @@ export const DialogStep = ({
298
298
  (!isMultiStep ? " " + s["single-step"] : "") +
299
299
  (backgroundImage || backgroundImageMobile
300
300
  ? " " + s["with-background"]
301
- : "")
301
+ : "") +
302
+ (inline ? " " + s["inline"] : "")
302
303
  }
303
304
  ref={currentStepRef}
304
305
  onTransitionEnd={handleTransitionEnd}
@@ -354,7 +355,8 @@ export const DialogStep = ({
354
355
  " " +
355
356
  s[stepClass] +
356
357
  " " +
357
- s[wrapperDirectionSubclass]
358
+ s[wrapperDirectionSubclass] +
359
+ (inline ? " " + s["inline"] : "")
358
360
  }
359
361
  >
360
362
  {isMultiStep &&
@@ -17,8 +17,16 @@
17
17
  @extend %white-box-big-padding;
18
18
  max-height: 100%;
19
19
 
20
+ &.inline {
21
+ padding: 0;
22
+ background: none;
23
+ border-radius: 0;
24
+ }
25
+
20
26
  @media (min-width: $tablet-width) {
21
- overflow: hidden;
27
+ &:not(.inline) {
28
+ overflow: hidden;
29
+ }
22
30
  }
23
31
 
24
32
  &.single-step {
@@ -120,8 +128,14 @@
120
128
  &-wrapper {
121
129
  padding: 40px;
122
130
 
131
+ &.inline {
132
+ padding: 0;
133
+ }
134
+
123
135
  @media (max-width: $phone-width) {
124
- padding: 20px 20px max(20px, env(safe-area-inset-bottom)) 20px;
136
+ &:not(.inline) {
137
+ padding: 20px 20px max(20px, env(safe-area-inset-bottom)) 20px;
138
+ }
125
139
  }
126
140
 
127
141
  &.prev {
@@ -182,15 +182,18 @@ $transitionDuration: 0.2s;
182
182
  }
183
183
  }
184
184
 
185
+ &.animation-disabled {
186
+ transition: none;
187
+ transition-delay: 0s;
188
+ overflow: visible;
189
+ }
190
+
185
191
  &.inline {
186
192
  margin: 0;
187
193
  width: 100%;
188
194
  min-width: auto;
189
- }
190
-
191
- &.animation-disabled {
192
- transition: none;
193
- transition-delay: 0s;
195
+ border-radius: 0;
196
+ box-shadow: none;
194
197
  overflow: visible;
195
198
  }
196
199
 
@@ -14,18 +14,18 @@ import { Validation } from "../../atoms/Validation/Validation.jsx";
14
14
  import { Button } from "../../atoms/buttons/Button/Button.jsx";
15
15
 
16
16
  /**
17
- * This is type definition of a function that is used inside SwapForm to compose the URL for hero button.
17
+ * This is the type definition of a function used inside SwapForm to compose the URL for the hero button.
18
18
  *
19
19
  * @function
20
20
  * @name composeConfirmButtonTo
21
- * @param [fromTicker] {string}
22
- * @param [toTicker] {string}
23
- * @param [fromAmount] {string}
24
- * @return {string} full URL or relative URL that can be used for <a href="..." />
21
+ * @param {string} [fromTicker] - Ticker symbol of the asset being sent.
22
+ * @param {string} [toTicker] - Ticker symbol of the asset being received.
23
+ * @param {string} [fromAmount] - Amount of the asset being sent.
24
+ * @return {string} Full URL or relative URL that can be used for <a href="..." />.
25
25
  */
26
26
 
27
27
  /**
28
- * Common click handler without params and return value, just your logic execution.
28
+ * Common click handler without parameters and return value, just your logic execution.
29
29
  *
30
30
  * @function
31
31
  * @name handleClick
@@ -35,28 +35,28 @@ import { Button } from "../../atoms/buttons/Button/Button.jsx";
35
35
  /**
36
36
  * Form executes this function when swap creation info retrieval is finished successfully.
37
37
  *
38
- * @name setSwapCreationEstimation
39
38
  * @function
40
- * @param details {BaseSwapCreationInfo}
39
+ * @name setSwapCreationEstimation
40
+ * @param {BaseSwapCreationInfo} details - Details of the swap creation estimation.
41
41
  * @return {void}
42
42
  */
43
43
 
44
44
  /**
45
45
  * Error handler for unexpected errors.
46
46
  *
47
- * @name handleUnexpectedError
48
47
  * @function
49
- * @param error {Error}
48
+ * @name handleUnexpectedError
49
+ * @param {Error} error - The unexpected error encountered.
50
50
  * @return {void}
51
51
  */
52
52
 
53
53
  /**
54
- * Should implement the logic with rotating assets (if you want "to" to became "from" and "from" to became "to").
54
+ * Should implement the logic with rotating assets (if you want "to" to become "from" and "from" to become "to").
55
55
  *
56
56
  * @function
57
57
  * @name rotateAssets
58
- * @param sendingAssetTicker {string}
59
- * @param receivingAssetTicker {string}
58
+ * @param {string} sendingAssetTicker - Ticker symbol of the asset being sent.
59
+ * @param {string} receivingAssetTicker - Ticker symbol of the asset being received.
60
60
  * @return {void}
61
61
  */
62
62
 
@@ -65,13 +65,13 @@ import { Button } from "../../atoms/buttons/Button/Button.jsx";
65
65
  *
66
66
  * @function
67
67
  * @name handleSwapServiceError
68
- * @param errorCode {string} error code that is being returned as "reason" from your handlers ...
69
- * @param setValidationContent {function} accepts string to be displayed on form as validation error
70
- * @param setBalanceValid {function} accepts single boolean parameter
71
- * @param setMinimalAmountValid {function} accepts single boolean parameter
72
- * @param setMaximumAmountValid {function} accepts single boolean parameter
73
- * @param setIsPairSupported {function} accepts single boolean parameter
74
- * @param setIsSameCoins {function} accepts single boolean parameter
68
+ * @param {string} errorCode - Error code returned as "reason" from your handlers.
69
+ * @param {function} setValidationContent - Function to set the validation error message on the form.
70
+ * @param {function} setBalanceValid - Function to set the balance validity, accepts a boolean.
71
+ * @param {function} setMinimalAmountValid - Function to set the minimal amount validity, accepts a boolean.
72
+ * @param {function} setMaximumAmountValid - Function to set the maximum amount validity, accepts a boolean.
73
+ * @param {function} setIsPairSupported - Function to set the pair support status, accepts a boolean.
74
+ * @param {function} setIsSameCoins - Function to set the status if the same coins are used, accepts a boolean.
75
75
  * @return {void}
76
76
  */
77
77
 
@@ -80,10 +80,10 @@ import { Button } from "../../atoms/buttons/Button/Button.jsx";
80
80
  *
81
81
  * @function
82
82
  * @name retrieveSwapDetails
83
- * @param sendingAssetTicker {string}
84
- * @param receivingAssetTicker {string}
85
- * @param amount {string}
86
- * @param [isSwapAll=false] {boolean}
83
+ * @param {string} sendingAssetTicker - Ticker symbol of the asset being sent.
84
+ * @param {string} receivingAssetTicker - Ticker symbol of the asset being received.
85
+ * @param {string} amount - Amount of the asset to be swapped.
86
+ * @param {boolean} [isSwapAll=false] - Indicates if the swap should use all available balance.
87
87
  * @return {Promise<{
88
88
  * result: false,
89
89
  * reason: string,
@@ -99,12 +99,12 @@ import { Button } from "../../atoms/buttons/Button/Button.jsx";
99
99
  */
100
100
 
101
101
  /**
102
- * Async function that retrieves initial swap details for pair like whether the pair is available, min/max swappable amounts etc.
102
+ * Async function that retrieves initial swap details for a pair like whether the pair is available, min/max swappable amounts, etc.
103
103
  *
104
104
  * @function
105
105
  * @name retrieveInitialSwapData
106
- * @param sendingAssetTicker {string}
107
- * @param receivingAssetTicker {string}
106
+ * @param {string} sendingAssetTicker - Ticker symbol of the asset being sent.
107
+ * @param {string} receivingAssetTicker - Ticker symbol of the asset being received.
108
108
  * @return {Promise<{
109
109
  * result: true,
110
110
  * min: string,
@@ -120,50 +120,52 @@ import { Button } from "../../atoms/buttons/Button/Button.jsx";
120
120
 
121
121
  /**
122
122
  * Swap form provides basic functionality for entering to/from amounts both in crypto and fiat, switching assets,
123
- * selecting assets, showing balance for assets.
124
- * It gracefully handles not available fiat rates and can work without wallet environment (without balances).
123
+ * selecting assets, showing balance for assets. It gracefully handles unavailable fiat rates and can work
124
+ * both with and without a wallet environment (without balances).
125
125
  *
126
- * @param sendingAssetTicker {string} Rabbit format of ticker
127
- * @param receivingAssetTicker {string} Rabbit format of ticker
128
- * @param [sendingAssetDecimalCount=AmountUtils.significantDecimalCount] {number}
129
- * @param [receivingAssetDecimalCount=AmountUtils.significantDecimalCount] {number}
130
- * @param sendingAssetTickerPrintable {string} standard asset ticker
131
- * @param receivingAssetTickerPrintable {string} standard asset ticker
132
- * @param [sendingAssetProtocol] Protocol name to be displayed in text in the change asset button
133
- * @param [receivingAssetProtocol] Protocol name to be displayed in text in the change asset button
134
- * @param sendingAssetIconSrc {string} ready to use src
135
- * @param [sendingAssetProtocolIconSrc=null] {string} optional ready to use src
136
- * @param receivingAssetIconSrc {string} ready to use src
137
- * @param [receivingAssetProtocolIconSrc=null] {string} optional ready to use src
138
- * @param [fallBackAssetIconSrc=null] {string} optional ready to use src - used when some icon src resolution fails
139
- * @param sendingAssetFeeCoinTickerPrintable {string} optional standard ticker for fee coin
140
- * @param [sendingAssetBalance] {string}
141
- * @param [receivingAssetBalance] {string}
142
- * @param handleChangeSendingAssetClick {handleClick}
143
- * @param handleChangeReceivingAssetClick {handleClick}
144
- * @param handleConfirmButtonClick {handleClick}
145
- * @param composeConfirmButtonTo {composeConfirmButtonTo}
146
- * @param setSwapCreationEstimation {setSwapCreationEstimation}
147
- * @param handleUnexpectedError {handleUnexpectedError}
148
- * @param rotateAssets {rotateAssets}
149
- * @param [preservedAmount=null] {string}
150
- * @param handleSwapServiceError {handleSwapServiceError}
151
- * @param [formHasBalance] {boolean}
152
- * @param retrieveSwapDetails {retrieveSwapDetails}
153
- * @param retrieveInitialSwapData {retrieveInitialSwapData}
154
- * @param triggerDataUpdateResetting {number} convey changed number to reset interval updating the data periodically
155
- * @param fromAssetSelectionButtonRef {React.Ref}
156
- * @param toAssetSelectionButtonRef {React.Ref}
157
- * @param [sendingAssetToFiatRate] {number|string}
158
- * @param [receivingAssetToFiatRate] {number|string}
159
- * @param [fiatCurrencyCode] {string}
160
- * @param [fiatCurrencyDecimals] {number}
161
- * @param formHasFiat {boolean}
162
- * @param [translations] {object} default English texts will be used if the property is omitted
163
- * @param swapSeparatorIconSrc {string} ready to use src
164
- * @param swapButtonAlwaysActive {boolean} this setting allows to the form state in terms of validity to go
165
- * to the next step. If this setting is set to true then user always can click the hero button
166
- * @return {JSX.Element}
126
+ * @param {object} props - Props object for SwapForm component.
127
+ * @param {string} props.sendingAssetTicker - Rabbit format of the ticker symbol for the asset being sent.
128
+ * @param {string} props.receivingAssetTicker - Rabbit format of the ticker symbol for the asset being received.
129
+ * @param {number} [props.sendingAssetDecimalCount=AmountUtils.significantDecimalCount] - Decimal count for the sending asset.
130
+ * @param {number} [props.receivingAssetDecimalCount=AmountUtils.significantDecimalCount] - Decimal count for the receiving asset.
131
+ * @param {string} props.sendingAssetTickerPrintable - Standard ticker symbol for the sending asset.
132
+ * @param {string} props.receivingAssetTickerPrintable - Standard ticker symbol for the receiving asset.
133
+ * @param {string} [props.sendingAssetProtocol] - Protocol name to be displayed in text on the change asset button.
134
+ * @param {string} [props.receivingAssetProtocol] - Protocol name to be displayed in text on the change asset button.
135
+ * @param {string} props.sendingAssetIconSrc - Source URL for the sending asset icon.
136
+ * @param {string} [props.sendingAssetProtocolIconSrc=null] - Optional source URL for the sending asset protocol icon.
137
+ * @param {string} props.receivingAssetIconSrc - Source URL for the receiving asset icon.
138
+ * @param {string} [props.receivingAssetProtocolIconSrc=null] - Optional source URL for the receiving asset protocol icon.
139
+ * @param {string} [props.fallBackAssetIconSrc=null] - Optional source URL for a fallback icon used when an icon fails to load.
140
+ * @param {string} [props.sendingAssetFeeCoinTickerPrintable] - Optional standard ticker symbol for the fee coin of the sending asset.
141
+ * @param {string} [props.sendingAssetBalance] - Balance of the sending asset.
142
+ * @param {string} [props.receivingAssetBalance] - Balance of the receiving asset.
143
+ * @param {handleClick} props.handleChangeSendingAssetClick - Function to handle clicking on the change sending asset button.
144
+ * @param {handleClick} props.handleChangeReceivingAssetClick - Function to handle clicking on the change receiving asset button.
145
+ * @param {handleClick} props.handleConfirmButtonClick - Function to handle clicking on the confirm button.
146
+ * @param {composeConfirmButtonTo} props.composeConfirmButtonTo - Function to compose the URL for the confirm button.
147
+ * @param {setSwapCreationEstimation} props.setSwapCreationEstimation - Function to set the swap creation estimation.
148
+ * @param {handleUnexpectedError} props.handleUnexpectedError - Function to handle unexpected errors.
149
+ * @param {rotateAssets} props.rotateAssets - Function to rotate the assets (swap sending and receiving assets).
150
+ * @param {string} [props.preservedAmount=null] - Amount to be preserved.
151
+ * @param {handleSwapServiceError} props.handleSwapServiceError - Function to handle standard errors that we can recognize.
152
+ * @param {boolean} [props.formHasBalance] - Indicates if the form has balance information.
153
+ * @param {retrieveSwapDetails} props.retrieveSwapDetails - Function to retrieve swap details based on the given parameters.
154
+ * @param {retrieveInitialSwapData} props.retrieveInitialSwapData - Function to retrieve initial swap data for a given pair of assets.
155
+ * @param {number} props.triggerDataUpdateResetting - Number to reset interval updating the data periodically.
156
+ * @param {React.Ref} props.fromAssetSelectionButtonRef - Reference to the from asset selection button.
157
+ * @param {React.Ref} props.toAssetSelectionButtonRef - Reference to the to asset selection button.
158
+ * @param {number|string} [props.sendingAssetToFiatRate] - Rate for converting the sending asset to fiat.
159
+ * @param {number|string} [props.receivingAssetToFiatRate] - Rate for converting the receiving asset to fiat.
160
+ * @param {string} [props.fiatCurrencyCode] - Code for the fiat currency.
161
+ * @param {number} [props.fiatCurrencyDecimals] - Decimal places for the fiat currency.
162
+ * @param {boolean} [props.formHasFiat] - Indicates if the form supports fiat currency.
163
+ * @param {string|null} [props.termsOfUseUrl] - Terms of use URL, shown only if both terms & privacy policy passed.
164
+ * @param {string|null} [props.privacyPolicyUrl] - Privacy policy of use URL, shown only if both terms & privacy policy passed.
165
+ * @param {object} [props.translations] - Object containing translations, default English texts will be used if omitted.
166
+ * @param {string} props.swapSeparatorIconSrc - Source URL for the swap separator icon.
167
+ * @param {boolean} props.swapButtonAlwaysActive - Setting that allows the form state to proceed to the next step regardless of validity.
168
+ * @return {JSX.Element} Rendered SwapForm component.
167
169
  * @constructor
168
170
  */
169
171
  export const SwapForm = ({
@@ -219,6 +221,8 @@ export const SwapForm = ({
219
221
  fiatCurrencyCode = null,
220
222
  fiatCurrencyDecimals = null,
221
223
  formHasFiat = true,
224
+ termsOfUseUrl = null,
225
+ privacyPolicyUrl = null,
222
226
  translations = {
223
227
  swapAllButtonTitles: {
224
228
  enable: "Swap all",
@@ -304,7 +308,6 @@ export const SwapForm = ({
304
308
  const callHandlingErrors = useCallHandlingErrors();
305
309
 
306
310
  const recalculationDelayOnTyping = 1000;
307
- const showConsent = !formHasBalance; // We show TOS&PP consent only when working outside wallet
308
311
 
309
312
  const handleSendAssetAmountChange = (amount) => {
310
313
  if (amount != null && amount !== "") {
@@ -745,7 +748,7 @@ export const SwapForm = ({
745
748
  }, [sendAssetAmount.current]);
746
749
 
747
750
  return (
748
- <div className={s["swap-dialog-form"]}>
751
+ <div className={s["swap-form"]}>
749
752
  <TitleBox
750
753
  linkButtonClick={
751
754
  BigNumber(sendingAssetBalance?.assetAmount).eq(0)
@@ -767,7 +770,7 @@ export const SwapForm = ({
767
770
  BigNumber(sendingAssetBalance?.assetAmount).eq(0)
768
771
  }
769
772
  >
770
- <div className={s["swap-dialog-form-inputs"]}>
773
+ <div className={s["swap-form-inputs"]}>
771
774
  <AmountInput
772
775
  ticker={sendingAssetTicker}
773
776
  tickerPrintable={sendingAssetTickerPrintable}
@@ -805,7 +808,7 @@ export const SwapForm = ({
805
808
  />
806
809
  <div
807
810
  className={
808
- s["swap-dialog-form-inputs-separator"] +
811
+ s["swap-form-inputs-separator"] +
809
812
  " " +
810
813
  (isLoading.current ||
811
814
  sendingAssetTicker === null ||
@@ -858,7 +861,7 @@ export const SwapForm = ({
858
861
  }
859
862
  />
860
863
  </div>
861
- <div className={s["swap-dialog-form-information-field"]}>
864
+ <div className={s["swap-form-information-field"]}>
862
865
  <p>
863
866
  {!isPairSupported ? (
864
867
  translations.informationBlock.pairNotAvailable
@@ -987,43 +990,37 @@ export const SwapForm = ({
987
990
  ) : (
988
991
  translations.informationBlock.loadingMinimalAmount
989
992
  )}
990
- {/* TODO: [feature, moderate] add "Please enter the amount you want to swap." */}
991
993
  </p>
992
994
  </div>
993
995
  {validationContent ? (
994
- <div className={s["swap-dialog-form-validation-text"]}>
996
+ <div className={s["swap-form-validation-text"]}>
995
997
  <Validation text={validationContent} />
996
998
  </div>
997
999
  ) : (
998
1000
  ""
999
1001
  )}
1000
- <div className={s["swap-dialog-form-button-container"]}>
1002
+ <div className={s["swap-form-button-container"]}>
1001
1003
  {formHasBalance ? null : (
1002
1004
  <p
1003
1005
  className={
1004
- s[
1005
- "swap-dialog-form-button-container-consent-text"
1006
- ]
1006
+ s["swap-form-button-container-consent-text"]
1007
1007
  }
1008
1008
  >
1009
1009
  {translations.consents.consentTextRate}
1010
1010
  </p>
1011
1011
  )}
1012
- {showConsent ? null : (
1012
+ {!termsOfUseUrl || !privacyPolicyUrl ? null : (
1013
1013
  <p
1014
1014
  className={
1015
- s[
1016
- "swap-dialog-form-button-container-consent-text"
1017
- ]
1015
+ s["swap-form-button-container-consent-text"]
1018
1016
  }
1019
1017
  >
1020
1018
  {translations.consents.consentText + " "}
1021
1019
  <a
1022
- // TODO: [dev] fix dox link - pass via property
1023
- href="/docs/legal/swap-terms-of-use.html"
1020
+ href={termsOfUseUrl}
1024
1021
  className={
1025
1022
  s[
1026
- "swap-dialog-form-button-container-consent-text-link"
1023
+ "swap-form-button-container-consent-text-link"
1027
1024
  ]
1028
1025
  }
1029
1026
  target="_blank"
@@ -1032,11 +1029,10 @@ export const SwapForm = ({
1032
1029
  </a>
1033
1030
  {" " + translations.consents.and + " "}
1034
1031
  <a
1035
- // TODO: [dev] fix dox link - pass via property
1036
- href="/docs/legal/swap-privacy-policy.html"
1032
+ href={privacyPolicyUrl}
1037
1033
  className={
1038
1034
  s[
1039
- "swap-dialog-form-button-container-consent-text-link"
1035
+ "swap-form-button-container-consent-text-link"
1040
1036
  ]
1041
1037
  }
1042
1038
  target="_blank"
@@ -1,7 +1,6 @@
1
1
  @import "../../../../styles/index";
2
2
 
3
- // TODO: [dev] rename to .swap-dialog
4
- .swap-dialog-form {
3
+ .swap-form {
5
4
  width: 100%;
6
5
 
7
6
  &-inputs {
@@ -0,0 +1,4 @@
1
+ export const FALLBACK_ASSET_ICON_URL =
2
+ "https://rabbit.io/asset-icons/fallback.svg";
3
+
4
+ export const DEFAULT_CRYPTO_DECIMAL_COUNT = 8;
package/src/index.js CHANGED
@@ -37,6 +37,10 @@ export { DIALOG_STEP_CLASS } from "./constants/organisms/dialog/DialogStep/dialo
37
37
  export { ICON_ROTATE_OPTIONS } from "./constants/atoms/LinkButton/linkButton.jsx";
38
38
  export { TOOLTIP_POSITIONS } from "./constants/atoms/Tooltip/tooltip.jsx";
39
39
  export { CLOSE_COLORS } from "./constants/atoms/Close/close.jsx";
40
+ export {
41
+ FALLBACK_ASSET_ICON_URL,
42
+ DEFAULT_CRYPTO_DECIMAL_COUNT,
43
+ } from "./constants/globalConstants.jsx";
40
44
 
41
45
  export { useCallHandlingErrors } from "./components/hooks/useCallHandlingErrors.js";
42
46
  export { useReferredState } from "./components/hooks/useReferredState.js";
@@ -9,7 +9,7 @@ import { Coin } from "../../common/models/coin.js";
9
9
  import { Protocol } from "../../common/models/protocol.js";
10
10
  import { safeStringify } from "../../common/utils/safeStringify.js";
11
11
  import { Logger } from "../../common/utils/logging/logger.js";
12
- import { FALLBACK_ICON_URL } from "../../common/utils/iconsUtils.js";
12
+ import { FALLBACK_ASSET_ICON_URL } from "../../constants/globalConstants.jsx";
13
13
 
14
14
  export const BANNED_PARTNERS = ["stealthex", "changee", "coincraddle"];
15
15
 
@@ -129,7 +129,7 @@ export class SwapspaceSwapProvider extends SwapProvider {
129
129
  return (
130
130
  this._supportedCoins.find(
131
131
  (item) => item.coin?.ticker === coin?.ticker
132
- )?.iconURL ?? FALLBACK_ICON_URL
132
+ )?.iconURL ?? FALLBACK_ASSET_ICON_URL
133
133
  );
134
134
  } catch (e) {
135
135
  improveAndRethrow(e, loggerSource);
@@ -201,7 +201,7 @@ export class SwapspaceSwapProvider extends SwapProvider {
201
201
  isPopular: !!item.popular,
202
202
  iconURL: item.icon
203
203
  ? `https://storage.swapspace.co${item.icon}`
204
- : FALLBACK_ICON_URL,
204
+ : FALLBACK_ASSET_ICON_URL,
205
205
  deposit: item.deposit ?? false,
206
206
  withdrawal: item.withdrawal ?? false,
207
207
  validationRegexp: item.validationRegexp ?? null,
@@ -212,8 +212,8 @@ export class PublicSwapService {
212
212
  fixed,
213
213
  coinUsdtRate
214
214
  );
215
- const min = details.result ? details.min : details.smallestMin;
216
- const max = details.result ? details.max : details.greatestMax;
215
+ const min = details.smallestMin;
216
+ const max = details.greatestMax;
217
217
  let fiatMin = null,
218
218
  fiatMax = null;
219
219
  if (coinUsdtRate != null) {
@@ -1 +0,0 @@
1
- export const FALLBACK_ICON_URL = "https://rabbit.io/asset-icons/fallback.svg";