@rango-dev/widget-embedded 0.12.1-next.21 → 0.12.1-next.23

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 (44) hide show
  1. package/dist/components/AppRouter.d.ts.map +1 -1
  2. package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -1
  3. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
  4. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  5. package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts +2 -283
  6. package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -1
  7. package/dist/components/HeaderButtons/HeaderButtons.types.d.ts +1 -0
  8. package/dist/components/HeaderButtons/HeaderButtons.types.d.ts.map +1 -1
  9. package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
  10. package/dist/components/HeaderButtons/WalletButton.d.ts.map +1 -1
  11. package/dist/components/Layout/Layout.d.ts.map +1 -1
  12. package/dist/components/SettingsContainer/SettingsContainer.style.d.ts +0 -153
  13. package/dist/components/SettingsContainer/SettingsContainer.style.d.ts.map +1 -1
  14. package/dist/components/SettingsContainer/index.d.ts +1 -1
  15. package/dist/components/SettingsContainer/index.d.ts.map +1 -1
  16. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  17. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  18. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +4 -4
  21. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  22. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  23. package/dist/pages/WalletsPage.d.ts.map +1 -1
  24. package/dist/utils/common.d.ts +1 -0
  25. package/dist/utils/common.d.ts.map +1 -1
  26. package/package.json +2 -2
  27. package/src/components/AppRouter.tsx +8 -9
  28. package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +16 -4
  29. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +42 -4
  30. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +1 -0
  31. package/src/components/HeaderButtons/HeaderButtons.styles.ts +2 -2
  32. package/src/components/HeaderButtons/HeaderButtons.types.ts +1 -0
  33. package/src/components/HeaderButtons/HomeButtons.tsx +18 -5
  34. package/src/components/HeaderButtons/WalletButton.tsx +4 -1
  35. package/src/components/Layout/Layout.tsx +2 -0
  36. package/src/components/SettingsContainer/SettingsContainer.style.ts +0 -6
  37. package/src/components/SettingsContainer/index.ts +0 -1
  38. package/src/components/Slippage/Slippage.tsx +5 -1
  39. package/src/components/SwapDetails/SwapDetails.styles.ts +7 -2
  40. package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +3 -0
  41. package/src/pages/ConfirmSwapPage.tsx +8 -1
  42. package/src/pages/LiquiditySourcePage.tsx +1 -2
  43. package/src/pages/WalletsPage.tsx +2 -0
  44. package/src/utils/common.ts +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAoB7C,OAAO,KAA8B,MAAM,OAAO,CAAC;AA4EnD,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,qBAua/C"}
1
+ {"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAoB7C,OAAO,KAA8B,MAAM,OAAO,CAAC;AA6EnD,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,qBA6a/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LiquiditySourcePage.d.ts","sourceRoot":"","sources":["../../src/pages/LiquiditySourcePage.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAmBxC,UAAU,SAAS;IACjB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,iBAAiB,EACjB,UAAU,GACX,EAAE,SAAS,qBAsHX"}
1
+ {"version":3,"file":"LiquiditySourcePage.d.ts","sourceRoot":"","sources":["../../src/pages/LiquiditySourcePage.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAkBxC,UAAU,SAAS;IACjB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,iBAAiB,EACjB,UAAU,GACX,EAAE,SAAS,qBAsHX"}
@@ -1 +1 @@
1
- {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C,OAAO,KAA6B,MAAM,OAAO,CAAC;AASlD,UAAU,SAAS;IACjB,gBAAgB,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAeD,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,qBAgEhD"}
1
+ {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C,OAAO,KAA6B,MAAM,OAAO,CAAC;AAUlD,UAAU,SAAS;IACjB,gBAAgB,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAeD,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,qBAiEhD"}
@@ -6,4 +6,5 @@ export declare const colorShade: (col: string, amt: number) => string;
6
6
  export declare const generateRangeColors: (name: string, color: string) => {
7
7
  [x: string]: string;
8
8
  };
9
+ export declare const getContainer: () => HTMLElement;
9
10
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AACA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEtD;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC3B,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,WAK5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAGvB,GAAG,UAS9B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAGtE;AAED,eAAO,MAAM,UAAU,QAAS,MAAM,OAAO,MAAM,WAqBlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,SAAS,MAAM;;CAuB9D,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AACA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEtD;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC3B,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,WAK5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAGvB,GAAG,UAS9B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAGtE;AAED,eAAO,MAAM,UAAU,QAAS,MAAM,OAAO,MAAM,WAqBlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,SAAS,MAAM;;CAuB9D,CAAC;AAEF,eAAO,MAAM,YAAY,mBAC2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.12.1-next.21",
3
+ "version": "0.12.1-next.23",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "@rango-dev/queue-manager-core": "^0.15.1-next.2",
24
24
  "@rango-dev/queue-manager-rango-preset": "^0.15.1-next.6",
25
25
  "@rango-dev/queue-manager-react": "^0.15.1-next.4",
26
- "@rango-dev/ui": "^0.15.1-next.12",
26
+ "@rango-dev/ui": "^0.15.1-next.14",
27
27
  "@rango-dev/wallets-react": "^0.1.1-next.6",
28
28
  "@rango-dev/wallets-shared": "^0.15.1-next.4",
29
29
  "bignumber.js": "^9.1.1",
@@ -17,20 +17,19 @@ import { UpdateUrl } from './UpdateUrl';
17
17
  function Route(props: PropsWithChildren) {
18
18
  const location = useLocation();
19
19
  const navigate = useNavigate();
20
- const ref = useRef(true);
20
+ const firstRender = useRef(true);
21
+ const paths = location.pathname.split('/');
22
+ const pathMatched = paths[paths.length - 1] === navigationRoutes.confirmSwap;
23
+ const shouldRedirectToMainPage = pathMatched && firstRender.current;
21
24
 
22
25
  useEffect(() => {
23
- if (
24
- location.pathname === '/' + navigationRoutes.confirmSwap &&
25
- ref.current
26
- ) {
27
- navigate(navigationRoutes.home + location.search, { state: 'redirect' });
26
+ if (shouldRedirectToMainPage) {
27
+ navigate('.');
28
28
  }
29
-
30
- ref.current = false;
29
+ firstRender.current = false;
31
30
  }, []);
32
31
 
33
- if (location.pathname === '/' + navigationRoutes.confirmSwap && ref.current) {
32
+ if (shouldRedirectToMainPage) {
34
33
  return <Home />;
35
34
  }
36
35
 
@@ -1,9 +1,13 @@
1
- import { styled } from '@rango-dev/ui';
1
+ import { darkTheme, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const Chip = styled('button', {
4
4
  padding: '$10',
5
5
  borderRadius: '$sm',
6
- backgroundColor: '$neutral100',
6
+ $$color: '$colors$neutral100',
7
+ [`.${darkTheme} &`]: {
8
+ $$color: '$colors$neutral300',
9
+ },
10
+ backgroundColor: '$$color',
7
11
  display: 'flex',
8
12
  flexDirection: 'column',
9
13
  justifyContent: 'center',
@@ -15,11 +19,19 @@ export const Chip = styled('button', {
15
19
  overflow: 'hidden',
16
20
  },
17
21
  '&:hover': {
18
- backgroundColor: '$neutral400',
22
+ $$color: '$colors$info100',
23
+ [`.${darkTheme} &`]: {
24
+ $$color: '$colors$neutral100',
25
+ },
26
+ backgroundColor: '$$color',
19
27
  },
20
28
  '&:focus-visible': {
21
29
  outline: 0,
22
- backgroundColor: '$neutral500',
30
+ $$color: '$colors$info100',
31
+ [`.${darkTheme} &`]: {
32
+ $$color: '$colors$info700',
33
+ },
34
+ backgroundColor: '$$color',
23
35
  },
24
36
  variants: {
25
37
  selected: {
@@ -1,6 +1,7 @@
1
1
  import * as Collapsible from '@radix-ui/react-collapsible';
2
2
  import {
3
3
  Button,
4
+ darkTheme,
4
5
  IconButton,
5
6
  keyframes,
6
7
  styled,
@@ -45,14 +46,31 @@ export const WalletButton = styled('button', {
45
46
  border: '0',
46
47
  display: 'flex',
47
48
  justifyContent: 'center',
48
- backgroundColor: '$neutral100',
49
+ $$color: '$colors$neutral100',
50
+ [`.${darkTheme} &`]: {
51
+ $$color: '$colors$neutral300',
52
+ },
53
+ backgroundColor: '$$color',
49
54
  alignItems: 'center',
50
55
  cursor: 'pointer',
51
56
  width: 110,
52
57
  position: 'relative',
58
+
53
59
  '&:hover': {
54
- backgroundColor: '$surface600',
55
- opacity: '0.8',
60
+ $$color: '$colors$info100',
61
+ [`.${darkTheme} &`]: {
62
+ $$color: '$colors$neutral100',
63
+ },
64
+ backgroundColor: '$$color',
65
+ },
66
+
67
+ '&:focus-visible': {
68
+ $$color: '$colors$info100',
69
+ [`.${darkTheme} &`]: {
70
+ $$color: '$colors$info700',
71
+ },
72
+ backgroundColor: '$$color',
73
+ outline: 0,
56
74
  },
57
75
  variants: {
58
76
  selected: {
@@ -117,7 +135,27 @@ export const CustomDestinationButton = styled(Button, {
117
135
  padding: '$15 !important',
118
136
  justifyContent: 'space-between',
119
137
  alignItems: 'center',
120
- backgroundColor: '$neutral100 !important',
138
+ $$color: '$colors$neutral100',
139
+ [`.${darkTheme} &`]: {
140
+ $$color: '$colors$neutral300',
141
+ },
142
+ backgroundColor: '$$color',
143
+
144
+ '&:hover': {
145
+ $$color: '$colors$info100',
146
+ [`.${darkTheme} &`]: {
147
+ $$color: '$colors$neutral100',
148
+ },
149
+ backgroundColor: '$$color',
150
+ },
151
+ '&:focus-visible': {
152
+ $$background: '$colors$info100',
153
+ [`.${darkTheme} &`]: {
154
+ $$background: '$colors$info700',
155
+ },
156
+ backgroundColor: '$$background',
157
+ outline: 0,
158
+ },
121
159
  });
122
160
 
123
161
  export const CustomDestination = styled('div', {
@@ -407,6 +407,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
407
407
  }>
408
408
  <CustomDestinationButton
409
409
  fullWidth
410
+ variant="default"
410
411
  suffix={
411
412
  <ExpandedIcon
412
413
  orientation={
@@ -1,6 +1,6 @@
1
- import { Button, darkTheme, styled } from '@rango-dev/ui';
1
+ import { darkTheme, IconButton, styled } from '@rango-dev/ui';
2
2
 
3
- export const HeaderButton = styled(Button, {
3
+ export const HeaderButton = styled(IconButton, {
4
4
  width: '$24',
5
5
  position: 'relative',
6
6
  padding: '0',
@@ -1,6 +1,7 @@
1
1
  export interface PropTypes {
2
2
  onClick: () => void;
3
3
  isConnected?: boolean;
4
+ container?: HTMLElement;
4
5
  }
5
6
  export interface HomeButtonsPropTypes {
6
7
  layoutRef: HTMLDivElement | null;
@@ -11,6 +11,7 @@ import {
11
11
  } from '@rango-dev/ui';
12
12
  import React from 'react';
13
13
 
14
+ import { getContainer } from '../../utils/common';
14
15
  import { NotificationContent } from '../NotificationContent';
15
16
 
16
17
  import { HeaderButton } from './HeaderButtons.styles';
@@ -27,7 +28,10 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
27
28
 
28
29
  return (
29
30
  <>
30
- <Tooltip side="top" content={i18n.t('Refresh')}>
31
+ <Tooltip
32
+ container={getContainer()}
33
+ side="top"
34
+ content={i18n.t('Refresh')}>
31
35
  <HeaderButton
32
36
  variant="ghost"
33
37
  size="small"
@@ -37,12 +41,15 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
37
41
  </HeaderButton>
38
42
  </Tooltip>
39
43
 
40
- <Tooltip side="top" content={i18n.t('Notifications')}>
44
+ <Tooltip
45
+ container={getContainer()}
46
+ side="top"
47
+ content={i18n.t('Notifications')}>
41
48
  <Popover
42
49
  align="center"
43
50
  collisionBoundary={layoutRef}
44
51
  collisionPadding={{ right: 20, left: 20 }}
45
- container={document.getElementById('swap-box') as HTMLElement}
52
+ container={getContainer()}
46
53
  content={<NotificationContent />}>
47
54
  <HeaderButton
48
55
  size="small"
@@ -53,12 +60,18 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
53
60
  </HeaderButton>
54
61
  </Popover>
55
62
  </Tooltip>
56
- <Tooltip side="top" content={i18n.t('Settings')}>
63
+ <Tooltip
64
+ container={getContainer()}
65
+ side="top"
66
+ content={i18n.t('Settings')}>
57
67
  <HeaderButton size="small" variant="ghost" onClick={onClickSettings}>
58
68
  <SettingsIcon size={18} color="black" />
59
69
  </HeaderButton>
60
70
  </Tooltip>
61
- <Tooltip side="top" content={i18n.t('Transactions History')}>
71
+ <Tooltip
72
+ container={getContainer()}
73
+ side="top"
74
+ content={i18n.t('Transactions History')}>
62
75
  <HeaderButton size="small" variant="ghost" onClick={onClickHistory}>
63
76
  <TransactionIcon size={18} color="black" />
64
77
  </HeaderButton>
@@ -8,7 +8,10 @@ import { ConnectedIcon, HeaderButton } from './HeaderButtons.styles';
8
8
 
9
9
  function WalletButton(props: PropTypes) {
10
10
  return (
11
- <Tooltip side="top" content={i18n.t('Connect Wallet')}>
11
+ <Tooltip
12
+ container={props.container}
13
+ side="top"
14
+ content={i18n.t('Connect Wallet')}>
12
15
  <HeaderButton variant="ghost" size="small" onClick={props.onClick}>
13
16
  {props.isConnected && <ConnectedIcon />}
14
17
  <WalletIcon size={18} color="black" />
@@ -8,6 +8,7 @@ import { useNavigate } from 'react-router-dom';
8
8
  import { navigationRoutes } from '../../constants/navigationRoutes';
9
9
  import { useUiStore } from '../../store/ui';
10
10
  import { useWalletsStore } from '../../store/wallets';
11
+ import { getContainer } from '../../utils/common';
11
12
  import { BackButton, CancelButton, WalletButton } from '../HeaderButtons';
12
13
 
13
14
  import { Container, Content, Footer } from './Layout.styles';
@@ -42,6 +43,7 @@ function LayoutComponent(props: PropsWithChildren<PropTypes>, ref: Ref) {
42
43
  {header.suffix}
43
44
  {header.hasConnectWallet && (
44
45
  <WalletButton
46
+ container={getContainer()}
45
47
  onClick={onConnectWallet}
46
48
  isConnected={!!connectedWallets?.length}
47
49
  />
@@ -12,12 +12,6 @@ export const LiquiditySourceList = styled('ul', {
12
12
  overflowY: 'visible',
13
13
  });
14
14
 
15
- export const LiquiditySourceDivider = styled('li', {
16
- margin: '0 auto',
17
- width: '100%',
18
- height: '1px',
19
- backgroundColor: '$neutral300',
20
- });
21
15
  export const LiquiditySourceSuffix = styled('div', {
22
16
  width: 80,
23
17
  display: 'flex',
@@ -1,6 +1,5 @@
1
1
  export {
2
2
  SettingsContainer,
3
- LiquiditySourceDivider,
4
3
  LiquiditySourceList,
5
4
  LiquiditySourceSuffix,
6
5
  NotFoundContainer,
@@ -15,6 +15,7 @@ import {
15
15
  SLIPPAGES,
16
16
  } from '../../constants/swapSettings';
17
17
  import { useSettingsStore } from '../../store/settings';
18
+ import { getContainer } from '../../utils/common';
18
19
 
19
20
  import { BaseContainer, Head, SlippageChipsContainer } from './Slippage.styles';
20
21
  import { SlippageTooltipContent } from './SlippageTooltipContent';
@@ -32,7 +33,10 @@ export function Slippage() {
32
33
  {i18n.t('Slippage tolerance per swap')}
33
34
  </Typography>
34
35
  <Divider direction="horizontal" size={4} />
35
- <Tooltip side="top" content={<SlippageTooltipContent />}>
36
+ <Tooltip
37
+ container={getContainer()}
38
+ side="top"
39
+ content={<SlippageTooltipContent />}>
36
40
  <InfoIcon color="gray" />
37
41
  </Tooltip>
38
42
  </Head>
@@ -1,4 +1,4 @@
1
- import { styled } from '@rango-dev/ui';
1
+ import { darkTheme, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  display: 'flex',
@@ -13,7 +13,12 @@ export const Container = styled('div', {
13
13
  justifyContent: 'space-between',
14
14
  alignItems: 'center',
15
15
  padding: '$10 $5',
16
- borderBottom: '1px solid $neutral300',
16
+ borderBottom: '1px solid',
17
+ $$color: '$colors$neutral300',
18
+ [`.${darkTheme} &`]: {
19
+ $$color: '$colors$neutral400',
20
+ },
21
+ borderColor: '$$color',
17
22
  color: '$neutral500',
18
23
  },
19
24
  '& .request-id': {
@@ -4,6 +4,8 @@ import { MessageBox, Wallet, WalletState } from '@rango-dev/ui';
4
4
  import { useWallets } from '@rango-dev/wallets-react';
5
5
  import React from 'react';
6
6
 
7
+ import { getContainer } from '../../utils/common';
8
+
7
9
  import { WalletContainer } from './SwapDetailsModal.styles';
8
10
 
9
11
  export const WalletStateContent = (props: WalletStateContentProps) => {
@@ -18,6 +20,7 @@ export const WalletStateContent = (props: WalletStateContentProps) => {
18
20
  {showWalletButton && walletType && (
19
21
  <WalletContainer>
20
22
  <Wallet
23
+ container={getContainer()}
21
24
  title={getWalletInfo(walletType).name}
22
25
  image={getWalletInfo(walletType).img}
23
26
  type={walletType}
@@ -59,6 +59,7 @@ import {
59
59
  RouteWarningType,
60
60
  SlippageWarningType,
61
61
  } from '../types';
62
+ import { getContainer } from '../utils/common';
62
63
  import {
63
64
  numberToString,
64
65
  secondsToString,
@@ -317,7 +318,10 @@ export function ConfirmSwapPage(props: PropTypes) {
317
318
  onBack: navigate.bind(null, -1),
318
319
  hasConnectWallet: true,
319
320
  suffix: (
320
- <Tooltip side="bottom" content={i18n.t('Settings')}>
321
+ <Tooltip
322
+ container={getContainer()}
323
+ side="bottom"
324
+ content={i18n.t('Settings')}>
321
325
  <HeaderButton
322
326
  size="small"
323
327
  variant="ghost"
@@ -458,6 +462,9 @@ export function ConfirmSwapPage(props: PropTypes) {
458
462
  {showBestRoute && (
459
463
  <BestRoute
460
464
  expanded={true}
465
+ tooltipContainer={
466
+ document.getElementById('swap-box') as HTMLElement
467
+ }
461
468
  steps={formatBestRoute(bestRoute) ?? []}
462
469
  input={{
463
470
  value: numberToString(
@@ -18,7 +18,6 @@ import { Layout } from '../components/Layout';
18
18
  import { LoadingLiquiditySourceList } from '../components/LoadingLiquiditySourceList';
19
19
  import { SearchInput } from '../components/SearchInput';
20
20
  import {
21
- LiquiditySourceDivider,
22
21
  LiquiditySourceList,
23
22
  LiquiditySourceSuffix,
24
23
  NotFoundContainer,
@@ -146,8 +145,8 @@ export function LiquiditySourcePage({
146
145
  style={{ height: '61px' }}
147
146
  {...sourceItem}
148
147
  selected={false}
148
+ hasDivider
149
149
  />
150
- <LiquiditySourceDivider />
151
150
  </React.Fragment>
152
151
  );
153
152
  })}
@@ -11,6 +11,7 @@ import { navigationRoutes } from '../constants/navigationRoutes';
11
11
  import { useNavigateBack } from '../hooks/useNavigateBack';
12
12
  import { useWalletList } from '../hooks/useWalletList';
13
13
  import { useMetaStore } from '../store/meta';
14
+ import { getContainer } from '../utils/common';
14
15
 
15
16
  interface PropTypes {
16
17
  supportedWallets: WidgetConfig['wallets'];
@@ -79,6 +80,7 @@ export function WalletsPage({ config }: PropTypes) {
79
80
  <Fragment key={key}>
80
81
  <Wallet
81
82
  {...wallet}
83
+ container={getContainer()}
82
84
  onClick={(type) => {
83
85
  void handleClick(type);
84
86
  }}
@@ -78,3 +78,6 @@ export const generateRangeColors = (name: string, color: string) => {
78
78
  }
79
79
  return colors;
80
80
  };
81
+
82
+ export const getContainer = () =>
83
+ document.getElementById('swap-box') as HTMLElement;