@rango-dev/widget-embedded 0.41.2-next.14 → 0.41.2-next.16

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 (40) hide show
  1. package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
  2. package/dist/components/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
  3. package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts +440 -0
  4. package/dist/components/CustomTokenModal/CustomTokenModal.styles.d.ts.map +1 -1
  5. package/dist/components/Layout/Layout.constants.d.ts +4 -0
  6. package/dist/components/Layout/Layout.constants.d.ts.map +1 -0
  7. package/dist/components/Layout/Layout.d.ts.map +1 -1
  8. package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
  9. package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
  10. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  11. package/dist/components/SwapDetails/SwapDetails.styles.d.ts +167 -4
  12. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  13. package/dist/components/WalletStatefulConnect/DerivationPath.d.ts.map +1 -1
  14. package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts +440 -0
  15. package/dist/components/WalletStatefulConnect/DerivationPath.styles.d.ts.map +1 -1
  16. package/dist/components/WalletStatefulConnect/Namespaces.styles.d.ts +440 -0
  17. package/dist/components/WalletStatefulConnect/Namespaces.styles.d.ts.map +1 -1
  18. package/dist/constants/configs.d.ts +1 -0
  19. package/dist/constants/configs.d.ts.map +1 -1
  20. package/dist/index.js +2 -2
  21. package/dist/index.js.map +4 -4
  22. package/dist/store/ui.d.ts +4 -0
  23. package/dist/store/ui.d.ts.map +1 -1
  24. package/dist/widget-embedded.build.json +1 -1
  25. package/package.json +8 -8
  26. package/src/components/BlockchainsSection/BlockchainsSection.tsx +26 -10
  27. package/src/components/CustomTokenModal/CustomTokenModal.styles.ts +5 -1
  28. package/src/components/CustomTokenModal/CustomTokenModal.tsx +6 -12
  29. package/src/components/Layout/Layout.constants.ts +3 -0
  30. package/src/components/Layout/Layout.styles.ts +7 -3
  31. package/src/components/Layout/Layout.tsx +39 -2
  32. package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +25 -28
  33. package/src/components/SwapDetails/SwapDetails.styles.ts +18 -10
  34. package/src/components/SwapDetails/SwapDetails.tsx +54 -55
  35. package/src/components/WalletStatefulConnect/DerivationPath.styles.ts +5 -1
  36. package/src/components/WalletStatefulConnect/DerivationPath.tsx +4 -10
  37. package/src/components/WalletStatefulConnect/Namespaces.styles.ts +5 -1
  38. package/src/components/WalletStatefulConnect/Namespaces.tsx +3 -3
  39. package/src/constants/configs.ts +1 -0
  40. package/src/store/ui.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.41.2-next.14",
3
+ "version": "0.41.2-next.16",
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.8.0",
28
- "@rango-dev/provider-all": "^0.44.1-next.6",
28
+ "@rango-dev/provider-all": "^0.44.1-next.7",
29
29
  "@rango-dev/queue-manager-core": "^0.29.0",
30
- "@rango-dev/queue-manager-rango-preset": "^0.44.1-next.6",
30
+ "@rango-dev/queue-manager-rango-preset": "^0.44.1-next.7",
31
31
  "@rango-dev/queue-manager-react": "^0.29.0",
32
32
  "@rango-dev/signer-solana": "^0.38.1-next.1",
33
- "@rango-dev/ui": "^0.45.1-next.9",
34
- "@rango-dev/wallets-core": "^0.42.1-next.5",
35
- "@rango-dev/wallets-react": "^0.29.1-next.6",
36
- "@rango-dev/wallets-shared": "^0.43.1-next.5",
33
+ "@rango-dev/ui": "^0.45.1-next.10",
34
+ "@rango-dev/wallets-core": "^0.42.1-next.6",
35
+ "@rango-dev/wallets-react": "^0.29.1-next.7",
36
+ "@rango-dev/wallets-shared": "^0.43.1-next.6",
37
37
  "bignumber.js": "^9.1.1",
38
38
  "copy-to-clipboard": "^3.3.3",
39
39
  "dayjs": "^1.11.7",
@@ -54,4 +54,4 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  }
57
- }
57
+ }
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-magic-numbers */
2
1
  import type { PropTypes } from './BlockchainsSection.types';
3
2
 
4
3
  import { i18n } from '@lingui/core';
@@ -12,20 +11,28 @@ import {
12
11
  } from '@rango-dev/ui';
13
12
  import React from 'react';
14
13
 
15
- import { BLOCKCHAIN_LIST_SIZE } from '../../constants/configs';
14
+ import {
15
+ BLOCKCHAIN_LIST_SIZE,
16
+ BLOCKCHAIN_LIST_SIZE_COMPACT_MODE,
17
+ } from '../../constants/configs';
16
18
  import { usePrepareBlockchainList } from '../../hooks/usePrepareBlockchainList';
17
19
  import { useAppStore } from '../../store/AppStore';
18
20
  import { useQuoteStore } from '../../store/quote';
21
+ import { useUiStore } from '../../store/ui';
19
22
  import { getContainer } from '../../utils/common';
20
23
 
21
24
  import { Blockchains } from './BlockchainsSection.styles';
22
25
 
26
+ const NUMBER_OF_LOADING_COMPACT_MODE = 6;
23
27
  const NUMBER_OF_LOADING = 12;
24
28
 
25
29
  export function BlockchainsSection(props: PropTypes) {
26
30
  const { blockchains, type, blockchain, onChange, onMoreClick } = props;
31
+ const { showCompactTokenSelector } = useUiStore();
27
32
  const blockchainsList = usePrepareBlockchainList(blockchains, {
28
- limit: BLOCKCHAIN_LIST_SIZE,
33
+ limit: showCompactTokenSelector
34
+ ? BLOCKCHAIN_LIST_SIZE_COMPACT_MODE
35
+ : BLOCKCHAIN_LIST_SIZE,
29
36
  selected: blockchain?.name,
30
37
  });
31
38
 
@@ -41,16 +48,25 @@ export function BlockchainsSection(props: PropTypes) {
41
48
 
42
49
  return (
43
50
  <>
44
- <Divider size={12} />
45
- <Typography variant="label" size="large">
46
- {i18n.t('Select Chain')}
47
- </Typography>
51
+ {!showCompactTokenSelector && (
52
+ <>
53
+ <Divider size={12} />
54
+ <Typography variant="label" size="large">
55
+ {i18n.t('Select Chain')}
56
+ </Typography>
57
+ </>
58
+ )}
48
59
  <Divider size={12} />
49
60
  <Blockchains>
50
61
  {fetchStatus === 'loading' &&
51
- Array.from(Array(NUMBER_OF_LOADING), (e) => (
52
- <Skeleton key={e} variant="rounded" height={50} />
53
- ))}
62
+ Array.from(
63
+ Array(
64
+ showCompactTokenSelector
65
+ ? NUMBER_OF_LOADING_COMPACT_MODE
66
+ : NUMBER_OF_LOADING
67
+ ),
68
+ (_, index) => <Skeleton key={index} variant="rounded" height={50} />
69
+ )}
54
70
  {fetchStatus === 'success' && (
55
71
  <>
56
72
  <BlockchainsChip
@@ -1,4 +1,4 @@
1
- import { darkTheme, styled } from '@rango-dev/ui';
1
+ import { Button, darkTheme, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const StyledLink = styled('a', {
4
4
  textDecoration: 'none',
@@ -55,3 +55,7 @@ export const Container = styled('div', {
55
55
  },
56
56
  },
57
57
  });
58
+
59
+ export const StyledButton = styled(Button, {
60
+ minHeight: '$40',
61
+ });
@@ -1,13 +1,7 @@
1
1
  import type { PropTypes } from './CustomTokenModal.types';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import {
5
- Button,
6
- Divider,
7
- ExternalLinkIcon,
8
- Image,
9
- Typography,
10
- } from '@rango-dev/ui';
4
+ import { Divider, ExternalLinkIcon, Image, Typography } from '@rango-dev/ui';
11
5
  import React from 'react';
12
6
 
13
7
  import { DEFAULT_TOKEN_IMAGE_SRC } from '../../constants/customTokens';
@@ -16,7 +10,7 @@ import { WatermarkedModal } from '../common/WatermarkedModal';
16
10
 
17
11
  import { CUSTOM_TOKEN_LEARN_MORE_LINK } from './CustomTokenModal.constants';
18
12
  import { generateExplorerLink } from './CustomTokenModal.helpers';
19
- import { Container, StyledLink } from './CustomTokenModal.styles';
13
+ import { Container, StyledButton, StyledLink } from './CustomTokenModal.styles';
20
14
 
21
15
  export function CustomTokenModal(props: PropTypes) {
22
16
  const { open, onClose, token, onExit, onSubmitClick, blockchain } = props;
@@ -90,7 +84,7 @@ export function CustomTokenModal(props: PropTypes) {
90
84
  <Divider size={40} />
91
85
  <Divider size={10} />
92
86
 
93
- <Button
87
+ <StyledButton
94
88
  id="widget-custom-token-modal-import-btn"
95
89
  variant="contained"
96
90
  size="large"
@@ -98,9 +92,9 @@ export function CustomTokenModal(props: PropTypes) {
98
92
  fullWidth
99
93
  onClick={onSubmitClick}>
100
94
  {i18n.t('Import Anyway')}
101
- </Button>
95
+ </StyledButton>
102
96
  <Divider size={10} />
103
- <Button
97
+ <StyledButton
104
98
  id="widget-custom-token-modal-learn-more-btn"
105
99
  variant="outlined"
106
100
  size="large"
@@ -108,7 +102,7 @@ export function CustomTokenModal(props: PropTypes) {
108
102
  fullWidth
109
103
  onClick={onClickLearnMore}>
110
104
  {i18n.t('Learn More')}
111
- </Button>
105
+ </StyledButton>
112
106
  </WatermarkedModal>
113
107
  );
114
108
  }
@@ -0,0 +1,3 @@
1
+ export const WIDGET_MAX_HEIGHT = 700;
2
+ export const WIDGET_MIN_HEIGHT = 425;
3
+ export const COMPACT_TOKEN_SELECTOR_THRESHOLD = 640;
@@ -1,6 +1,6 @@
1
1
  import { css, styled } from '@rango-dev/ui';
2
2
 
3
- const WIDGET_HEIGHT = '700px';
3
+ import { WIDGET_MAX_HEIGHT, WIDGET_MIN_HEIGHT } from './Layout.constants';
4
4
 
5
5
  export const LayoutContainer = css({
6
6
  borderRadius: '$primary',
@@ -20,10 +20,14 @@ export const Container = styled('div', {
20
20
  height: {
21
21
  auto: {
22
22
  height: 'auto',
23
- maxHeight: WIDGET_HEIGHT,
23
+ maxHeight: WIDGET_MAX_HEIGHT,
24
24
  },
25
25
  fixed: {
26
- height: WIDGET_HEIGHT,
26
+ minHeight: WIDGET_MIN_HEIGHT,
27
+ maxHeight: WIDGET_MAX_HEIGHT,
28
+ '@sm': {
29
+ height: WIDGET_MAX_HEIGHT,
30
+ },
27
31
  },
28
32
  },
29
33
  showBanner: {
@@ -4,12 +4,13 @@ import type { PropsWithChildren } from 'react';
4
4
 
5
5
  import { useManager } from '@rango-dev/queue-manager-react';
6
6
  import { BottomLogo, Divider, Header } from '@rango-dev/ui';
7
- import React, { useEffect, useRef, useState } from 'react';
7
+ import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
8
8
 
9
9
  import { WIDGET_UI_ID } from '../../constants';
10
10
  import { useIframe } from '../../hooks/useIframe';
11
11
  import { isAppLoadedIntoIframe } from '../../hooks/useIframe/useIframe.helpers';
12
12
  import { useNavigateBack } from '../../hooks/useNavigateBack';
13
+ import useScreenDetect from '../../hooks/useScreenDetect';
13
14
  import { useTheme } from '../../hooks/useTheme';
14
15
  import { useAppStore } from '../../store/AppStore';
15
16
  import { tabManager, useUiStore } from '../../store/ui';
@@ -21,6 +22,10 @@ import { ActivateTabModal } from '../common/ActivateTabModal';
21
22
  import { BackButton, CancelButton, WalletButton } from '../HeaderButtons';
22
23
  import { RefreshModal } from '../RefreshModal';
23
24
 
25
+ import {
26
+ COMPACT_TOKEN_SELECTOR_THRESHOLD,
27
+ WIDGET_MAX_HEIGHT,
28
+ } from './Layout.constants';
24
29
  import { onScrollContentAttachStatusToContainer } from './Layout.helpers';
25
30
  import {
26
31
  BannerContainer,
@@ -42,7 +47,7 @@ function Layout(props: PropsWithChildren<PropTypes>) {
42
47
  const {
43
48
  config: { features, theme },
44
49
  } = useAppStore();
45
- const { watermark } = useUiStore();
50
+ const { watermark, setShowCompactTokenSelector } = useUiStore();
46
51
 
47
52
  const hasWatermark = watermark === 'FULL';
48
53
  const { activeTheme } = useTheme(theme || {});
@@ -62,6 +67,7 @@ function Layout(props: PropsWithChildren<PropTypes>) {
62
67
  } = useUiStore();
63
68
  const navigateBack = useNavigateBack();
64
69
  const { manager } = useManager();
70
+ const { isTablet, isMobile } = useScreenDetect();
65
71
  const pendingSwaps: PendingSwap[] = getPendingSwaps(manager).map(
66
72
  ({ swap }) => swap
67
73
  );
@@ -127,6 +133,37 @@ function Layout(props: PropsWithChildren<PropTypes>) {
127
133
  setOpenRefreshModal(fetchStatus === 'failed');
128
134
  }, [fetchStatus]);
129
135
 
136
+ useLayoutEffect(() => {
137
+ const isFixedHeight =
138
+ height === 'auto' || !containerRef.current || isAppLoadedIntoIframe();
139
+ const isSmallScreen = isMobile || isTablet;
140
+
141
+ const handler = () => {
142
+ if (isFixedHeight) {
143
+ return;
144
+ }
145
+
146
+ if (isSmallScreen) {
147
+ containerRef.current.style.height = `${
148
+ window.innerHeight - containerRef.current.offsetTop
149
+ }px`;
150
+ } else {
151
+ containerRef.current.style.height = `${WIDGET_MAX_HEIGHT}px`;
152
+ }
153
+
154
+ setShowCompactTokenSelector(
155
+ parseFloat(containerRef.current.style.height) <
156
+ COMPACT_TOKEN_SELECTOR_THRESHOLD
157
+ );
158
+ };
159
+
160
+ handler();
161
+
162
+ window.addEventListener('resize', handler);
163
+
164
+ return () => window.removeEventListener('resize', handler);
165
+ }, [height, isMobile, isTablet]);
166
+
130
167
  return (
131
168
  <Container
132
169
  height={height}
@@ -9,12 +9,11 @@ import { Layout } from '../Layout';
9
9
  import { LoadingSwapDetails } from '../LoadingSwapDetails';
10
10
 
11
11
  import {
12
- Container,
13
12
  datePlaceholderStyles,
14
- HeaderDetails,
15
13
  PlaceholderContainer,
16
14
  requestIdStyles,
17
15
  rowStyles,
16
+ SkeletonContainer,
18
17
  } from './SwapDetails.styles';
19
18
 
20
19
  export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
@@ -26,37 +25,35 @@ export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
26
25
  suffix: <SuffixContainer />,
27
26
  }}>
28
27
  {showSkeleton && (
29
- <Container>
30
- <HeaderDetails>
31
- <div className={rowStyles()}>
32
- <Typography variant="label" size="large" color="neutral700">
33
- {`${i18n.t('Request ID')}`}
34
- </Typography>
35
- <div className={requestIdStyles()}>
36
- <Typography variant="label" size="small" color="neutral700">
37
- <Skeleton width={60} height={10} variant="rounded" />
38
- </Typography>
39
- <Divider direction="horizontal" size={4} />
40
- <Skeleton width={16} height={16} variant="rectangular" />
41
- <Divider direction="horizontal" size={4} />
42
- <Skeleton width={16} height={16} variant="rectangular" />
43
- </div>
44
- </div>
45
- <div className={rowStyles()}>
46
- <Typography
47
- className={datePlaceholderStyles()}
48
- variant="label"
49
- size="large"
50
- color="neutral700">
51
- <Skeleton width={60} height={10} variant="rounded" />
52
- </Typography>
28
+ <SkeletonContainer>
29
+ <div className={rowStyles()}>
30
+ <Typography variant="label" size="large" color="neutral700">
31
+ {`${i18n.t('Request ID')}`}
32
+ </Typography>
33
+ <div className={requestIdStyles()}>
53
34
  <Typography variant="label" size="small" color="neutral700">
54
35
  <Skeleton width={60} height={10} variant="rounded" />
55
36
  </Typography>
37
+ <Divider direction="horizontal" size={4} />
38
+ <Skeleton width={16} height={16} variant="rectangular" />
39
+ <Divider direction="horizontal" size={4} />
40
+ <Skeleton width={16} height={16} variant="rectangular" />
56
41
  </div>
57
- </HeaderDetails>
42
+ </div>
43
+ <div className={rowStyles()}>
44
+ <Typography
45
+ className={datePlaceholderStyles()}
46
+ variant="label"
47
+ size="large"
48
+ color="neutral700">
49
+ <Skeleton width={60} height={10} variant="rounded" />
50
+ </Typography>
51
+ <Typography variant="label" size="small" color="neutral700">
52
+ <Skeleton width={60} height={10} variant="rounded" />
53
+ </Typography>
54
+ </div>
58
55
  <LoadingSwapDetails />
59
- </Container>
56
+ </SkeletonContainer>
60
57
  )}
61
58
  {!showSkeleton && (
62
59
  <PlaceholderContainer>
@@ -1,16 +1,10 @@
1
1
  import { css, darkTheme, styled, Typography } from '@rango-dev/ui';
2
2
 
3
- import { ScrollableArea } from '../Layout';
3
+ import { PageContainer } from '../Layout';
4
4
 
5
- export const Container = styled('div', {
6
- display: 'flex',
7
- flexDirection: 'column',
8
- flexGrow: 1,
9
- overflow: 'hidden',
10
- });
5
+ export const Container = styled(PageContainer, {
6
+ overflowY: 'auto',
11
7
 
12
- export const HeaderDetails = styled('div', {
13
- width: '100%',
14
8
  '& ._icon-button': {
15
9
  '&:hover': {
16
10
  '& svg': {
@@ -23,7 +17,21 @@ export const HeaderDetails = styled('div', {
23
17
  },
24
18
  });
25
19
 
26
- export const StepsList = styled(ScrollableArea, {
20
+ export const SkeletonContainer = styled('div', {
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ flexGrow: 1,
24
+ overflow: 'hidden',
25
+ });
26
+
27
+ export const RequestIdContainer = styled('div', {
28
+ position: 'sticky',
29
+ top: 0,
30
+ zIndex: 10,
31
+ backgroundColor: '$background',
32
+ });
33
+
34
+ export const StepsList = styled('div', {
27
35
  padding: '$0 $20 $20 $20',
28
36
  });
29
37
 
@@ -60,7 +60,7 @@ import {
60
60
  import { getSwapDate } from '../../utils/time';
61
61
  import { getConciseAddress } from '../../utils/wallets';
62
62
  import { SuffixContainer } from '../HeaderButtons/HeaderButtons.styles';
63
- import { Layout, PageContainer } from '../Layout';
63
+ import { Layout } from '../Layout';
64
64
  import { QuoteSummary } from '../Quote';
65
65
  import {
66
66
  SwapDetailsCompleteModal,
@@ -69,10 +69,11 @@ import {
69
69
 
70
70
  import { getSteps, getStepState, RESET_INTERVAL } from './SwapDetails.helpers';
71
71
  import {
72
+ Container,
72
73
  ErrorMessages,
73
- HeaderDetails,
74
74
  MessageText,
75
75
  outputStyles,
76
+ RequestIdContainer,
76
77
  requestIdStyles,
77
78
  rowStyles,
78
79
  StepsList,
@@ -90,7 +91,7 @@ export function SwapDetails(props: SwapDetailsProps) {
90
91
  const isActiveTab = useUiStore.use.isActiveTab();
91
92
  const navigate = useNavigate();
92
93
  const [isCopied, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
93
- const listRef = useRef<HTMLDivElement | null>(null);
94
+ const containerRef = useRef<HTMLDivElement | null>(null);
94
95
  const [modalState, setModalState] = useState<ModalState>(null);
95
96
  const [showCompletedModal, setShowCompletedModal] = useState<
96
97
  'success' | 'failed' | null
@@ -313,60 +314,58 @@ export function SwapDetails(props: SwapDetailsProps) {
313
314
  </Button>
314
315
  )
315
316
  }>
316
- <PageContainer compact view>
317
- <HeaderDetails>
318
- <div className={rowStyles()}>
319
- <Typography variant="label" size="large" color="neutral700">
320
- {`${i18n.t('Request ID')}`}
317
+ <Container compact ref={containerRef}>
318
+ <RequestIdContainer className={rowStyles()}>
319
+ <Typography variant="label" size="large" color="neutral700">
320
+ {`${i18n.t('Request ID')}`}
321
+ </Typography>
322
+ <div className={requestIdStyles()}>
323
+ <Typography variant="label" size="small" color="neutral700">
324
+ {requestId}
321
325
  </Typography>
322
- <div className={requestIdStyles()}>
323
- <Typography variant="label" size="small" color="neutral700">
324
- {requestId}
325
- </Typography>
326
+ <Tooltip
327
+ container={getContainer()}
328
+ content={
329
+ isCopied
330
+ ? i18n.t('Copied To Clipboard')
331
+ : i18n.t('Copy Request ID')
332
+ }
333
+ open={isCopied || undefined}
334
+ side="bottom"
335
+ alignOffset={-16}
336
+ align="end">
337
+ <IconButton
338
+ id="widget-swap-details-done-copy-icon-btn"
339
+ variant="ghost"
340
+ onClick={handleCopy.bind(null, requestId || '')}>
341
+ {isCopied ? (
342
+ <DoneIcon size={16} color="secondary" />
343
+ ) : (
344
+ <CopyIcon size={16} color="gray" />
345
+ )}
346
+ </IconButton>
347
+ </Tooltip>
348
+
349
+ <StyledLink
350
+ target="_blank"
351
+ href={`${SCANNER_BASE_URL}/swap/${requestId}`}>
326
352
  <Tooltip
327
353
  container={getContainer()}
328
- content={
329
- isCopied
330
- ? i18n.t('Copied To Clipboard')
331
- : i18n.t('Copy Request ID')
332
- }
333
- open={isCopied || undefined}
334
- side="bottom"
335
- alignOffset={-16}
336
- align="end">
337
- <IconButton
338
- id="widget-swap-details-done-copy-icon-btn"
339
- variant="ghost"
340
- onClick={handleCopy.bind(null, requestId || '')}>
341
- {isCopied ? (
342
- <DoneIcon size={16} color="secondary" />
343
- ) : (
344
- <CopyIcon size={16} color="gray" />
345
- )}
346
- </IconButton>
354
+ content={i18n.t('View on Rango Explorer')}
355
+ side="bottom">
356
+ <RangoExplorerIcon size={20} />
347
357
  </Tooltip>
348
-
349
- <StyledLink
350
- target="_blank"
351
- href={`${SCANNER_BASE_URL}/swap/${requestId}`}>
352
- <Tooltip
353
- container={getContainer()}
354
- content={i18n.t('View on Rango Explorer')}
355
- side="bottom">
356
- <RangoExplorerIcon size={20} />
357
- </Tooltip>
358
- </StyledLink>
359
- </div>
360
- </div>
361
- <div className={rowStyles()}>
362
- <Typography variant="label" size="large" color="neutral700">
363
- {swap.finishTime ? i18n.t('Finished at') : i18n.t('Created at')}
364
- </Typography>
365
- <Typography variant="label" size="small" color="neutral700">
366
- {swapDate}
367
- </Typography>
358
+ </StyledLink>
368
359
  </div>
369
- </HeaderDetails>
360
+ </RequestIdContainer>
361
+ <div className={rowStyles()}>
362
+ <Typography variant="label" size="large" color="neutral700">
363
+ {swap.finishTime ? i18n.t('Finished at') : i18n.t('Created at')}
364
+ </Typography>
365
+ <Typography variant="label" size="small" color="neutral700">
366
+ {swapDate}
367
+ </Typography>
368
+ </div>
370
369
 
371
370
  <div className={outputStyles()}>
372
371
  <QuoteCost
@@ -433,7 +432,7 @@ export function SwapDetails(props: SwapDetailsProps) {
433
432
  </Typography>
434
433
  </div>
435
434
  <Divider size={8} />
436
- <StepsList ref={listRef}>
435
+ <StepsList>
437
436
  {steps.map((step, index) => {
438
437
  const key = index;
439
438
  const state = getStepState(swap.steps[index]);
@@ -447,7 +446,7 @@ export function SwapDetails(props: SwapDetailsProps) {
447
446
  key={key}
448
447
  step={step}
449
448
  type="swap-progress"
450
- ref={listRef}
449
+ ref={containerRef}
451
450
  state={state}
452
451
  hasSeparator={index !== 0}
453
452
  tabIndex={key}
@@ -457,7 +456,7 @@ export function SwapDetails(props: SwapDetailsProps) {
457
456
  );
458
457
  })}
459
458
  </StepsList>
460
- </PageContainer>
459
+ </Container>
461
460
 
462
461
  <SwapDetailsModal
463
462
  state={modalState}
@@ -1,4 +1,4 @@
1
- import { styled, Typography } from '@rango-dev/ui';
1
+ import { Button, styled, Typography } from '@rango-dev/ui';
2
2
 
3
3
  export const InputsContainer = styled('div', {
4
4
  paddingTop: '$30',
@@ -15,3 +15,7 @@ export const derivationPathInputStyles = {
15
15
  backgroundColor: '$neutral200',
16
16
  borderRadius: '$sm',
17
17
  };
18
+
19
+ export const StyledButton = styled(Button, {
20
+ minHeight: '$40',
21
+ });
@@ -2,14 +2,7 @@ import type { PropTypes } from './DerivationPath.types';
2
2
  import type { DerivationPath } from '@rango-dev/wallets-shared';
3
3
 
4
4
  import { i18n } from '@lingui/core';
5
- import {
6
- Button,
7
- Divider,
8
- Image,
9
- MessageBox,
10
- Select,
11
- TextField,
12
- } from '@rango-dev/ui';
5
+ import { Divider, Image, MessageBox, Select, TextField } from '@rango-dev/ui';
13
6
  import React, { useEffect, useState } from 'react';
14
7
 
15
8
  import {
@@ -21,6 +14,7 @@ import {
21
14
  InputLabel,
22
15
  InputsContainer,
23
16
  } from './DerivationPath.styles';
17
+ import { StyledButton } from './Namespaces.styles';
24
18
 
25
19
  const DEFAULT_DERIVATION_PATH_INDEX = '0';
26
20
 
@@ -130,7 +124,7 @@ export function DerivationPath(props: PropTypes) {
130
124
  />
131
125
  </InputsContainer>
132
126
 
133
- <Button
127
+ <StyledButton
134
128
  id="widget-derivation-path-confirm-btn"
135
129
  type="primary"
136
130
  onClick={handleConfirm}
@@ -138,7 +132,7 @@ export function DerivationPath(props: PropTypes) {
138
132
  !derivationPaths || !selectedDerivationPathId || !derivationPathIndex
139
133
  }>
140
134
  {i18n.t('Confirm')}
141
- </Button>
135
+ </StyledButton>
142
136
  </>
143
137
  );
144
138
  }
@@ -1,4 +1,4 @@
1
- import { Image, styled } from '@rango-dev/ui';
1
+ import { Button, Image, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const NamespaceList = styled('ul', {
4
4
  padding: 0,
@@ -60,3 +60,7 @@ export const NamespaceLogo = styled(Image, {
60
60
  },
61
61
  },
62
62
  });
63
+
64
+ export const StyledButton = styled(Button, {
65
+ minHeight: '$40',
66
+ });
@@ -13,7 +13,7 @@ import {
13
13
  import React, { useEffect, useMemo, useState } from 'react';
14
14
 
15
15
  import { NamespaceListItem } from './NamespaceListItem';
16
- import { NamespaceList } from './Namespaces.styles';
16
+ import { NamespaceList, StyledButton } from './Namespaces.styles';
17
17
 
18
18
  export function Namespaces(props: PropTypes) {
19
19
  const { targetWallet } = props.value;
@@ -148,13 +148,13 @@ export function Namespaces(props: PropTypes) {
148
148
  )}
149
149
  </NamespaceList>
150
150
  <Divider size={20} />
151
- <Button
151
+ <StyledButton
152
152
  id="widget-name-space-confirm-btn"
153
153
  type="primary"
154
154
  disabled={!selectedNamespaces.length}
155
155
  onClick={() => props.onConfirm(selectedNamespaces)}>
156
156
  {i18n.t('Connect')}
157
- </Button>
157
+ </StyledButton>
158
158
  </>
159
159
  );
160
160
  }
@@ -1 +1,2 @@
1
+ export const BLOCKCHAIN_LIST_SIZE_COMPACT_MODE = 4;
1
2
  export const BLOCKCHAIN_LIST_SIZE = 10;