@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.
- package/.husky/commit-msg +4 -13
- package/coverage/clover.xml +189 -4094
- package/coverage/coverage-final.json +96 -154
- package/coverage/index.html +98 -338
- package/coverage/{ui-kit → rabbit-ui-kit}/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/index.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/arrowIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/arrowTosca.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/arrowWhite.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/darkRectangle.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/determinedError.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/failedValidationIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/infoIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/successfulValidationIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/assets/wrappedImages/walletIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/adapters/qrUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/amountUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/errorUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/apiGroups.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/external-apis/ipAddressProviders.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/fiatCurrenciesService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/blockchain.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/coin.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/models/protocol.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/cache.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/emailAPI.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/index.html +7 -22
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/logger.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/logging/logsStorage.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/postponeExecution.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/common/utils/safeStringify.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetIcon/AssetIcon.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetIcon/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetSelection/AssetSelection.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/AssetSelection/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/BackgroundTitle/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/InformationMessage/InformationMessage.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/InformationMessage/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Input/Input.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Input/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/LoadingDots/LoadingDots.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/LoadingDots/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/NoticeIcon/NoticeIcon.jsx.html +6 -9
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/NoticeIcon/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/QrCode/QrCode.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/QrCode/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/SupportChat/SupportChat.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/SupportChat/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Textarea/Textarea.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Textarea/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TitleBox/TitleBox.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TitleBox/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Tooltip/Tooltip.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Tooltip/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/TwoLinesOfText/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Validation/Validation.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/Validation/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Button/Button.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Button/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Close/Close.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/Close/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/LinkButton/LinkButton.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/LinkButton/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/atoms/buttons/RadioButtonWithText/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/useCallHandlingErrors.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/hooks/useReferredState.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/AmountInput/AmountInput.jsx.html +7 -16
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/AmountInput/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/CoinPicker/CoinPicker.jsx.html +5 -5
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/CoinPicker/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/LineWithIconLink/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/CoinPickerDialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/Dialog.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +14 -8
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/DialogStep/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/Dialog/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/SwapForm/SwapForm.jsx.html +93 -105
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/organisms/SwapForm/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/inputValueProviders.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/textUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/uiUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/components/utils/urlQueryUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Close/close.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Close/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/LinkButton/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/LinkButton/linkButton.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Tooltip/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/atoms/Tooltip/tooltip.jsx.html +3 -3
- package/coverage/{ui-kit/src/common/utils/iconsUtils.js.html → rabbit-ui-kit/src/constants/globalConstants.jsx.html} +23 -14
- package/coverage/rabbit-ui-kit/src/constants/index.html +116 -0
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/DialogStep/dialogStep.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/DialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/dialog.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/constants/organisms/dialog/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/src/index.js.html +18 -6
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/cancelProcessing.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/externalApiProvider.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/externalServicesStatsCollector.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/robustExteranlApiCallerService/robustExternalAPICallerService.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +6 -6
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/models/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/services/publicSwapService.js.html +5 -5
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/src/swaps-lib/utils/swapUtils.js.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/buttons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/atoms/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/molecules/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +21 -6
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/organisms/Dialog/index.html +7 -7
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/stubs/index.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
- package/coverage/{ui-kit → rabbit-ui-kit}/stories/templates/index.html +3 -3
- package/dist/index.cjs +102 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +58 -43
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +99 -103
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +101 -103
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +102 -102
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/NoticeIcon/NoticeIcon.jsx +0 -1
- package/src/components/atoms/TwoLinesOfText/lines-of-text.module.scss +2 -0
- package/src/components/molecules/AmountInput/AmountInput.jsx +1 -4
- package/src/components/molecules/CoinPicker/CoinPicker.jsx +2 -2
- package/src/components/molecules/CoinPicker/coin-picker.module.scss +11 -6
- package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +4 -2
- package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +16 -2
- package/src/components/organisms/Dialog/dialog.module.scss +8 -5
- package/src/components/organisms/SwapForm/SwapForm.jsx +87 -91
- package/src/components/organisms/SwapForm/swap-form.module.scss +1 -2
- package/src/constants/globalConstants.jsx +4 -0
- package/src/index.js +4 -0
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +3 -3
- package/src/swaps-lib/services/publicSwapService.js +2 -2
- package/src/common/utils/iconsUtils.js +0 -1
package/package.json
CHANGED
|
@@ -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
|
-
:
|
|
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 {
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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]
|
|
22
|
-
* @param [toTicker]
|
|
23
|
-
* @param [fromAmount]
|
|
24
|
-
* @return {string}
|
|
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
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
|
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
|
|
59
|
-
* @param
|
|
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
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
73
|
-
* @param
|
|
74
|
-
* @param
|
|
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
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
86
|
-
* @param [isSwapAll=false]
|
|
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
|
|
107
|
-
* @param
|
|
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
|
-
*
|
|
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
|
|
127
|
-
* @param
|
|
128
|
-
* @param
|
|
129
|
-
* @param [
|
|
130
|
-
* @param
|
|
131
|
-
* @param
|
|
132
|
-
* @param
|
|
133
|
-
* @param [
|
|
134
|
-
* @param
|
|
135
|
-
* @param
|
|
136
|
-
* @param
|
|
137
|
-
* @param
|
|
138
|
-
* @param [
|
|
139
|
-
* @param
|
|
140
|
-
* @param [
|
|
141
|
-
* @param [
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
145
|
-
* @param
|
|
146
|
-
* @param
|
|
147
|
-
* @param
|
|
148
|
-
* @param
|
|
149
|
-
* @param
|
|
150
|
-
* @param
|
|
151
|
-
* @param
|
|
152
|
-
* @param
|
|
153
|
-
* @param
|
|
154
|
-
* @param
|
|
155
|
-
* @param
|
|
156
|
-
* @param
|
|
157
|
-
* @param
|
|
158
|
-
* @param
|
|
159
|
-
* @param [
|
|
160
|
-
* @param [
|
|
161
|
-
* @param
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
164
|
-
* @param
|
|
165
|
-
*
|
|
166
|
-
* @
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
{
|
|
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
|
-
|
|
1023
|
-
href="/docs/legal/swap-terms-of-use.html"
|
|
1020
|
+
href={termsOfUseUrl}
|
|
1024
1021
|
className={
|
|
1025
1022
|
s[
|
|
1026
|
-
"swap-
|
|
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
|
-
|
|
1036
|
-
href="/docs/legal/swap-privacy-policy.html"
|
|
1032
|
+
href={privacyPolicyUrl}
|
|
1037
1033
|
className={
|
|
1038
1034
|
s[
|
|
1039
|
-
"swap-
|
|
1035
|
+
"swap-form-button-container-consent-text-link"
|
|
1040
1036
|
]
|
|
1041
1037
|
}
|
|
1042
1038
|
target="_blank"
|
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 {
|
|
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 ??
|
|
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
|
-
:
|
|
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.
|
|
216
|
-
const max = details.
|
|
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";
|