@rango-dev/widget-embedded 0.43.1-next.3 → 0.43.1-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BlockchainList/BlockchainList.d.ts.map +1 -1
- package/dist/components/BlockchainSelectorButton/BlockchainSelectorButton.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/CustomDestination/CustomDestination.d.ts.map +1 -1
- package/dist/components/CustomDestination/CustomDestination.styles.d.ts +1 -0
- package/dist/components/CustomDestination/CustomDestination.styles.d.ts.map +1 -1
- package/dist/components/CustomTokenModal/CustomTokenModal.d.ts.map +1 -1
- package/dist/components/FilterSelector/FilterSelectorContent.d.ts.map +1 -1
- package/dist/components/HeaderButtons/NotificationsBadge.d.ts.map +1 -1
- package/dist/components/HistoryGroupedList/HistoryGroupedList.d.ts.map +1 -1
- package/dist/components/NoResult/NoResult.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/QuoteCostDetails.d.ts.map +1 -1
- package/dist/components/Quote/QuoteSummary.d.ts.map +1 -1
- package/dist/components/Quote/QuoteTrigger.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts.map +1 -1
- package/dist/components/Quotes/Quotes.d.ts.map +1 -1
- package/dist/components/Quotes/SelectStrategy.d.ts.map +1 -1
- package/dist/components/RefreshModal/RefreshModal.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts +1 -0
- package/dist/components/StatefulConnectModal/StatefulConnectModal.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -1
- package/dist/components/SwitchFromAndTo/SwitchFromAndTo.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/DerivationPath.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts +1 -0
- package/dist/components/WalletStatefulConnect/ExperimentalChain.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/NamespaceDetachedItem.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/NamespaceListItem.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/Namespaces.d.ts.map +1 -1
- package/dist/components/common/ActivateTabModal/ActivateTabModal.d.ts.map +1 -1
- package/dist/containers/Inputs/Inputs.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +1 -0
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
- package/dist/containers/Settings/Lists.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/pages/AddCustomTokenPage.d.ts.map +1 -1
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/CustomTokensPage.d.ts.map +1 -1
- package/dist/pages/HistoryPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/LanguagePage.d.ts.map +1 -1
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemPage/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +2 -2
- package/src/components/BlockchainList/BlockchainList.tsx +4 -1
- package/src/components/BlockchainList/LoadingBlockchainList.tsx +1 -1
- package/src/components/BlockchainSelectorButton/BlockchainSelectorButton.tsx +2 -1
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +8 -2
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +8 -1
- package/src/components/ConfirmWalletsModal/WalletList.tsx +9 -1
- package/src/components/CustomDestination/CustomDestination.tsx +2 -1
- package/src/components/CustomTokenModal/CustomTokenModal.tsx +1 -0
- package/src/components/FilterSelector/FilterSelectorContent.tsx +1 -0
- package/src/components/HeaderButtons/InProgressTransactionBadge.tsx +1 -1
- package/src/components/HeaderButtons/NotificationsBadge.tsx +5 -1
- package/src/components/HistoryGroupedList/HistoryGroupedList.tsx +1 -0
- package/src/components/ImportCustomToken/ImportCustomToken.tsx +1 -1
- package/src/components/NoResult/NoResult.tsx +2 -1
- package/src/components/NotificationContent/NotificationContent.tsx +1 -0
- package/src/components/Quote/Quote.tsx +6 -0
- package/src/components/Quote/QuoteCostDetails.tsx +1 -0
- package/src/components/Quote/QuoteSummary.tsx +2 -0
- package/src/components/Quote/QuoteTrigger.tsx +1 -0
- package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +1 -0
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +1 -0
- package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +1 -0
- package/src/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.tsx +1 -0
- package/src/components/Quotes/Quotes.tsx +1 -0
- package/src/components/Quotes/SelectStrategy.tsx +1 -0
- package/src/components/RefreshModal/RefreshModal.tsx +2 -0
- package/src/components/SearchInput/SearchInput.tsx +7 -2
- package/src/components/Slippage/Slippage.tsx +3 -0
- package/src/components/StatefulConnectModal/StatefulConnectModal.tsx +2 -0
- package/src/components/SwapDetails/SwapDetails.tsx +2 -1
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.tsx +2 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +9 -1
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.tsx +8 -1
- package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +2 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +1 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -0
- package/src/components/SwitchFromAndTo/SwitchFromAndTo.tsx +1 -0
- package/src/components/WalletStatefulConnect/DerivationPath.tsx +2 -0
- package/src/components/WalletStatefulConnect/Detached.tsx +1 -1
- package/src/components/WalletStatefulConnect/ExperimentalChain.tsx +3 -1
- package/src/components/WalletStatefulConnect/NamespaceDetachedItem.tsx +3 -2
- package/src/components/WalletStatefulConnect/NamespaceListItem.tsx +4 -1
- package/src/components/WalletStatefulConnect/Namespaces.tsx +1 -0
- package/src/components/WalletStatefulConnect/SupportedChainsList.tsx +1 -1
- package/src/components/common/ActivateTabModal/ActivateTabModal.tsx +1 -0
- package/src/containers/ExpandedQuotes/ExpandedQuotes.tsx +1 -1
- package/src/containers/Inputs/Inputs.tsx +2 -0
- package/src/containers/QuoteInfo/QuoteInfo.tsx +2 -1
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +1 -0
- package/src/containers/Settings/Lists.tsx +13 -3
- package/src/pages/AddCustomTokenPage.tsx +7 -1
- package/src/pages/ConfirmSwapPage.tsx +9 -1
- package/src/pages/CustomTokensPage.tsx +2 -0
- package/src/pages/HistoryPage.tsx +2 -0
- package/src/pages/Home.tsx +1 -0
- package/src/pages/LanguagePage.tsx +2 -0
- package/src/pages/LiquiditySourcePage.tsx +6 -1
- package/src/pages/SelectBlockchainPage.tsx +1 -0
- package/src/pages/SelectSwapItemPage/SelectSwapItemsPage.tsx +1 -0
- package/src/pages/SettingsPage.tsx +1 -0
- package/src/pages/WalletsPage.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.43.1-next.
|
|
3
|
+
"version": "0.43.1-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@rango-dev/queue-manager-rango-preset": "^0.45.2-next.10",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.29.0",
|
|
32
32
|
"@rango-dev/signer-solana": "^0.39.1-next.3",
|
|
33
|
-
"@rango-dev/ui": "^0.46.2-next.
|
|
33
|
+
"@rango-dev/ui": "^0.46.2-next.12",
|
|
34
34
|
"@rango-dev/wallets-core": "^0.43.1-next.10",
|
|
35
35
|
"@rango-dev/wallets-react": "^0.30.2-next.11",
|
|
36
36
|
"@rango-dev/wallets-shared": "^0.44.2-next.12",
|
|
@@ -44,7 +44,10 @@ export function BlockchainList(props: PropTypes) {
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
return (
|
|
47
|
-
<List
|
|
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
|
|
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
|
|
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
|
)}
|
|
@@ -198,12 +198,14 @@ export function WalletList(props: PropTypes) {
|
|
|
198
198
|
<React.Fragment key={`${wallet.title}_${blockchainDisplayName}`}>
|
|
199
199
|
{!!experimentalChainWallet && (
|
|
200
200
|
<WatermarkedModal
|
|
201
|
+
id="widget-wallets-list-watermarked-modal"
|
|
201
202
|
open={!!experimentalChainWallet && showExperimentalChainModal}
|
|
202
203
|
container={modalContainer}
|
|
203
204
|
onClose={() => {
|
|
204
205
|
setExperimentalChainWallet(null);
|
|
205
206
|
}}>
|
|
206
207
|
<ExperimentalChain
|
|
208
|
+
id="widget-wallets-list-experimental-chain-container"
|
|
207
209
|
displayName={blockchainDisplayName}
|
|
208
210
|
onConfirm={() => {
|
|
209
211
|
void addExperimentalChain(experimentalChainWallet);
|
|
@@ -213,6 +215,7 @@ export function WalletList(props: PropTypes) {
|
|
|
213
215
|
)}
|
|
214
216
|
{addingExperimentalChainStatus && (
|
|
215
217
|
<WatermarkedModal
|
|
218
|
+
id="widget-wallets-list-experimental-chain-watermarked-modal"
|
|
216
219
|
open={!!addingExperimentalChainStatus}
|
|
217
220
|
onClose={setAddingExperimentalChainStatus.bind(null, null)}
|
|
218
221
|
container={modalContainer}>
|
|
@@ -226,6 +229,7 @@ export function WalletList(props: PropTypes) {
|
|
|
226
229
|
)}
|
|
227
230
|
<SelectableWallet
|
|
228
231
|
key={wallet.type}
|
|
232
|
+
id="widget-wallets-list-selectable-wallet-btn"
|
|
229
233
|
description={getWalletDescription()}
|
|
230
234
|
descriptionColor={getWalletDescriptionColor()}
|
|
231
235
|
onClick={onSelectableWalletClick}
|
|
@@ -237,6 +241,7 @@ export function WalletList(props: PropTypes) {
|
|
|
237
241
|
);
|
|
238
242
|
})}
|
|
239
243
|
<StatefulConnectModal
|
|
244
|
+
id="widget-wallets-list-stateful-connect-modal"
|
|
240
245
|
wallet={selectedWalletToConnect}
|
|
241
246
|
options={{ defaultSelectedChains: quoteChains || [chain] }}
|
|
242
247
|
onClose={() => {
|
|
@@ -257,7 +262,10 @@ export function WalletList(props: PropTypes) {
|
|
|
257
262
|
}}
|
|
258
263
|
/>
|
|
259
264
|
{shouldShowMoreWallets && (
|
|
260
|
-
<ShowMoreWallets
|
|
265
|
+
<ShowMoreWallets
|
|
266
|
+
selected={false}
|
|
267
|
+
onClick={onShowMore}
|
|
268
|
+
id="widget-wallets-list-show-more-wallets-btn">
|
|
261
269
|
<Typography variant="label" size="medium">
|
|
262
270
|
{i18n.t('Show more wallets')}
|
|
263
271
|
<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,
|
|
@@ -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
|
|
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'}
|
|
@@ -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,6 +337,7 @@ 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}
|
|
@@ -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'}>
|
|
@@ -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}
|
|
@@ -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')}
|
|
@@ -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}
|
|
@@ -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
|
-
|
|
24
|
-
|
|
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">
|
|
@@ -11,6 +11,7 @@ export function WarningAlert(props: WaningAlertsProps) {
|
|
|
11
11
|
return (
|
|
12
12
|
<Alert
|
|
13
13
|
type="warning"
|
|
14
|
+
id="widget-swap-details-change-network-alert"
|
|
14
15
|
title={message.shortMessage}
|
|
15
16
|
action={
|
|
16
17
|
<Button
|
|
@@ -36,6 +37,7 @@ export function WarningAlert(props: WaningAlertsProps) {
|
|
|
36
37
|
<Alert
|
|
37
38
|
type="warning"
|
|
38
39
|
title={message.shortMessage}
|
|
40
|
+
id="widget-swap-details-warning-alert-connect-wallet-alert"
|
|
39
41
|
action={
|
|
40
42
|
<Button
|
|
41
43
|
id="widget-swap-details-warning-alert-connect-wallet-btn"
|
|
@@ -53,5 +55,11 @@ export function WarningAlert(props: WaningAlertsProps) {
|
|
|
53
55
|
);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
return
|
|
58
|
+
return (
|
|
59
|
+
<Alert
|
|
60
|
+
id="widget-swap-details-short-alert"
|
|
61
|
+
type="warning"
|
|
62
|
+
title={message.shortMessage}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
57
65
|
}
|
|
@@ -40,6 +40,7 @@ export function SwapDetailsAlerts(props: SwapAlertsProps) {
|
|
|
40
40
|
return (
|
|
41
41
|
<Fragment key={key}>
|
|
42
42
|
<Alert
|
|
43
|
+
id="widget-swap-details-tx-alert"
|
|
43
44
|
type={
|
|
44
45
|
lastUrl
|
|
45
46
|
? (loading && 'loading') || (error && 'error') || 'success'
|
|
@@ -65,7 +66,13 @@ export function SwapDetailsAlerts(props: SwapAlertsProps) {
|
|
|
65
66
|
</Fragment>
|
|
66
67
|
);
|
|
67
68
|
})}
|
|
68
|
-
{waitingProgress &&
|
|
69
|
+
{waitingProgress && (
|
|
70
|
+
<Alert
|
|
71
|
+
id="widget-swap-details-loading-alert"
|
|
72
|
+
type="loading"
|
|
73
|
+
title={message.shortMessage}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
69
76
|
{step.status !== 'failed' && hasWarning && (
|
|
70
77
|
<WarningAlert
|
|
71
78
|
switchNetwork={switchNetwork}
|
|
@@ -44,6 +44,7 @@ export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
|
|
|
44
44
|
<WatermarkedModal
|
|
45
45
|
open={open}
|
|
46
46
|
onClose={onClose}
|
|
47
|
+
id="widget-swap-details-complete-modal"
|
|
47
48
|
container={
|
|
48
49
|
document.getElementById(WIDGET_UI_ID.SWAP_BOX_ID) || document.body
|
|
49
50
|
}>
|
|
@@ -52,6 +53,7 @@ export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
|
|
|
52
53
|
<TokenAmount
|
|
53
54
|
direction="vertical"
|
|
54
55
|
tooltipContainer={getContainer()}
|
|
56
|
+
id="widget-swap-details-complete-modal-success-token-amount-container"
|
|
55
57
|
type="output"
|
|
56
58
|
centerAlign={true}
|
|
57
59
|
price={{
|