@rango-dev/widget-embedded 0.25.1-next.3 → 0.25.1-next.5
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/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/CustomCollapsible/CustomCollapsible.styles.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwitchFromAndTo/SwitchFromAndTo.d.ts.map +1 -0
- package/dist/components/SwitchFromAndTo/SwitchFromAndTo.styles.d.ts +326 -0
- package/dist/components/SwitchFromAndTo/SwitchFromAndTo.styles.d.ts.map +1 -0
- package/dist/components/SwitchFromAndTo/index.d.ts +2 -0
- package/dist/components/SwitchFromAndTo/index.d.ts.map +1 -0
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +162 -0
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/store/quote.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +3 -2
- package/src/components/CustomCollapsible/CustomCollapsible.styles.ts +1 -0
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +4 -0
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
- package/src/components/RefreshModal/RefreshModal.tsx +2 -2
- package/src/components/SwapDetails/SwapDetails.styles.ts +1 -1
- package/src/components/SwapDetails/SwapDetails.tsx +9 -7
- package/src/components/SwitchFromAndTo/SwitchFromAndTo.styles.ts +48 -0
- package/src/components/SwitchFromAndTo/SwitchFromAndTo.tsx +32 -0
- package/src/components/SwitchFromAndTo/index.ts +1 -0
- package/src/components/TokenList/TokenList.styles.ts +7 -0
- package/src/components/TokenList/TokenList.tsx +9 -7
- package/src/pages/ConfirmSwapPage.tsx +1 -17
- package/src/pages/Home.tsx +1 -0
- package/src/store/quote.ts +3 -4
- package/dist/components/SwitchFromAndTo.d.ts.map +0 -1
- package/src/components/SwitchFromAndTo.tsx +0 -42
- /package/dist/components/{SwitchFromAndTo.d.ts → SwitchFromAndTo/SwitchFromAndTo.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAiD5E,wBAAgB,eAAe,sBA2T9B"}
|
package/dist/pages/Home.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA4BnD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,wBAAgB,IAAI,
|
|
1
|
+
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA4BnD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,wBAAgB,IAAI,sBA0MnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../src/store/quote.ts"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AAK,IAAI;mCACzB,cAAc,KAAK,IAAI;6GAIvC,IAAI;uCACgB,MAAM,KAAK,IAAI;wCACd,aAAa,GAAG,IAAI,KAAK,IAAI;mCAClC,WAAW,QAAQ,IAAI,KAAK,IAAI;qCAC9B,IAAI;8CACK,OAAO,KAAK,IAAI;4CAClB,MAAM,EAAE,KAAK,IAAI;8CACf,MAAM,GAAG,IAAI,KAAK,IAAI;uCAC7B,IAAI;gDACK,OAAO,KAAK,IAAI;;CA4MnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.25.1-next.
|
|
3
|
+
"version": "0.25.1-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@lingui/core": "4.2.1",
|
|
26
26
|
"@lingui/react": "4.2.1",
|
|
27
27
|
"@rango-dev/logging-core": "^0.2.0",
|
|
28
|
-
"@rango-dev/provider-all": "^0.30.1-next.
|
|
28
|
+
"@rango-dev/provider-all": "^0.30.1-next.3",
|
|
29
29
|
"@rango-dev/queue-manager-core": "^0.26.0",
|
|
30
|
-
"@rango-dev/queue-manager-rango-preset": "^0.30.1-next.
|
|
30
|
+
"@rango-dev/queue-manager-rango-preset": "^0.30.1-next.1",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.26.0",
|
|
32
32
|
"@rango-dev/ui": "^0.31.1-next.0",
|
|
33
33
|
"@rango-dev/wallets-react": "^0.16.1-next.0",
|
|
@@ -52,4 +52,4 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|
|
@@ -104,7 +104,7 @@ export const CustomDestination = styled('div', {
|
|
|
104
104
|
backgroundColor: '$neutral100',
|
|
105
105
|
},
|
|
106
106
|
'& .collapsible_root': {
|
|
107
|
-
backgroundColor: '$
|
|
107
|
+
backgroundColor: '$neutral100',
|
|
108
108
|
},
|
|
109
109
|
});
|
|
110
110
|
|
|
@@ -135,7 +135,8 @@ export const CustomDestinationButton = styled('div', {
|
|
|
135
135
|
$$color: '$colors$neutral300',
|
|
136
136
|
},
|
|
137
137
|
backgroundColor: '$$color',
|
|
138
|
-
|
|
138
|
+
borderBottomRightRadius: '0',
|
|
139
|
+
borderBottomLeftRadius: '0',
|
|
139
140
|
'&:hover': {
|
|
140
141
|
$$color: '$colors$info100',
|
|
141
142
|
[`.${darkTheme} &`]: {
|
|
@@ -17,6 +17,7 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
|
|
|
17
17
|
const {
|
|
18
18
|
warning,
|
|
19
19
|
error,
|
|
20
|
+
couldChangeSettings,
|
|
20
21
|
showWarningModal,
|
|
21
22
|
confirmationDisabled,
|
|
22
23
|
refetchQuote,
|
|
@@ -44,6 +45,9 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
|
|
|
44
45
|
? error
|
|
45
46
|
: null
|
|
46
47
|
);
|
|
48
|
+
if (alertInfo && !couldChangeSettings) {
|
|
49
|
+
alertInfo.action = null;
|
|
50
|
+
}
|
|
47
51
|
|
|
48
52
|
const showAlerts = !!alertInfo;
|
|
49
53
|
|
|
@@ -19,9 +19,9 @@ export function RefreshModal(props: PropTypes) {
|
|
|
19
19
|
onClose={onClose}
|
|
20
20
|
container={getContainer()}>
|
|
21
21
|
<MessageBox
|
|
22
|
-
title={i18n.t('Something wrong')}
|
|
22
|
+
title={i18n.t('Something went wrong')}
|
|
23
23
|
type="error"
|
|
24
|
-
description={i18n.t('Something
|
|
24
|
+
description={i18n.t('Something went wrong. Please refresh the app.')}>
|
|
25
25
|
<Divider size={30} />
|
|
26
26
|
<RefreshButton
|
|
27
27
|
variant="outlined"
|
|
@@ -253,13 +253,15 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
253
253
|
})}`
|
|
254
254
|
: ''}
|
|
255
255
|
</Typography>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
256
|
+
{stepDetailMessage && (
|
|
257
|
+
<MessageText
|
|
258
|
+
align="center"
|
|
259
|
+
variant="body"
|
|
260
|
+
size="medium"
|
|
261
|
+
color="neutral700">
|
|
262
|
+
<b>Reason:</b> {stepDetailMessage}
|
|
263
|
+
</MessageText>
|
|
264
|
+
)}
|
|
263
265
|
</ErrorMessages>
|
|
264
266
|
);
|
|
265
267
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { keyframes, styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const ROTATE_ANIMATION_DURATION = 450;
|
|
4
|
+
|
|
5
|
+
const rotateAnimation = keyframes({
|
|
6
|
+
'0%': {
|
|
7
|
+
transform: 'rotateX(0deg) rotateY(0deg) rotateZ(0deg)',
|
|
8
|
+
},
|
|
9
|
+
'33%': {
|
|
10
|
+
transform: 'rotateX(0deg) rotateZ(78deg) rotateY(66deg)',
|
|
11
|
+
},
|
|
12
|
+
'66%': {
|
|
13
|
+
transform: 'rotateX(0deg) rotateZ(163deg) rotateY(66deg)',
|
|
14
|
+
},
|
|
15
|
+
'100%': {
|
|
16
|
+
transform: 'rotateX(0deg) rotateZ(180deg) rotateY(0deg)',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const SwitchButtonContainer = styled('div', {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
bottom: '-12px',
|
|
23
|
+
left: '50%',
|
|
24
|
+
transform: 'translate(-50%, 10%)',
|
|
25
|
+
cursor: 'pointer',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const StyledButton = styled('div', {
|
|
29
|
+
borderRadius: '$md',
|
|
30
|
+
border: '3px solid $background',
|
|
31
|
+
background: '$neutral100',
|
|
32
|
+
width: '$24',
|
|
33
|
+
height: '$24',
|
|
34
|
+
display: 'flex',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
color: '$foreground',
|
|
38
|
+
'&.rotate': {
|
|
39
|
+
'& svg': {
|
|
40
|
+
animation: `${rotateAnimation} ${ROTATE_ANIMATION_DURATION}ms ease-in-out forwards`,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'&:hover': {
|
|
44
|
+
color: '$secondary500',
|
|
45
|
+
transform: 'translateY(1px) scale(1.04)',
|
|
46
|
+
boxShadow: '1px 1px 1px 1px rgba(0, 0, 0, 0.05)',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReverseIcon } from '@rango-dev/ui';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { useQuoteStore } from '../../store/quote';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
ROTATE_ANIMATION_DURATION,
|
|
8
|
+
StyledButton,
|
|
9
|
+
SwitchButtonContainer,
|
|
10
|
+
} from './SwitchFromAndTo.styles';
|
|
11
|
+
|
|
12
|
+
export function SwitchFromAndToButton() {
|
|
13
|
+
const switchFromAndTo = useQuoteStore.use.switchFromAndTo();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<SwitchButtonContainer>
|
|
17
|
+
<StyledButton
|
|
18
|
+
onClick={(event) => {
|
|
19
|
+
const button = event.currentTarget;
|
|
20
|
+
|
|
21
|
+
button.classList.add('rotate');
|
|
22
|
+
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
button.classList.remove('rotate');
|
|
25
|
+
}, ROTATE_ANIMATION_DURATION);
|
|
26
|
+
switchFromAndTo();
|
|
27
|
+
}}>
|
|
28
|
+
<ReverseIcon size={12} />
|
|
29
|
+
</StyledButton>
|
|
30
|
+
</SwitchButtonContainer>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SwitchFromAndToButton } from './SwitchFromAndTo';
|
|
@@ -30,6 +30,7 @@ export const tokenTitleStyles = css({
|
|
|
30
30
|
export const tokenAddressStyles = css({
|
|
31
31
|
transform: 'translateY(12px)',
|
|
32
32
|
visibility: 'hidden',
|
|
33
|
+
display: 'flex',
|
|
33
34
|
'& a': {
|
|
34
35
|
display: 'flex',
|
|
35
36
|
justifyContent: 'center',
|
|
@@ -157,3 +158,9 @@ export const TokenBalance = styled(Typography, {
|
|
|
157
158
|
textOverflow: 'ellipsis',
|
|
158
159
|
whiteSpace: 'nowrap',
|
|
159
160
|
});
|
|
161
|
+
|
|
162
|
+
export const StyledLink = styled('a', {
|
|
163
|
+
'& svg:hover': {
|
|
164
|
+
color: '$colors$info',
|
|
165
|
+
},
|
|
166
|
+
});
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
ImageSection,
|
|
32
32
|
List,
|
|
33
33
|
Pin,
|
|
34
|
+
StyledLink,
|
|
34
35
|
Tag,
|
|
35
36
|
TagTitle,
|
|
36
37
|
Title,
|
|
@@ -72,17 +73,17 @@ const renderDesc = (props: RenderDescProps) => {
|
|
|
72
73
|
className={`${tokenAddressStyles()} ${
|
|
73
74
|
!name && tokenWithoutNameStyles()
|
|
74
75
|
}`}>
|
|
75
|
-
|
|
76
|
+
{length > 10
|
|
77
|
+
? `${address.slice(0, 5)}...${address.slice(length - 6, length)}`
|
|
78
|
+
: address}{' '}
|
|
79
|
+
<Divider size={4} direction="horizontal" />
|
|
80
|
+
<StyledLink
|
|
76
81
|
href={url}
|
|
77
82
|
target="_blank"
|
|
78
83
|
rel="nofollow noreferrer"
|
|
79
84
|
onClick={(e) => e.stopPropagation()}>
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
: address}{' '}
|
|
83
|
-
<Divider size={4} direction="horizontal" />
|
|
84
|
-
<ExternalLinkIcon color="gray" size={12} />
|
|
85
|
-
</a>
|
|
85
|
+
<ExternalLinkIcon size={12} />
|
|
86
|
+
</StyledLink>
|
|
86
87
|
</div>
|
|
87
88
|
)}
|
|
88
89
|
</div>
|
|
@@ -164,6 +165,7 @@ export function TokenList(props: PropTypes) {
|
|
|
164
165
|
style={{
|
|
165
166
|
width: '100%',
|
|
166
167
|
overflow: 'hidden',
|
|
168
|
+
height: '60px',
|
|
167
169
|
}}
|
|
168
170
|
tab-index={index}
|
|
169
171
|
key={`${token.symbol}${token.address}`}
|
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
css,
|
|
13
13
|
Divider,
|
|
14
14
|
IconButton,
|
|
15
|
-
SettingsIcon,
|
|
16
15
|
styled,
|
|
17
|
-
Tooltip,
|
|
18
16
|
Typography,
|
|
19
17
|
WalletIcon,
|
|
20
18
|
} from '@rango-dev/ui';
|
|
@@ -24,7 +22,6 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
|
|
24
22
|
|
|
25
23
|
import { getRequiredWallets } from '../components/ConfirmWalletsModal/ConfirmWallets.helpers';
|
|
26
24
|
import { ConfirmWalletsModal } from '../components/ConfirmWalletsModal/ConfirmWalletsModal';
|
|
27
|
-
import { HeaderButton } from '../components/HeaderButtons/HeaderButtons.styles';
|
|
28
25
|
import { RefreshButton } from '../components/HeaderButtons/RefreshButton';
|
|
29
26
|
import { Layout, PageContainer } from '../components/Layout';
|
|
30
27
|
import { QuoteWarningsAndErrors } from '../components/QuoteWarningsAndErrors';
|
|
@@ -37,7 +34,6 @@ import { useQuoteStore } from '../store/quote';
|
|
|
37
34
|
import { useUiStore } from '../store/ui';
|
|
38
35
|
import { useWalletsStore } from '../store/wallets';
|
|
39
36
|
import { QuoteWarningType } from '../types';
|
|
40
|
-
import { getContainer } from '../utils/common';
|
|
41
37
|
import { joinList } from '../utils/ui';
|
|
42
38
|
|
|
43
39
|
const Buttons = styled('div', {
|
|
@@ -285,6 +281,7 @@ export function ConfirmSwapPage() {
|
|
|
285
281
|
<QuoteWarningsAndErrors
|
|
286
282
|
warning={quoteWarning}
|
|
287
283
|
error={quoteError}
|
|
284
|
+
couldChangeSettings={false}
|
|
288
285
|
refetchQuote={onRefresh}
|
|
289
286
|
showWarningModal={showQuoteWarningModal}
|
|
290
287
|
confirmationDisabled={!isActiveTab}
|
|
@@ -307,19 +304,6 @@ export function ConfirmSwapPage() {
|
|
|
307
304
|
const wallets_url = `../${navigationRoutes.wallets}`;
|
|
308
305
|
navigate(wallets_url);
|
|
309
306
|
},
|
|
310
|
-
suffix: (
|
|
311
|
-
<Tooltip
|
|
312
|
-
container={getContainer()}
|
|
313
|
-
side="bottom"
|
|
314
|
-
content={i18n.t('Settings')}>
|
|
315
|
-
<HeaderButton
|
|
316
|
-
size="small"
|
|
317
|
-
variant="ghost"
|
|
318
|
-
onClick={() => navigate('../' + navigationRoutes.settings)}>
|
|
319
|
-
<SettingsIcon size={18} color="black" />
|
|
320
|
-
</HeaderButton>
|
|
321
|
-
</Tooltip>
|
|
322
|
-
),
|
|
323
307
|
}}
|
|
324
308
|
footer={
|
|
325
309
|
<Buttons>
|
package/src/pages/Home.tsx
CHANGED
package/src/store/quote.ts
CHANGED
|
@@ -247,10 +247,9 @@ export const useQuoteStore = createSelectors(
|
|
|
247
247
|
toBlockchain: state.fromBlockchain,
|
|
248
248
|
toToken: state.fromToken,
|
|
249
249
|
inputAmount: state.outputAmount?.toString() || '',
|
|
250
|
-
inputUsdValue:
|
|
251
|
-
state.toToken,
|
|
252
|
-
|
|
253
|
-
),
|
|
250
|
+
inputUsdValue: state.toToken
|
|
251
|
+
? getUsdValue(state.toToken, state.outputAmount?.toString() || '')
|
|
252
|
+
: new BigNumber(0),
|
|
254
253
|
})),
|
|
255
254
|
resetFromBlockchain: () =>
|
|
256
255
|
set(() => ({
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchFromAndTo.d.ts","sourceRoot":"","sources":["../../src/components/SwitchFromAndTo.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B,wBAAgB,qBAAqB,sBAapC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ReverseIcon, styled } from '@rango-dev/ui';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { useQuoteStore } from '../store/quote';
|
|
5
|
-
|
|
6
|
-
const SwitchButtonContainer = styled('div', {
|
|
7
|
-
position: 'absolute',
|
|
8
|
-
bottom: '-12px',
|
|
9
|
-
left: '50%',
|
|
10
|
-
transform: 'translate(-50%, 10%)',
|
|
11
|
-
cursor: 'pointer',
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const StyledButton = styled('div', {
|
|
15
|
-
borderRadius: '$md',
|
|
16
|
-
border: '3px solid $background',
|
|
17
|
-
background: '$neutral100',
|
|
18
|
-
width: '$24',
|
|
19
|
-
height: '$24',
|
|
20
|
-
display: 'flex',
|
|
21
|
-
justifyContent: 'center',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
color: '$foreground',
|
|
24
|
-
'&:hover': {
|
|
25
|
-
color: '$secondary500',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function SwitchFromAndToButton() {
|
|
30
|
-
const switchFromAndTo = useQuoteStore.use.switchFromAndTo();
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<SwitchButtonContainer>
|
|
34
|
-
<StyledButton
|
|
35
|
-
onClick={() => {
|
|
36
|
-
switchFromAndTo();
|
|
37
|
-
}}>
|
|
38
|
-
<ReverseIcon size={12} />
|
|
39
|
-
</StyledButton>
|
|
40
|
-
</SwitchButtonContainer>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
File without changes
|