@rango-dev/widget-embedded 0.50.1-next.3 → 0.50.1-next.5
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/dist/components/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
- package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts +322 -0
- package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +0 -160
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
- package/dist/components/NamespaceItem/NamespaceItem.styles.d.ts +4 -2
- package/dist/components/NamespaceItem/NamespaceItem.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.styles.d.ts +31 -26
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts +322 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts +3 -2
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +1 -161
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
- package/dist/components/SwapMetrics/SwapMetrics.styles.d.ts +3 -2
- package/dist/components/SwapMetrics/SwapMetrics.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +7 -3
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts +3 -2
- package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +2 -2
- package/src/components/CustomTokenModal/CustomTokenModal.styles.ts +14 -1
- package/src/components/CustomTokenModal/CustomTokenModal.tsx +27 -5
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +0 -6
- package/src/components/Quote/Quote.styles.ts +24 -21
- package/src/components/Quote/Quote.tsx +55 -28
- package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +2 -12
- package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +24 -8
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +15 -1
- package/src/components/SwapDetails/SwapDetails.styles.ts +1 -0
- package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +2 -1
- package/src/components/SwapDetailsModal/SwapDetailsModal.styles.ts +4 -12
- package/src/components/WalletStatefulConnect/DerivationPath.tsx +11 -4
- package/src/containers/QuoteInfo/QuoteInfo.styles.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.50.1-next.
|
|
3
|
+
"version": "0.50.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@rango-dev/queue-manager-rango-preset": "^0.52.1-next.2",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.32.0",
|
|
32
32
|
"@rango-dev/signer-solana": "^0.44.0",
|
|
33
|
-
"@rango-dev/ui": "^0.53.1-next.
|
|
33
|
+
"@rango-dev/ui": "^0.53.1-next.4",
|
|
34
34
|
"@rango-dev/wallets-core": "^0.49.1-next.2",
|
|
35
35
|
"@rango-dev/wallets-react": "^0.36.1-next.2",
|
|
36
36
|
"@rango-dev/wallets-shared": "^0.50.1-next.2",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, darkTheme, styled } from '@rango-dev/ui';
|
|
1
|
+
import { Button, darkTheme, styled, Typography } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const StyledLink = styled('a', {
|
|
4
4
|
textDecoration: 'none',
|
|
@@ -59,3 +59,16 @@ export const Container = styled('div', {
|
|
|
59
59
|
export const StyledButton = styled(Button, {
|
|
60
60
|
minHeight: '$40',
|
|
61
61
|
});
|
|
62
|
+
|
|
63
|
+
export const TokenSymbolText = styled(Typography, {
|
|
64
|
+
overflow: 'hidden',
|
|
65
|
+
textOverflow: 'ellipsis',
|
|
66
|
+
whiteSpace: 'nowrap',
|
|
67
|
+
maxWidth: '96px',
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const FlexCenteredContainer = styled('div', {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
});
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { PropTypes } from './CustomTokenModal.types';
|
|
2
2
|
|
|
3
3
|
import { i18n } from '@lingui/core';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Divider,
|
|
6
|
+
ExternalLinkIcon,
|
|
7
|
+
Image,
|
|
8
|
+
InfoIcon,
|
|
9
|
+
Tooltip,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@rango-dev/ui';
|
|
5
12
|
import React from 'react';
|
|
6
13
|
|
|
7
14
|
import { DEFAULT_TOKEN_IMAGE_SRC } from '../../constants/customTokens';
|
|
@@ -10,8 +17,15 @@ import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
|
10
17
|
|
|
11
18
|
import { CUSTOM_TOKEN_LEARN_MORE_LINK } from './CustomTokenModal.constants';
|
|
12
19
|
import { generateExplorerLink } from './CustomTokenModal.helpers';
|
|
13
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
Container,
|
|
22
|
+
FlexCenteredContainer,
|
|
23
|
+
StyledButton,
|
|
24
|
+
StyledLink,
|
|
25
|
+
TokenSymbolText,
|
|
26
|
+
} from './CustomTokenModal.styles';
|
|
14
27
|
|
|
28
|
+
const MAX_SYMBOL_LENGTH_THRESHOLD = 9;
|
|
15
29
|
export function CustomTokenModal(props: PropTypes) {
|
|
16
30
|
const { open, onClose, token, onExit, onSubmitClick, blockchain } = props;
|
|
17
31
|
|
|
@@ -35,9 +49,17 @@ export function CustomTokenModal(props: PropTypes) {
|
|
|
35
49
|
type="circular"
|
|
36
50
|
/>
|
|
37
51
|
<Divider size={4} />
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
<FlexCenteredContainer>
|
|
53
|
+
<TokenSymbolText variant="title" size="medium">
|
|
54
|
+
{token.symbol}
|
|
55
|
+
</TokenSymbolText>
|
|
56
|
+
{token.symbol.length > MAX_SYMBOL_LENGTH_THRESHOLD && (
|
|
57
|
+
<Tooltip content={token.symbol} container={getContainer()}>
|
|
58
|
+
<InfoIcon size={12} color="gray" />
|
|
59
|
+
</Tooltip>
|
|
60
|
+
)}
|
|
61
|
+
</FlexCenteredContainer>
|
|
62
|
+
|
|
41
63
|
<Typography variant="body" size="small" className="_blockchain-name">
|
|
42
64
|
{blockchain.displayName}
|
|
43
65
|
</Typography>
|
|
@@ -25,12 +25,6 @@ export const quoteSummaryItemStyles = css({
|
|
|
25
25
|
alignItems: 'center',
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
export const tokenAmountStyles = css({
|
|
29
|
-
display: 'flex',
|
|
30
|
-
justifyContent: 'space-between',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
28
|
export const costStyles = css({
|
|
35
29
|
paddingTop: '$15',
|
|
36
30
|
display: 'flex',
|
|
@@ -196,17 +196,6 @@ export const rowStyles = css({
|
|
|
196
196
|
marginLeft: '-$8',
|
|
197
197
|
},
|
|
198
198
|
});
|
|
199
|
-
export const basicInfoStyles = css({
|
|
200
|
-
display: 'flex',
|
|
201
|
-
alignItems: 'center',
|
|
202
|
-
'.usd-value': {
|
|
203
|
-
$$color: '$colors$neutral600',
|
|
204
|
-
[`.${darkTheme} &`]: {
|
|
205
|
-
$$color: '$colors$neutral700',
|
|
206
|
-
},
|
|
207
|
-
color: '$$color',
|
|
208
|
-
},
|
|
209
|
-
});
|
|
210
199
|
|
|
211
200
|
export const Trigger = styled(Collapsible.Trigger, {
|
|
212
201
|
display: 'flex',
|
|
@@ -343,23 +332,28 @@ export const HorizontalSeparator = styled('div', {
|
|
|
343
332
|
borderColor: '$$color',
|
|
344
333
|
});
|
|
345
334
|
|
|
346
|
-
export const
|
|
347
|
-
width: '$16',
|
|
348
|
-
height: '$16',
|
|
349
|
-
justifyContent: 'center',
|
|
350
|
-
alignItems: 'center',
|
|
335
|
+
export const BasicInfoOutput = styled('div', {
|
|
351
336
|
display: 'flex',
|
|
337
|
+
flexDirection: 'row',
|
|
338
|
+
alignItems: 'center',
|
|
339
|
+
gap: '$2',
|
|
340
|
+
flex: '1 1 auto',
|
|
341
|
+
minWidth: 0,
|
|
352
342
|
});
|
|
353
343
|
|
|
354
|
-
export const
|
|
344
|
+
export const TokenNameText = styled(Typography, {
|
|
355
345
|
overflow: 'hidden',
|
|
356
346
|
textOverflow: 'ellipsis',
|
|
357
|
-
|
|
347
|
+
whiteSpace: 'nowrap',
|
|
348
|
+
maxWidth: '$30',
|
|
358
349
|
});
|
|
359
350
|
|
|
360
|
-
export const
|
|
361
|
-
|
|
362
|
-
|
|
351
|
+
export const AmountText = styled(Typography, {
|
|
352
|
+
overflow: 'hidden',
|
|
353
|
+
textOverflow: 'ellipsis',
|
|
354
|
+
whiteSpace: 'nowrap',
|
|
355
|
+
minWidth: 0,
|
|
356
|
+
flex: '0 1 auto',
|
|
363
357
|
});
|
|
364
358
|
|
|
365
359
|
export const MoreStep = styled('div', {
|
|
@@ -396,3 +390,12 @@ export const Line = styled('div', {
|
|
|
396
390
|
borderTopColor: '$neutral800',
|
|
397
391
|
},
|
|
398
392
|
});
|
|
393
|
+
|
|
394
|
+
export const UsdValueText = styled(Typography, {
|
|
395
|
+
overflow: 'hidden',
|
|
396
|
+
textOverflow: 'ellipsis',
|
|
397
|
+
whiteSpace: 'nowrap',
|
|
398
|
+
flex: '0 1 auto',
|
|
399
|
+
minWidth: 0,
|
|
400
|
+
flexShrink: 3,
|
|
401
|
+
});
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
StepDetails,
|
|
14
14
|
TokenAmount,
|
|
15
15
|
Typography,
|
|
16
|
+
useIsTruncated,
|
|
16
17
|
} from '@rango-dev/ui';
|
|
17
18
|
import BigNumber from 'bignumber.js';
|
|
18
19
|
import React, { useRef, useState } from 'react';
|
|
@@ -57,11 +58,9 @@ import { getTotalFeeInUsd, getUsdFeeOfStep } from '../../utils/swap';
|
|
|
57
58
|
|
|
58
59
|
import {
|
|
59
60
|
AllRoutesButton,
|
|
61
|
+
AmountText,
|
|
60
62
|
BasicInfoOutput,
|
|
61
|
-
basicInfoStyles,
|
|
62
|
-
ContainerInfoOutput,
|
|
63
63
|
Content,
|
|
64
|
-
FrameIcon,
|
|
65
64
|
HorizontalSeparator,
|
|
66
65
|
Line,
|
|
67
66
|
QuoteContainer,
|
|
@@ -70,6 +69,8 @@ import {
|
|
|
70
69
|
summaryHeaderStyles,
|
|
71
70
|
summaryStyles,
|
|
72
71
|
TagContainer,
|
|
72
|
+
TokenNameText,
|
|
73
|
+
UsdValueText,
|
|
73
74
|
} from './Quote.styles';
|
|
74
75
|
import { QuoteCostDetails } from './QuoteCostDetails';
|
|
75
76
|
import { QuoteSummary } from './QuoteSummary';
|
|
@@ -97,11 +98,6 @@ export function Quote(props: QuoteProps) {
|
|
|
97
98
|
const userSlippage = customSlippage || slippage;
|
|
98
99
|
const [expanded, setExpanded] = useState(props.expanded);
|
|
99
100
|
const quoteRef = useRef<HTMLButtonElement | null>(null);
|
|
100
|
-
const roundedInput = numberToString(
|
|
101
|
-
input.value,
|
|
102
|
-
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
103
|
-
TOKEN_AMOUNT_MAX_DECIMALS
|
|
104
|
-
);
|
|
105
101
|
const roundedOutput = numberToString(
|
|
106
102
|
output.value,
|
|
107
103
|
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
@@ -241,6 +237,7 @@ export function Quote(props: QuoteProps) {
|
|
|
241
237
|
<Typography
|
|
242
238
|
size="xsmall"
|
|
243
239
|
variant="body"
|
|
240
|
+
className="from-amount-text"
|
|
244
241
|
color="neutral900">
|
|
245
242
|
{i18n.t({
|
|
246
243
|
id: 'Yours: {amount} {symbol}',
|
|
@@ -328,6 +325,15 @@ export function Quote(props: QuoteProps) {
|
|
|
328
325
|
const feeWarning = totalFee.gte(new BigNumber(GAS_FEE_MAX));
|
|
329
326
|
const timeWarning =
|
|
330
327
|
totalDurationSeconds / SECONDS_IN_MINUTE >= ROUTE_TIME_MAX;
|
|
328
|
+
const inputValueRef = useRef<HTMLSpanElement | null>(null);
|
|
329
|
+
const isInputValueTruncated = useIsTruncated(input.value, inputValueRef);
|
|
330
|
+
const outputValueRef = useRef<HTMLSpanElement | null>(null);
|
|
331
|
+
const isOutputValueTruncated = useIsTruncated(output.value, outputValueRef);
|
|
332
|
+
const usdValueRef = useRef<HTMLSpanElement | null>(null);
|
|
333
|
+
const isUsdValueTruncated = useIsTruncated(
|
|
334
|
+
roundedOutputUsdValue,
|
|
335
|
+
usdValueRef
|
|
336
|
+
);
|
|
331
337
|
|
|
332
338
|
const lastStep = steps[numberOfSteps - 1];
|
|
333
339
|
const firstStep = steps[0];
|
|
@@ -428,31 +434,52 @@ export function Quote(props: QuoteProps) {
|
|
|
428
434
|
)}
|
|
429
435
|
</div>
|
|
430
436
|
{type === 'basic' && (
|
|
431
|
-
<
|
|
432
|
-
<
|
|
433
|
-
|
|
434
|
-
</
|
|
435
|
-
|
|
436
|
-
<
|
|
437
|
-
{
|
|
438
|
-
|
|
437
|
+
<BasicInfoOutput>
|
|
438
|
+
<AmountText ref={inputValueRef} size="small" variant="body">
|
|
439
|
+
{input.value}
|
|
440
|
+
</AmountText>
|
|
441
|
+
{isInputValueTruncated && (
|
|
442
|
+
<NumericTooltip
|
|
443
|
+
content={input.value}
|
|
444
|
+
container={container}
|
|
445
|
+
open={!input.value ? false : undefined}>
|
|
446
|
+
<InfoIcon size={12} color="gray" />
|
|
447
|
+
</NumericTooltip>
|
|
448
|
+
)}
|
|
449
|
+
<TokenNameText size="small" variant="body">
|
|
450
|
+
{steps[0]?.from.token.displayName}
|
|
451
|
+
</TokenNameText>
|
|
452
|
+
<Typography size="small" variant="body">
|
|
453
|
+
=
|
|
454
|
+
</Typography>
|
|
455
|
+
<AmountText ref={outputValueRef} size="small" variant="body">
|
|
456
|
+
{output.value}
|
|
457
|
+
</AmountText>
|
|
458
|
+
{isOutputValueTruncated && (
|
|
439
459
|
<NumericTooltip
|
|
440
460
|
content={output.value}
|
|
441
461
|
container={container}
|
|
442
462
|
open={!output.value ? false : undefined}>
|
|
443
|
-
<
|
|
444
|
-
|
|
445
|
-
{`${roundedOutput} ${lastStep.to.token.displayName}`}
|
|
446
|
-
</BasicInfoOutput>
|
|
463
|
+
<InfoIcon size={12} color="gray" />
|
|
447
464
|
</NumericTooltip>
|
|
448
|
-
|
|
449
|
-
<
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
465
|
+
)}
|
|
466
|
+
<TokenNameText size="small" variant="body">
|
|
467
|
+
{lastStep?.to.token.displayName}
|
|
468
|
+
</TokenNameText>
|
|
469
|
+
<Divider size={2} direction="horizontal" />
|
|
470
|
+
<UsdValueText
|
|
471
|
+
ref={usdValueRef}
|
|
472
|
+
color="$neutral600"
|
|
473
|
+
size="xsmall"
|
|
474
|
+
variant="body">
|
|
475
|
+
{`($${roundedOutputUsdValue})`}
|
|
476
|
+
</UsdValueText>
|
|
477
|
+
{isUsdValueTruncated && (
|
|
478
|
+
<NumericTooltip content={output.usdValue} container={container}>
|
|
479
|
+
<InfoIcon size={12} color="gray" />
|
|
480
|
+
</NumericTooltip>
|
|
481
|
+
)}
|
|
482
|
+
</BasicInfoOutput>
|
|
456
483
|
)}
|
|
457
484
|
{type === 'list-item' && (
|
|
458
485
|
<TokenAmount
|
|
@@ -16,8 +16,6 @@ import {
|
|
|
16
16
|
GAS_FEE_MIN_DECIMALS,
|
|
17
17
|
PERCENTAGE_CHANGE_MAX_DECIMALS,
|
|
18
18
|
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
19
|
-
USD_VALUE_MAX_DECIMALS,
|
|
20
|
-
USD_VALUE_MIN_DECIMALS,
|
|
21
19
|
} from '../../constants/routing';
|
|
22
20
|
import { getContainer } from '../../utils/common';
|
|
23
21
|
import { numberToString } from '../../utils/numbers';
|
|
@@ -41,11 +39,7 @@ export function HighValueLossWarningModal(props: Props) {
|
|
|
41
39
|
const highValueLossData = [
|
|
42
40
|
{
|
|
43
41
|
title: i18n.t('Swapping'),
|
|
44
|
-
value: numberToString(
|
|
45
|
-
warning.inputUsdValue,
|
|
46
|
-
USD_VALUE_MIN_DECIMALS,
|
|
47
|
-
USD_VALUE_MAX_DECIMALS
|
|
48
|
-
),
|
|
42
|
+
value: numberToString(warning.inputUsdValue),
|
|
49
43
|
},
|
|
50
44
|
{
|
|
51
45
|
title: i18n.t('Gas cost'),
|
|
@@ -57,11 +51,7 @@ export function HighValueLossWarningModal(props: Props) {
|
|
|
57
51
|
},
|
|
58
52
|
{
|
|
59
53
|
title: i18n.t('Receiving'),
|
|
60
|
-
value: numberToString(
|
|
61
|
-
warning.outputUsdValue,
|
|
62
|
-
USD_VALUE_MIN_DECIMALS,
|
|
63
|
-
USD_VALUE_MAX_DECIMALS
|
|
64
|
-
),
|
|
54
|
+
value: numberToString(warning.outputUsdValue),
|
|
65
55
|
},
|
|
66
56
|
{
|
|
67
57
|
title: i18n.t('Price impact'),
|
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
import type { ModalContentData } from './QuoteWarningsAndErrors.types';
|
|
2
2
|
|
|
3
|
-
import { Typography } from '@rango-dev/ui';
|
|
3
|
+
import { InfoIcon, Tooltip, Typography } from '@rango-dev/ui';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { getContainer } from '../../utils/common';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Item,
|
|
10
|
+
ValueContent,
|
|
11
|
+
ValueTypography,
|
|
12
|
+
} from './QuoteWarningsAndErrors.styles';
|
|
13
|
+
|
|
14
|
+
const VALUE_LENGTH_THRESHOLD = 35;
|
|
7
15
|
|
|
8
16
|
export function QuoteErrorsModalItem(props: ModalContentData) {
|
|
9
17
|
const { title, value, valueColor } = props;
|
|
18
|
+
const container = getContainer();
|
|
10
19
|
|
|
11
20
|
return (
|
|
12
21
|
<Item>
|
|
13
22
|
<Typography size="medium" variant="label" className="_title">
|
|
14
23
|
{title}
|
|
15
24
|
</Typography>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
<ValueContent>
|
|
26
|
+
<ValueTypography
|
|
27
|
+
size="large"
|
|
28
|
+
variant="label"
|
|
29
|
+
color={valueColor || 'foreground'}>
|
|
30
|
+
{`${valueColor ? '%' : '$'}${value}`}
|
|
31
|
+
</ValueTypography>
|
|
32
|
+
{value.length > VALUE_LENGTH_THRESHOLD && (
|
|
33
|
+
<Tooltip content={value} container={container}>
|
|
34
|
+
<InfoIcon size={12} color="gray" />
|
|
35
|
+
</Tooltip>
|
|
36
|
+
)}
|
|
37
|
+
</ValueContent>
|
|
22
38
|
</Item>
|
|
23
39
|
);
|
|
24
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, darkTheme, styled } from '@rango-dev/ui';
|
|
1
|
+
import { Button, darkTheme, styled, Typography } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Alerts = styled('div', {
|
|
4
4
|
width: '100%',
|
|
@@ -27,6 +27,20 @@ export const Item = styled('div', {
|
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
export const ValueContent = styled('div', {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
gap: '$2',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const ValueTypography = styled(Typography, {
|
|
38
|
+
overflow: 'hidden',
|
|
39
|
+
textOverflow: 'ellipsis',
|
|
40
|
+
whiteSpace: 'nowrap',
|
|
41
|
+
maxWidth: '250px',
|
|
42
|
+
});
|
|
43
|
+
|
|
30
44
|
export const Action = styled('div', {
|
|
31
45
|
padding: '$2',
|
|
32
46
|
alignSelf: 'flex-start',
|
|
@@ -20,7 +20,7 @@ import { useUiStore } from '../../store/ui';
|
|
|
20
20
|
import { getContainer } from '../../utils/common';
|
|
21
21
|
import { WatermarkedModal } from '../common/WatermarkedModal';
|
|
22
22
|
|
|
23
|
-
import { ProfileBanner } from './SwapDetailsModal.styles';
|
|
23
|
+
import { ProfileBanner, wordWrap } from './SwapDetailsModal.styles';
|
|
24
24
|
|
|
25
25
|
export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
|
|
26
26
|
const {
|
|
@@ -68,6 +68,7 @@ export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
|
|
|
68
68
|
/>
|
|
69
69
|
<Divider size={12} />
|
|
70
70
|
<Typography
|
|
71
|
+
className={wordWrap()}
|
|
71
72
|
variant="body"
|
|
72
73
|
size="medium"
|
|
73
74
|
color="neutral700"
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { darkTheme, styled } from '@rango-dev/ui';
|
|
1
|
+
import { css, darkTheme, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export const TooltipErrorContent = styled('div', {
|
|
9
|
-
maxWidth: 280,
|
|
10
|
-
'& ._typography': {
|
|
11
|
-
wordWrap: 'break-word',
|
|
12
|
-
display: 'block',
|
|
13
|
-
},
|
|
3
|
+
export const wordWrap = css({
|
|
4
|
+
wordWrap: 'break-word',
|
|
5
|
+
display: 'block',
|
|
14
6
|
});
|
|
15
7
|
|
|
16
8
|
export const ProfileBanner = styled('img', {
|
|
@@ -82,7 +82,6 @@ export function DerivationPath(props: PropTypes) {
|
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
84
|
<>
|
|
85
|
-
<Divider size={20} />
|
|
86
85
|
<MessageBox
|
|
87
86
|
type="info"
|
|
88
87
|
title={i18n.t('Select Derivation Path')}
|
|
@@ -95,8 +94,12 @@ export function DerivationPath(props: PropTypes) {
|
|
|
95
94
|
icon={<Image src={image} size={45} />}
|
|
96
95
|
/>
|
|
97
96
|
|
|
98
|
-
<InputsContainer>
|
|
99
|
-
<InputLabel
|
|
97
|
+
<InputsContainer className="_derivation_path_inputs_container">
|
|
98
|
+
<InputLabel
|
|
99
|
+
variant="body"
|
|
100
|
+
size="xsmall"
|
|
101
|
+
color="$neutral600"
|
|
102
|
+
className="_derivation_path_input_label">
|
|
100
103
|
{i18n.t('Choose Derivation Path Template')}
|
|
101
104
|
</InputLabel>
|
|
102
105
|
<Select
|
|
@@ -111,7 +114,11 @@ export function DerivationPath(props: PropTypes) {
|
|
|
111
114
|
styles={{ trigger: derivationPathInputStyles }}
|
|
112
115
|
/>
|
|
113
116
|
<Divider size={20} />
|
|
114
|
-
<InputLabel
|
|
117
|
+
<InputLabel
|
|
118
|
+
variant="body"
|
|
119
|
+
size="xsmall"
|
|
120
|
+
color="$neutral600"
|
|
121
|
+
className="_derivation_path_input_label">
|
|
115
122
|
{isCustomOptionSelected
|
|
116
123
|
? i18n.t('Enter Path')
|
|
117
124
|
: i18n.t('Enter Index')}
|