@rango-dev/widget-embedded 0.50.1-next.4 → 0.50.1-next.6

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 (51) hide show
  1. package/dist/components/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
  2. package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts +322 -0
  3. package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts.map +1 -1
  4. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +0 -160
  5. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
  6. package/dist/components/NamespaceItem/NamespaceItem.styles.d.ts +4 -2
  7. package/dist/components/NamespaceItem/NamespaceItem.styles.d.ts.map +1 -1
  8. package/dist/components/Quote/Quote.d.ts.map +1 -1
  9. package/dist/components/Quote/Quote.styles.d.ts +31 -26
  10. package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
  11. package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -1
  12. package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts.map +1 -1
  13. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts +322 -0
  14. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
  15. package/dist/components/SwapDetails/SwapDetails.styles.d.ts +3 -2
  16. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  17. package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
  18. package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +1 -161
  19. package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
  20. package/dist/components/SwapMetrics/SwapMetrics.styles.d.ts +3 -2
  21. package/dist/components/SwapMetrics/SwapMetrics.styles.d.ts.map +1 -1
  22. package/dist/components/TokenList/TokenList.styles.d.ts +7 -3
  23. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  24. package/dist/components/WalletStatefulConnect/ConnectStatus.d.ts.map +1 -1
  25. package/dist/components/WalletStatefulConnect/ConnectStatus.styles.d.ts +0 -160
  26. package/dist/components/WalletStatefulConnect/ConnectStatus.styles.d.ts.map +1 -1
  27. package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts +3 -2
  28. package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts.map +1 -1
  29. package/dist/components/WalletStatefulConnect/Detached.d.ts.map +1 -1
  30. package/dist/components/WalletStatefulConnect/Namespaces.d.ts.map +1 -1
  31. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
  32. package/dist/index.js +2 -2
  33. package/dist/index.js.map +3 -3
  34. package/dist/widget-embedded.build.json +1 -1
  35. package/package.json +7 -7
  36. package/src/components/CustomTokenModal/CustomTokenModal.styles.ts +14 -1
  37. package/src/components/CustomTokenModal/CustomTokenModal.tsx +27 -5
  38. package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +0 -6
  39. package/src/components/Quote/Quote.styles.ts +24 -21
  40. package/src/components/Quote/Quote.tsx +55 -28
  41. package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +2 -12
  42. package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +24 -8
  43. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +15 -1
  44. package/src/components/SwapDetails/SwapDetails.styles.ts +1 -0
  45. package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +2 -1
  46. package/src/components/SwapDetailsModal/SwapDetailsModal.styles.ts +4 -12
  47. package/src/components/WalletStatefulConnect/ConnectStatus.styles.ts +0 -6
  48. package/src/components/WalletStatefulConnect/ConnectStatus.tsx +7 -6
  49. package/src/components/WalletStatefulConnect/Detached.tsx +13 -2
  50. package/src/components/WalletStatefulConnect/Namespaces.tsx +6 -1
  51. 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.4",
3
+ "version": "0.50.1-next.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,15 +25,15 @@
25
25
  "@lingui/core": "4.2.1",
26
26
  "@lingui/react": "4.2.1",
27
27
  "@rango-dev/logging-core": "^0.11.0",
28
- "@rango-dev/provider-all": "^0.52.1-next.3",
28
+ "@rango-dev/provider-all": "^0.52.1-next.4",
29
29
  "@rango-dev/queue-manager-core": "^0.32.0",
30
- "@rango-dev/queue-manager-rango-preset": "^0.52.1-next.2",
30
+ "@rango-dev/queue-manager-rango-preset": "^0.52.1-next.3",
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.3",
34
- "@rango-dev/wallets-core": "^0.49.1-next.2",
35
- "@rango-dev/wallets-react": "^0.36.1-next.2",
36
- "@rango-dev/wallets-shared": "^0.50.1-next.2",
33
+ "@rango-dev/ui": "^0.53.1-next.5",
34
+ "@rango-dev/wallets-core": "^0.49.1-next.3",
35
+ "@rango-dev/wallets-react": "^0.36.1-next.3",
36
+ "@rango-dev/wallets-shared": "^0.50.1-next.3",
37
37
  "bignumber.js": "^9.1.1",
38
38
  "copy-to-clipboard": "^3.3.3",
39
39
  "dayjs": "^1.11.7",
@@ -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 { Divider, ExternalLinkIcon, Image, Typography } from '@rango-dev/ui';
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 { Container, StyledButton, StyledLink } from './CustomTokenModal.styles';
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
- <Typography variant="title" size="medium">
39
- {token.symbol}
40
- </Typography>
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 FrameIcon = styled('div', {
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 BasicInfoOutput = styled(Typography, {
344
+ export const TokenNameText = styled(Typography, {
355
345
  overflow: 'hidden',
356
346
  textOverflow: 'ellipsis',
357
- letterSpacing: 0.4,
347
+ whiteSpace: 'nowrap',
348
+ maxWidth: '$30',
358
349
  });
359
350
 
360
- export const ContainerInfoOutput = styled('div', {
361
- display: 'flex',
362
- flexWrap: 'wrap',
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
- <div className={basicInfoStyles()}>
432
- <FrameIcon>
433
- <InfoIcon size={12} color="gray" />
434
- </FrameIcon>
435
- <ContainerInfoOutput>
436
- <BasicInfoOutput size="small" variant="body">
437
- {`${roundedInput} ${firstStep.from.token.displayName} = `}
438
- </BasicInfoOutput>
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
- <BasicInfoOutput size="small" variant="body">
444
- &nbsp;
445
- {`${roundedOutput} ${lastStep.to.token.displayName}`}
446
- </BasicInfoOutput>
463
+ <InfoIcon size={12} color="gray" />
447
464
  </NumericTooltip>
448
- </ContainerInfoOutput>
449
- <NumericTooltip content={output.usdValue} container={container}>
450
- <Divider size={2} direction="horizontal" />
451
- <Typography color="$neutral600" size="xsmall" variant="body">
452
- {`($${roundedOutputUsdValue})`}
453
- </Typography>
454
- </NumericTooltip>
455
- </div>
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 { Item } from './QuoteWarningsAndErrors.styles';
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
- <Typography
17
- size="large"
18
- variant="label"
19
- color={valueColor || 'foreground'}>
20
- {`${valueColor ? '%' : '$'}${value}`}
21
- </Typography>
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',
@@ -109,6 +109,7 @@ export const ErrorMessages = styled('div', {
109
109
  flexDirection: 'column',
110
110
  gap: '$5',
111
111
  });
112
+
112
113
  export const MessageText = styled(Typography, {
113
114
  wordBreak: 'break-word',
114
115
  });
@@ -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 WalletContainer = styled('div', {
4
- display: 'flex',
5
- justifyContent: 'center',
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', {
@@ -36,9 +36,3 @@ export const Spinner = styled('div', {
36
36
  right: 0,
37
37
  left: 0,
38
38
  });
39
-
40
- export const WalletImageContainer = styled('div', {
41
- '& img': {
42
- borderRadius: '50%',
43
- },
44
- });
@@ -1,17 +1,18 @@
1
1
  import type { ConnectStatusProps } from './ConnectStatus.types';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import { Image, MessageBox, WalletState } from '@rango-dev/ui';
4
+ import {
5
+ Image,
6
+ MessageBox,
7
+ WalletImageContainer,
8
+ WalletState,
9
+ } from '@rango-dev/ui';
5
10
  import { useWallets } from '@rango-dev/wallets-react';
6
11
  import React from 'react';
7
12
 
8
13
  import { mapStatusToWalletState } from '../../utils/wallets';
9
14
 
10
- import {
11
- LogoContainer,
12
- Spinner,
13
- WalletImageContainer,
14
- } from './ConnectStatus.styles';
15
+ import { LogoContainer, Spinner } from './ConnectStatus.styles';
15
16
 
16
17
  export function ConnectStatus(props: ConnectStatusProps) {
17
18
  // See `wallet` notes on its type definition
@@ -3,7 +3,14 @@ import type { LegacyNamespaceMeta } from '@rango-dev/wallets-core/legacy';
3
3
  import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
4
4
 
5
5
  import { i18n } from '@lingui/core';
6
- import { Alert, Button, Divider, Image, MessageBox } from '@rango-dev/ui';
6
+ import {
7
+ Alert,
8
+ Button,
9
+ Divider,
10
+ Image,
11
+ MessageBox,
12
+ WalletImageContainer,
13
+ } from '@rango-dev/ui';
7
14
  import { useWallets } from '@rango-dev/wallets-react';
8
15
  import React from 'react';
9
16
 
@@ -146,7 +153,11 @@ export function Detached(props: PropTypes) {
146
153
  description={i18n.t(
147
154
  'This wallet supports multiple chains. Choose which chains you’d like to connect or disconnect.'
148
155
  )}
149
- icon={<Image src={targetWallet.image} size={45} />}
156
+ icon={
157
+ <WalletImageContainer>
158
+ <Image src={targetWallet.image} size={45} />
159
+ </WalletImageContainer>
160
+ }
150
161
  />
151
162
  {renderNamespaceListHeader()}
152
163
  <NamespaceList id="widget-detached-namespace-list">
@@ -9,6 +9,7 @@ import {
9
9
  Image,
10
10
  MessageBox,
11
11
  RadioRoot,
12
+ WalletImageContainer,
12
13
  } from '@rango-dev/ui';
13
14
  import React, { useEffect, useMemo, useState } from 'react';
14
15
 
@@ -111,7 +112,11 @@ export function Namespaces(props: PropTypes) {
111
112
  description={i18n.t(
112
113
  'This wallet supports multiple chains. Choose which chains you’d like to connect.'
113
114
  )}
114
- icon={<Image src={providerImage} size={45} />}
115
+ icon={
116
+ <WalletImageContainer>
117
+ <Image src={providerImage} size={45} />
118
+ </WalletImageContainer>
119
+ }
115
120
  />
116
121
  {singleNamespace ? (
117
122
  <>
@@ -8,6 +8,9 @@ export const QuoteContainer = styled('div', {
8
8
  });
9
9
  export const FooterStepAlarm = styled('div', {
10
10
  paddingBottom: '$15',
11
+ '& .from-amount-text': {
12
+ wordBreak: 'break-word',
13
+ },
11
14
  variants: {
12
15
  dense: {
13
16
  true: {