@rango-dev/widget-embedded 0.43.1-next.1 → 0.43.1-next.10

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 (139) hide show
  1. package/dist/components/BlockchainList/BlockchainList.d.ts.map +1 -1
  2. package/dist/components/BlockchainSelectorButton/BlockchainSelectorButton.d.ts.map +1 -1
  3. package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
  4. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  5. package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
  6. package/dist/components/CustomDestination/CustomDestination.d.ts.map +1 -1
  7. package/dist/components/CustomDestination/CustomDestination.styles.d.ts +1 -0
  8. package/dist/components/CustomDestination/CustomDestination.styles.d.ts.map +1 -1
  9. package/dist/components/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
  10. package/dist/components/FilterSelector/FilterSelectorContent.d.ts.map +1 -1
  11. package/dist/components/HeaderButtons/NotificationsBadge.d.ts.map +1 -1
  12. package/dist/components/HistoryGroupedList/HistoryGroupedList.d.ts.map +1 -1
  13. package/dist/components/NoResult/NoResult.d.ts.map +1 -1
  14. package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
  15. package/dist/components/Quote/Quote.d.ts.map +1 -1
  16. package/dist/components/Quote/Quote.types.d.ts +2 -1
  17. package/dist/components/Quote/Quote.types.d.ts.map +1 -1
  18. package/dist/components/Quote/QuoteCostDetails.d.ts.map +1 -1
  19. package/dist/components/Quote/QuoteSummary.d.ts.map +1 -1
  20. package/dist/components/Quote/QuoteTrigger.d.ts.map +1 -1
  21. package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -1
  22. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
  23. package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts.map +1 -1
  24. package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts.map +1 -1
  25. package/dist/components/Quotes/Quotes.d.ts.map +1 -1
  26. package/dist/components/Quotes/SelectStrategy.d.ts.map +1 -1
  27. package/dist/components/RefreshModal/RefreshModal.d.ts.map +1 -1
  28. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  29. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  30. package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts +1 -0
  31. package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts.map +1 -1
  32. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  33. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.d.ts.map +1 -1
  34. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.d.ts.map +1 -1
  35. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.d.ts.map +1 -1
  36. package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
  37. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
  38. package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -1
  39. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -1
  40. package/dist/components/SwapMetrics/SwapMetrics.helpers.d.ts.map +1 -1
  41. package/dist/components/SwitchFromAndTo/SwitchFromAndTo.d.ts.map +1 -1
  42. package/dist/components/WalletStatefulConnect/DerivationPath.d.ts.map +1 -1
  43. package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts +1 -0
  44. package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts.map +1 -1
  45. package/dist/components/WalletStatefulConnect/NamespaceDetachedItem.d.ts.map +1 -1
  46. package/dist/components/WalletStatefulConnect/NamespaceListItem.d.ts.map +1 -1
  47. package/dist/components/WalletStatefulConnect/Namespaces.d.ts.map +1 -1
  48. package/dist/components/common/ActivateTabModal/ActivateTabModal.d.ts.map +1 -1
  49. package/dist/containers/Inputs/Inputs.d.ts.map +1 -1
  50. package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
  51. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +1 -0
  52. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
  53. package/dist/containers/Settings/Lists.d.ts.map +1 -1
  54. package/dist/index.js +2 -2
  55. package/dist/index.js.map +3 -3
  56. package/dist/pages/AddCustomTokenPage.d.ts.map +1 -1
  57. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  58. package/dist/pages/CustomTokensPage.d.ts.map +1 -1
  59. package/dist/pages/HistoryPage.d.ts.map +1 -1
  60. package/dist/pages/Home.d.ts.map +1 -1
  61. package/dist/pages/LanguagePage.d.ts.map +1 -1
  62. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  63. package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
  64. package/dist/pages/SelectSwapItemPage/SelectSwapItemsPage.d.ts.map +1 -1
  65. package/dist/pages/SettingsPage.d.ts.map +1 -1
  66. package/dist/pages/WalletsPage.d.ts.map +1 -1
  67. package/dist/store/slices/wallets.d.ts +1 -0
  68. package/dist/store/slices/wallets.d.ts.map +1 -1
  69. package/dist/types/config.d.ts +1 -1
  70. package/dist/utils/swap.d.ts.map +1 -1
  71. package/dist/widget-embedded.build.json +1 -1
  72. package/package.json +10 -10
  73. package/src/components/BlockchainList/BlockchainList.tsx +4 -1
  74. package/src/components/BlockchainList/LoadingBlockchainList.tsx +1 -1
  75. package/src/components/BlockchainSelectorButton/BlockchainSelectorButton.tsx +2 -1
  76. package/src/components/BlockchainsSection/BlockchainsSection.tsx +8 -2
  77. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +8 -1
  78. package/src/components/ConfirmWalletsModal/WalletList.tsx +10 -4
  79. package/src/components/CustomDestination/CustomDestination.tsx +2 -1
  80. package/src/components/CustomTokenModal/CustomTokenModal.tsx +1 -0
  81. package/src/components/FilterSelector/FilterSelectorContent.tsx +1 -0
  82. package/src/components/HeaderButtons/InProgressTransactionBadge.tsx +1 -1
  83. package/src/components/HeaderButtons/NotificationsBadge.tsx +5 -1
  84. package/src/components/HistoryGroupedList/HistoryGroupedList.tsx +1 -0
  85. package/src/components/ImportCustomToken/ImportCustomToken.tsx +1 -1
  86. package/src/components/NoResult/NoResult.tsx +2 -1
  87. package/src/components/NotificationContent/NotificationContent.tsx +1 -0
  88. package/src/components/Quote/Quote.tsx +8 -2
  89. package/src/components/Quote/Quote.types.ts +2 -1
  90. package/src/components/Quote/QuoteCostDetails.tsx +9 -3
  91. package/src/components/Quote/QuoteSummary.tsx +2 -0
  92. package/src/components/Quote/QuoteTrigger.tsx +1 -0
  93. package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +1 -0
  94. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +1 -0
  95. package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +1 -0
  96. package/src/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.tsx +1 -0
  97. package/src/components/Quotes/Quotes.tsx +1 -0
  98. package/src/components/Quotes/SelectStrategy.tsx +1 -0
  99. package/src/components/RefreshModal/RefreshModal.tsx +2 -0
  100. package/src/components/SearchInput/SearchInput.tsx +7 -2
  101. package/src/components/Slippage/Slippage.tsx +3 -0
  102. package/src/components/StatefulConnectModal/StatefulConnectModal.tsx +2 -0
  103. package/src/components/SwapDetails/SwapDetails.tsx +2 -1
  104. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.tsx +2 -0
  105. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +9 -1
  106. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.tsx +8 -1
  107. package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +2 -0
  108. package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +1 -0
  109. package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +4 -0
  110. package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -0
  111. package/src/components/SwapMetrics/SwapMetrics.helpers.ts +6 -2
  112. package/src/components/SwitchFromAndTo/SwitchFromAndTo.tsx +1 -0
  113. package/src/components/WalletStatefulConnect/DerivationPath.tsx +2 -0
  114. package/src/components/WalletStatefulConnect/Detached.tsx +1 -1
  115. package/src/components/WalletStatefulConnect/ExperimentalChain.tsx +3 -1
  116. package/src/components/WalletStatefulConnect/NamespaceDetachedItem.tsx +3 -2
  117. package/src/components/WalletStatefulConnect/NamespaceListItem.tsx +4 -1
  118. package/src/components/WalletStatefulConnect/Namespaces.tsx +1 -0
  119. package/src/components/WalletStatefulConnect/SupportedChainsList.tsx +1 -1
  120. package/src/components/common/ActivateTabModal/ActivateTabModal.tsx +1 -0
  121. package/src/containers/ExpandedQuotes/ExpandedQuotes.tsx +1 -1
  122. package/src/containers/Inputs/Inputs.tsx +2 -0
  123. package/src/containers/QuoteInfo/QuoteInfo.tsx +2 -1
  124. package/src/containers/QuoteInfo/QuoteInfo.types.ts +1 -0
  125. package/src/containers/Settings/Lists.tsx +13 -3
  126. package/src/pages/AddCustomTokenPage.tsx +7 -1
  127. package/src/pages/ConfirmSwapPage.tsx +9 -1
  128. package/src/pages/CustomTokensPage.tsx +2 -0
  129. package/src/pages/HistoryPage.tsx +2 -0
  130. package/src/pages/Home.tsx +1 -0
  131. package/src/pages/LanguagePage.tsx +2 -0
  132. package/src/pages/LiquiditySourcePage.tsx +6 -1
  133. package/src/pages/SelectBlockchainPage.tsx +1 -0
  134. package/src/pages/SelectSwapItemPage/SelectSwapItemsPage.tsx +1 -0
  135. package/src/pages/SettingsPage.tsx +1 -0
  136. package/src/pages/WalletsPage.tsx +1 -0
  137. package/src/store/slices/wallets.ts +2 -0
  138. package/src/types/config.ts +1 -1
  139. package/src/utils/swap.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.43.1-next.1",
3
+ "version": "0.43.1-next.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,23 +25,23 @@
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.46.1-next.1",
28
+ "@rango-dev/provider-all": "^0.46.1-next.5",
29
29
  "@rango-dev/queue-manager-core": "^0.29.0",
30
- "@rango-dev/queue-manager-rango-preset": "^0.45.2-next.8",
30
+ "@rango-dev/queue-manager-rango-preset": "^0.45.2-next.11",
31
31
  "@rango-dev/queue-manager-react": "^0.29.0",
32
- "@rango-dev/signer-solana": "^0.39.1-next.3",
33
- "@rango-dev/ui": "^0.46.2-next.10",
34
- "@rango-dev/wallets-core": "^0.43.1-next.7",
35
- "@rango-dev/wallets-react": "^0.30.2-next.9",
36
- "@rango-dev/wallets-shared": "^0.44.2-next.8",
32
+ "@rango-dev/signer-solana": "^0.39.1-next.4",
33
+ "@rango-dev/ui": "^0.46.2-next.14",
34
+ "@rango-dev/wallets-core": "^0.43.1-next.11",
35
+ "@rango-dev/wallets-react": "^0.30.2-next.12",
36
+ "@rango-dev/wallets-shared": "^0.44.2-next.13",
37
37
  "bignumber.js": "^9.1.1",
38
38
  "copy-to-clipboard": "^3.3.3",
39
39
  "dayjs": "^1.11.7",
40
40
  "ethers": "^6.13.2",
41
41
  "immer": "^9.0.19",
42
42
  "mitt": "^3.0.0",
43
- "rango-sdk": "^0.1.67",
44
- "rango-types": "^0.1.84",
43
+ "rango-sdk": "^0.1.68",
44
+ "rango-types": "^0.1.85",
45
45
  "react-i18next": "^12.2.0",
46
46
  "react-router-dom": "^6.8.0",
47
47
  "values.js": "2.1.1",
@@ -44,7 +44,10 @@ export function BlockchainList(props: PropTypes) {
44
44
  );
45
45
  }
46
46
  return (
47
- <List as="ul" key={`${blockchainCategory}-${searchedFor}`}>
47
+ <List
48
+ as="ul"
49
+ key={`${blockchainCategory}-${searchedFor}`}
50
+ id="widget-blockchain-list">
48
51
  {blockchains.map((item) => (
49
52
  <ListItemButton
50
53
  key={`${item.name}-${item.chainId}`}
@@ -6,7 +6,7 @@ import { List } from './BlockchainList.styles';
6
6
  const ITEM_SKELETON_COUNT = 20;
7
7
  export function LoadingBlockchainList() {
8
8
  return (
9
- <List>
9
+ <List id="widget-blockchain-loading-list" as="ul">
10
10
  {Array.from(Array(ITEM_SKELETON_COUNT), (e) => (
11
11
  <ListItem
12
12
  key={e}
@@ -20,7 +20,8 @@ export function BlockchainSelectorButton(props: PropTypes) {
20
20
  <Divider size={10} />
21
21
  <InputContainer
22
22
  onClick={disabled ? undefined : onClick}
23
- disabled={disabled}>
23
+ disabled={disabled}
24
+ id="widget-blockchain-selector-container">
24
25
  <FlexContainer>
25
26
  {hasLogo && (
26
27
  <>
@@ -57,7 +57,7 @@ export function BlockchainsSection(props: PropTypes) {
57
57
  </>
58
58
  )}
59
59
  <Divider size={12} />
60
- <Blockchains>
60
+ <Blockchains id="widget-blockchains-section-container">
61
61
  {fetchStatus === 'loading' &&
62
62
  Array.from(
63
63
  Array(
@@ -70,6 +70,7 @@ export function BlockchainsSection(props: PropTypes) {
70
70
  {fetchStatus === 'success' && (
71
71
  <>
72
72
  <BlockchainsChip
73
+ className="widget-blockchains-section-all-btn"
73
74
  selected={!blockchain}
74
75
  onClick={() => {
75
76
  if (type === 'from') {
@@ -90,6 +91,7 @@ export function BlockchainsSection(props: PropTypes) {
90
91
  sideOffset={2}
91
92
  container={getContainer()}>
92
93
  <BlockchainsChip
94
+ className="widget-blockchains-section-item-btn"
93
95
  key={item.name}
94
96
  selected={!!blockchain && blockchain.name === item.name}
95
97
  onClick={() => onChange(item)}>
@@ -100,6 +102,7 @@ export function BlockchainsSection(props: PropTypes) {
100
102
 
101
103
  {onlyOneItemInList ? (
102
104
  <BlockchainsChip
105
+ className="widget-blockchains-section-only-item-btn"
103
106
  key={blockchainsList.more[0].name}
104
107
  selected={
105
108
  !!blockchain &&
@@ -111,7 +114,10 @@ export function BlockchainsSection(props: PropTypes) {
111
114
  ) : null}
112
115
 
113
116
  {showMoreButton ? (
114
- <BlockchainsChip onClick={onMoreClick} key="more-blockchains">
117
+ <BlockchainsChip
118
+ onClick={onMoreClick}
119
+ key="more-blockchains"
120
+ className="widget-blockchains-section-more-items-btn">
115
121
  <Typography variant="body" size="xsmall" color="secondary500">
116
122
  {i18n._('More +{count}', {
117
123
  count: blockchainsList.more.length,
@@ -307,6 +307,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
307
307
 
308
308
  return (
309
309
  <WatermarkedModal
310
+ id="widget-confirm-wallets-modal"
310
311
  open={open}
311
312
  onClose={() => {
312
313
  if (!quoteWalletsConfirmed) {
@@ -368,6 +369,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
368
369
  })}
369
370
  anchor="center">
370
371
  <WatermarkedModal
372
+ id='"widget-confirm-wallets-insufficient-account-balance-modal'
371
373
  open={isInsufficientBalanceModalOpen}
372
374
  onClose={setBalanceWarnings.bind(null, [])}
373
375
  container={modalContainer}>
@@ -406,7 +408,12 @@ export function ConfirmWalletsModal(props: PropTypes) {
406
408
  <>
407
409
  {error && (
408
410
  <>
409
- <Alert variant="alarm" type="error" title={i18n.t(error)} />
411
+ <Alert
412
+ id="widget-confirm-wallet-modal-error-alert"
413
+ variant="alarm"
414
+ type="error"
415
+ title={i18n.t(error)}
416
+ />
410
417
  <Divider size={12} />
411
418
  </>
412
419
  )}
@@ -123,9 +123,7 @@ export function WalletList(props: PropTypes) {
123
123
  ? getConciseAddress(address, ACCOUNT_ADDRESS_MAX_CHARACTERS)
124
124
  : '';
125
125
  const isConnectedButDifferentThanTargetNamespace =
126
- isConnected && wallet.isHub
127
- ? !conciseAddress
128
- : !!wallet.needsNamespace && !conciseAddress;
126
+ isConnected && !!wallet.needsNamespace && !conciseAddress;
129
127
 
130
128
  const experimentalChain = isExperimentalChain(blockchains(), chain);
131
129
 
@@ -198,12 +196,14 @@ export function WalletList(props: PropTypes) {
198
196
  <React.Fragment key={`${wallet.title}_${blockchainDisplayName}`}>
199
197
  {!!experimentalChainWallet && (
200
198
  <WatermarkedModal
199
+ id="widget-wallets-list-watermarked-modal"
201
200
  open={!!experimentalChainWallet && showExperimentalChainModal}
202
201
  container={modalContainer}
203
202
  onClose={() => {
204
203
  setExperimentalChainWallet(null);
205
204
  }}>
206
205
  <ExperimentalChain
206
+ id="widget-wallets-list-experimental-chain-container"
207
207
  displayName={blockchainDisplayName}
208
208
  onConfirm={() => {
209
209
  void addExperimentalChain(experimentalChainWallet);
@@ -213,6 +213,7 @@ export function WalletList(props: PropTypes) {
213
213
  )}
214
214
  {addingExperimentalChainStatus && (
215
215
  <WatermarkedModal
216
+ id="widget-wallets-list-experimental-chain-watermarked-modal"
216
217
  open={!!addingExperimentalChainStatus}
217
218
  onClose={setAddingExperimentalChainStatus.bind(null, null)}
218
219
  container={modalContainer}>
@@ -226,6 +227,7 @@ export function WalletList(props: PropTypes) {
226
227
  )}
227
228
  <SelectableWallet
228
229
  key={wallet.type}
230
+ id="widget-wallets-list-selectable-wallet-btn"
229
231
  description={getWalletDescription()}
230
232
  descriptionColor={getWalletDescriptionColor()}
231
233
  onClick={onSelectableWalletClick}
@@ -237,6 +239,7 @@ export function WalletList(props: PropTypes) {
237
239
  );
238
240
  })}
239
241
  <StatefulConnectModal
242
+ id="widget-wallets-list-stateful-connect-modal"
240
243
  wallet={selectedWalletToConnect}
241
244
  options={{ defaultSelectedChains: quoteChains || [chain] }}
242
245
  onClose={() => {
@@ -257,7 +260,10 @@ export function WalletList(props: PropTypes) {
257
260
  }}
258
261
  />
259
262
  {shouldShowMoreWallets && (
260
- <ShowMoreWallets selected={false} onClick={onShowMore}>
263
+ <ShowMoreWallets
264
+ selected={false}
265
+ onClick={onShowMore}
266
+ id="widget-wallets-list-show-more-wallets-btn">
261
267
  <Typography variant="label" size="medium">
262
268
  {i18n.t('Show more wallets')}
263
269
  <Typography variant="label" size="medium" color="$primary">
@@ -102,7 +102,7 @@ export function CustomDestination(props: PropTypes) {
102
102
  open={open}
103
103
  triggerAnchor="top"
104
104
  trigger={
105
- <CustomDestinationButton>
105
+ <CustomDestinationButton id="widget-custom-destination-collapsible-btn">
106
106
  <div className="button__content">
107
107
  <WalletIcon size={18} color="info" />
108
108
  <Divider size={4} direction="horizontal" />
@@ -120,6 +120,7 @@ export function CustomDestination(props: PropTypes) {
120
120
  }
121
121
  onClickTrigger={() => handleOpenChange(!open)}>
122
122
  <StyledTextField
123
+ id="widget-custom-destination-blockchain-address-input"
123
124
  ref={inputRef}
124
125
  style={{
125
126
  padding: 0,
@@ -23,6 +23,7 @@ export function CustomTokenModal(props: PropTypes) {
23
23
  return (
24
24
  <WatermarkedModal
25
25
  open={open}
26
+ id="widget-custom-token-watermarked-modal"
26
27
  dismissible
27
28
  onClose={onClose}
28
29
  onExit={onExit}
@@ -40,6 +40,7 @@ export function FilterSelectorContent(props: PropTypes) {
40
40
  return (
41
41
  <ListItemButton
42
42
  key={item.id}
43
+ className="widget-filter-selector-list-item-btn"
43
44
  style={{ height: '40px', width: '100%' }}
44
45
  selected={false}
45
46
  hasDivider={props.list.length - 1 != index}
@@ -17,7 +17,7 @@ const InProgressTransactionBadge = () => {
17
17
  }
18
18
 
19
19
  return (
20
- <InProgressTransactionBadgeContainer>
20
+ <InProgressTransactionBadgeContainer id="widget-header-history-badge-container">
21
21
  <InProgressIcon color="info" size={6} />
22
22
  </InProgressTransactionBadgeContainer>
23
23
  );
@@ -20,7 +20,11 @@ export function NotificationsBadge() {
20
20
 
21
21
  return notificationsCount ? (
22
22
  <NotificationsBadgeContainer isSever={hasSeverNotification}>
23
- <Typography variant="body" size="xsmall" color="$background">
23
+ <Typography
24
+ variant="body"
25
+ size="xsmall"
26
+ color="$background"
27
+ id="widget-header-notifications-badge-container">
24
28
  {notificationsCount}
25
29
  </Typography>
26
30
  </NotificationsBadgeContainer>
@@ -112,6 +112,7 @@ export function HistoryGroupedList(props: PropTypes) {
112
112
  return (
113
113
  <SwapItemContainer key={swap.requestId}>
114
114
  <SwapListItem
115
+ className="widget-history-group-list-swap-item-btn"
115
116
  requestId={swap.requestId}
116
117
  creationTime={swap.creationTime}
117
118
  status={swap.status}
@@ -73,12 +73,12 @@ export function ImportCustomToken(props: PropTypes) {
73
73
  setShowImportModal(true);
74
74
  }
75
75
  }, [blockchain, token]);
76
-
77
76
  return (
78
77
  <>
79
78
  <WatermarkedModal
80
79
  open={showErrorModal}
81
80
  dismissible
81
+ id="widget-add-custom-token-modal"
82
82
  onClose={closeErrorModal}
83
83
  onExit={handleExit}
84
84
  container={getContainer()}>
@@ -42,7 +42,7 @@ export function NoResult(props: PropTypes) {
42
42
  }
43
43
 
44
44
  return (
45
- <Container>
45
+ <Container id="widget-no-result-container">
46
46
  <NoRouteIcon size={NoRouteIconSize[size]} color="gray" />
47
47
  <Divider size={4} />
48
48
  <Typography variant="title" size={NoRouteTitleSize[size]}>
@@ -64,6 +64,7 @@ export function NoResult(props: PropTypes) {
64
64
  {!!info.alert && (
65
65
  <Footer size={size}>
66
66
  <Alert
67
+ id="widget-no-result-alert"
67
68
  type={info.alert.type}
68
69
  title={info.alert.text}
69
70
  titleAlign={'left'}
@@ -24,6 +24,7 @@ export function NotificationContent() {
24
24
 
25
25
  return (
26
26
  <Notifications
27
+ id="widget-notifications-container"
27
28
  list={notifications}
28
29
  getBlockchainImage={(blockchain) =>
29
30
  getBlockchainImage(blockchain, blockchains)
@@ -226,6 +226,7 @@ export function Quote(props: QuoteProps) {
226
226
  variant="alarm"
227
227
  type={stepHasError ? 'error' : 'warning'}
228
228
  title={alertTitle}
229
+ id="widget-quote-footer-step-alarm-alert"
229
230
  footer={
230
231
  <FooterAlert>
231
232
  {hasBridgeLimitError && (
@@ -336,12 +337,13 @@ export function Quote(props: QuoteProps) {
336
337
  tooltipContainer={getExpanded()}
337
338
  steps={steps}
338
339
  tags={sortedQuoteTags}
340
+ id="widget-quote-full-expanded-quote-container"
339
341
  quoteCost={
340
342
  <QuoteCostDetails
341
343
  quote={quote}
342
344
  fullExpandedMode
343
345
  time={totalTime}
344
- fee={fee}
346
+ fee={totalFee}
345
347
  feeWarning={feeWarning}
346
348
  timeWarning={timeWarning}
347
349
  showModalFee={showModalFee}
@@ -359,6 +361,7 @@ export function Quote(props: QuoteProps) {
359
361
  />
360
362
  ) : (
361
363
  <SummaryContainer
364
+ id="widget-quote-summary-container"
362
365
  selected={selected}
363
366
  listItem={type === 'list-item'}
364
367
  basic={type === 'basic'}>
@@ -384,7 +387,7 @@ export function Quote(props: QuoteProps) {
384
387
  <QuoteCostDetails
385
388
  quote={quote}
386
389
  time={totalTime}
387
- fee={fee}
390
+ fee={totalFee}
388
391
  feeWarning={feeWarning}
389
392
  timeWarning={timeWarning}
390
393
  showModalFee={showModalFee}
@@ -397,6 +400,7 @@ export function Quote(props: QuoteProps) {
397
400
  e.stopPropagation();
398
401
  onClickAllRoutes();
399
402
  }}
403
+ id="widget-quote-all-routes-btn"
400
404
  size="xxsmall"
401
405
  type="secondary"
402
406
  variant="default"
@@ -447,6 +451,7 @@ export function Quote(props: QuoteProps) {
447
451
  )}
448
452
  {type === 'list-item' && (
449
453
  <TokenAmount
454
+ id="widget-quote-token-amount-container"
450
455
  tooltipContainer={container}
451
456
  type="output"
452
457
  direction="vertical"
@@ -500,6 +505,7 @@ export function Quote(props: QuoteProps) {
500
505
  return (
501
506
  <StepDetails
502
507
  type="quote-details"
508
+ className="widget-quote-step-details-container"
503
509
  key={key}
504
510
  tooltipContainer={container}
505
511
  step={step}
@@ -1,5 +1,6 @@
1
1
  import type { QuoteError, QuoteWarning, SelectedQuote } from '../../types';
2
2
  import type { Step } from '@rango-dev/ui';
3
+ import type BigNumber from 'bignumber.js';
3
4
  import type { ReactNode } from 'react';
4
5
 
5
6
  export type QuoteProps = {
@@ -45,7 +46,7 @@ export type QuoteTriggerImagesProps = {
45
46
  export type QuoteCostDetailsProps = {
46
47
  quote: SelectedQuote | null;
47
48
  steps: number;
48
- fee: string;
49
+ fee: BigNumber;
49
50
  time: string;
50
51
  feeWarning?: boolean;
51
52
  timeWarning?: boolean;
@@ -71,6 +71,11 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
71
71
  const container = fullExpandedMode ? getExpanded() : getContainer();
72
72
 
73
73
  const feesGroup = getFeesGroup(swaps);
74
+ const roundedFee = numberToString(
75
+ fee,
76
+ GAS_FEE_MIN_DECIMALS,
77
+ GAS_FEE_MAX_DECIMALS
78
+ );
74
79
 
75
80
  return (
76
81
  <>
@@ -83,7 +88,7 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
83
88
  }
84
89
  : undefined
85
90
  }
86
- fee={fee}
91
+ fee={roundedFee}
87
92
  feeWarning={feeWarning}
88
93
  timeWarning={timeWarning}
89
94
  time={time}
@@ -93,6 +98,7 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
93
98
  />
94
99
 
95
100
  <WatermarkedModal
101
+ id="widget-quote-cost-explanation-modal"
96
102
  container={container}
97
103
  open={open}
98
104
  anchor={fullExpandedMode ? 'center' : 'bottom'}
@@ -145,7 +151,7 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
145
151
  fee.amount,
146
152
  GAS_FEE_MIN_DECIMALS,
147
153
  GAS_FEE_MAX_DECIMALS
148
- )}{' '}
154
+ )}
149
155
  {fee.asset.symbol} ($
150
156
  {numberToString(
151
157
  usdValue,
@@ -174,7 +180,7 @@ export function QuoteCostDetails(props: QuoteCostDetailsProps) {
174
180
  </Typography>
175
181
  </FeeSection>
176
182
  <Line />
177
- {Object.keys(feesGroup.nonePayable).length && (
183
+ {!!Object.keys(feesGroup.nonePayable).length && (
178
184
  <CustomCollapsible
179
185
  triggerAnchor="bottom"
180
186
  onClickTrigger={() => setOpenCollapse((prev) => !prev)}
@@ -23,6 +23,7 @@ export function QuoteSummary(props: PropTypes) {
23
23
  <TokenAmount
24
24
  direction="horizontal"
25
25
  label={i18n.t('Swap input')}
26
+ id="widget-quote-summary-swap-input"
26
27
  type="input"
27
28
  tooltipContainer={getContainer()}
28
29
  price={{
@@ -39,6 +40,7 @@ export function QuoteSummary(props: PropTypes) {
39
40
  />
40
41
  <div className={separatorStyles()} />
41
42
  <TokenAmount
43
+ id="widget-quote-summary-estimated-input"
42
44
  direction="horizontal"
43
45
  tooltipContainer={getContainer()}
44
46
  label={i18n.t('Estimated output')}
@@ -53,6 +53,7 @@ export function QuoteTrigger(props: QuoteTriggerProps) {
53
53
 
54
54
  return (
55
55
  <Trigger
56
+ className="widget-quote-trigger-btn"
56
57
  listItem={type === 'list-item'}
57
58
  ref={(ref) => (quoteRef.current = ref)}
58
59
  selected={selected}
@@ -76,6 +76,7 @@ export function HighValueLossWarningModal(props: Props) {
76
76
 
77
77
  return (
78
78
  <WatermarkedModal
79
+ id="widget-high-value-loss-warning-modal"
79
80
  footer={
80
81
  <Button
81
82
  id="widget-high-value-loss-warning-modal-confirm-btn"
@@ -88,6 +88,7 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
88
88
  <Alerts>
89
89
  <Divider size={10} />
90
90
  <Alert
91
+ id="widget-quote-warning-and-errors-alert"
91
92
  title={alertInfo.title}
92
93
  type={alertInfo.alertType}
93
94
  variant="alarm"
@@ -29,6 +29,7 @@ export function SlippageWarningModal(props: PropsTypes) {
29
29
 
30
30
  return (
31
31
  <WatermarkedModal
32
+ id="widget-slippage-warning-modal"
32
33
  anchor="bottom"
33
34
  open={open}
34
35
  container={getContainer()}
@@ -19,6 +19,7 @@ export function UnknownPriceWarningModal(props: Props) {
19
19
  const { open, onClose, onConfirm, confirmationDisabled } = props;
20
20
  return (
21
21
  <WatermarkedModal
22
+ id="widget-unknown-price-warning-modal"
22
23
  footer={
23
24
  <Button
24
25
  id="widget-unknown-price-warning-modal-confirm-btn"
@@ -108,6 +108,7 @@ export function Quotes(props: PropTypes) {
108
108
  return (
109
109
  <React.Fragment key={quote.requestId}>
110
110
  <QuoteInfo
111
+ id="widget-quotes-quote-info-container"
111
112
  showModalFee={showModalFee}
112
113
  container={container}
113
114
  selected={selectedQuote?.requestId === quote.requestId}
@@ -37,6 +37,7 @@ export function SelectStrategy(props: { container: HTMLElement }) {
37
37
  return (
38
38
  <SelectContainer>
39
39
  <Select
40
+ id={'widget-quotes-strategy-select'}
40
41
  container={props.container}
41
42
  options={ROUTE_STRATEGY}
42
43
  value={sortStrategy}
@@ -17,6 +17,7 @@ export function RefreshModal(props: PropTypes) {
17
17
  open={open}
18
18
  dismissible
19
19
  onClose={onClose}
20
+ id="widget-refresh-modal"
20
21
  container={getContainer()}>
21
22
  <MessageBox
22
23
  title={i18n.t('Something went wrong')}
@@ -25,6 +26,7 @@ export function RefreshModal(props: PropTypes) {
25
26
  <Divider size={30} />
26
27
  <RefreshButton
27
28
  variant="outlined"
29
+ id="widget-refresh-modal-refresh-btn"
28
30
  size="large"
29
31
  type="primary"
30
32
  fullWidth
@@ -16,12 +16,16 @@ export function SearchInput(props: PropTypes) {
16
16
  style,
17
17
  setValue,
18
18
  suffix,
19
+ id,
19
20
  ...inputAttributes
20
21
  } = props;
21
22
 
22
23
  let inputSuffix = !!value.length ? (
23
- // eslint-disable-next-line jsx-id-attribute-enforcement/missing-ids
24
- <IconButton variant="ghost" onClick={() => setValue?.('')} size="small">
24
+ <IconButton
25
+ id={`${id}۰icon-btn`}
26
+ variant="ghost"
27
+ onClick={() => setValue?.('')}
28
+ size="small">
25
29
  <CloseIcon color="gray" size={10} />
26
30
  </IconButton>
27
31
  ) : null;
@@ -37,6 +41,7 @@ export function SearchInput(props: PropTypes) {
37
41
  <SearchIcon color="black" />
38
42
  </IconWrapper>
39
43
  }
44
+ id={id}
40
45
  suffix={inputSuffix}
41
46
  fullWidth={fullWidth}
42
47
  color={color}
@@ -84,6 +84,7 @@ export function Slippage() {
84
84
  const key = `slippage-${index}`;
85
85
  return (
86
86
  <SlippageChip
87
+ id={`widget-slippage-chip-${slippageItem.toString()}%-btn`}
87
88
  key={key}
88
89
  onClick={() => onClickSlippageChip(slippageItem)}
89
90
  selected={customSlippage === null && slippageItem === slippage}
@@ -100,6 +101,7 @@ export function Slippage() {
100
101
  min="0.01"
101
102
  max="30"
102
103
  step="0.01"
104
+ id="widget-slippage-chip-text-input"
103
105
  onInput={onInput}
104
106
  fullWidth
105
107
  variant="contained"
@@ -122,6 +124,7 @@ export function Slippage() {
122
124
  <>
123
125
  <Divider size={10} />
124
126
  <Alert
127
+ id="widget-slippage-alert"
125
128
  variant="alarm"
126
129
  type={slippageValidation.type}
127
130
  title={slippageValidation.message}
@@ -31,6 +31,7 @@ const DELAY_SHOWING_MODAL_FOR = 300;
31
31
 
32
32
  interface PropTypes {
33
33
  wallet: WalletInfoWithExtra | undefined;
34
+ id: string;
34
35
  onClose: () => void;
35
36
  // When connecting wallet is executed **successfully**, this will be called afterwards.
36
37
  onConnect?: () => void;
@@ -155,6 +156,7 @@ export function StatefulConnectModal(props: PropTypes) {
155
156
 
156
157
  return (
157
158
  <WatermarkedModal
159
+ id={props.id}
158
160
  open={isConnecting}
159
161
  onClose={handleClosingModal}
160
162
  onExit={() => {
@@ -314,7 +314,7 @@ export function SwapDetails(props: SwapDetailsProps) {
314
314
  </Button>
315
315
  )
316
316
  }>
317
- <Container compact ref={containerRef}>
317
+ <Container compact ref={containerRef} id="widget-swap-details-container">
318
318
  <RequestIdContainer className={rowStyles()}>
319
319
  <Typography variant="label" size="large" color="neutral700">
320
320
  {`${i18n.t('Request ID')}`}
@@ -443,6 +443,7 @@ export function SwapDetails(props: SwapDetailsProps) {
443
443
  (state === 'completed' && index === steps.length - 1);
444
444
  return (
445
445
  <StepDetails
446
+ className={'widget-swap-details-step-item-container'}
446
447
  key={key}
447
448
  step={step}
448
449
  type="swap-progress"
@@ -13,6 +13,7 @@ export function FailedAlert(props: FailedAlertsProps) {
13
13
 
14
14
  return (
15
15
  <Alert
16
+ id="widget-failed-swap-details-alert"
16
17
  type="error"
17
18
  title={message.shortMessage}
18
19
  containerStyles={{
@@ -23,6 +24,7 @@ export function FailedAlert(props: FailedAlertsProps) {
23
24
  action={
24
25
  message.detailedMessage.content && (
25
26
  <IconButton
27
+ id="widget-swap-details-failed-btn"
26
28
  onClick={() => setShowContentError((prev) => !prev)}
27
29
  variant="ghost"
28
30
  size="xsmall">