@rango-dev/widget-embedded 0.20.1-next.8 → 0.20.1-next.9
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/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -1
- package/dist/components/Quote/QuoteSummary.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/utils/date.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +1 -1
- package/src/components/HeaderButtons/HeaderButtons.styles.ts +4 -1
- package/src/components/Quote/QuoteSummary.tsx +3 -2
- package/src/components/SwapsGroup/SwapsGroup.tsx +5 -5
- package/src/pages/LiquiditySourcePage.tsx +5 -2
- package/src/pages/SelectBlockchainPage.tsx +3 -3
- package/src/pages/SelectSwapItemsPage.tsx +5 -1
- package/src/utils/date.ts +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiquiditySourcePage.d.ts","sourceRoot":"","sources":["../../src/pages/LiquiditySourcePage.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAexC,UAAU,SAAS;IACjB,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"LiquiditySourcePage.d.ts","sourceRoot":"","sources":["../../src/pages/LiquiditySourcePage.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAexC,UAAU,SAAS;IACjB,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,EAAE,SAAS,qBAwH5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,qBAmGnD"}
|
package/dist/utils/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAMzE,eAAO,MAAM,gBAAgB,EAAE,OAmE9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -23,7 +23,10 @@ export const ConnectedIcon = styled('div', {
|
|
|
23
23
|
export const SuffixContainer = styled('div', {
|
|
24
24
|
display: 'flex',
|
|
25
25
|
justifyContent: 'flex-end',
|
|
26
|
-
|
|
26
|
+
minWidth: '$40',
|
|
27
|
+
button: {
|
|
28
|
+
padding: 0,
|
|
29
|
+
},
|
|
27
30
|
});
|
|
28
31
|
|
|
29
32
|
export const NotificationsBadgeContainer = styled('div', {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PriceImpactWarningLevel, Step } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
|
+
import { i18n } from '@lingui/core';
|
|
3
4
|
import { TokenAmount } from '@rango-dev/ui';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
|
|
@@ -21,7 +22,7 @@ export function QuoteSummary(props: PropTypes) {
|
|
|
21
22
|
<Container>
|
|
22
23
|
<TokenAmount
|
|
23
24
|
direction="horizontal"
|
|
24
|
-
label=
|
|
25
|
+
label={i18n.t('Swap input')}
|
|
25
26
|
type="input"
|
|
26
27
|
tooltipContainer={getContainer()}
|
|
27
28
|
price={{
|
|
@@ -39,8 +40,8 @@ export function QuoteSummary(props: PropTypes) {
|
|
|
39
40
|
<div className={separatorStyles()} />
|
|
40
41
|
<TokenAmount
|
|
41
42
|
direction="horizontal"
|
|
42
|
-
label="Estimated output"
|
|
43
43
|
tooltipContainer={getContainer()}
|
|
44
|
+
label={i18n.t('Estimated output')}
|
|
44
45
|
type="output"
|
|
45
46
|
price={{
|
|
46
47
|
value: to.price.value,
|
|
@@ -18,11 +18,11 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
18
18
|
|
|
19
19
|
const loadingGroups = [
|
|
20
20
|
{
|
|
21
|
-
title: 'Today',
|
|
21
|
+
title: i18n.t('Today'),
|
|
22
22
|
swaps,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
title: 'This month',
|
|
25
|
+
title: i18n.t('This month'),
|
|
26
26
|
swaps,
|
|
27
27
|
},
|
|
28
28
|
];
|
|
@@ -36,7 +36,7 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
36
36
|
variant="label"
|
|
37
37
|
size="medium"
|
|
38
38
|
className={groupStyles()}>
|
|
39
|
-
{
|
|
39
|
+
{group.title}
|
|
40
40
|
</Typography>
|
|
41
41
|
</Time>
|
|
42
42
|
<Divider size={4} />
|
|
@@ -69,7 +69,7 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
69
69
|
variant="label"
|
|
70
70
|
size="medium"
|
|
71
71
|
className={groupStyles()}>
|
|
72
|
-
{
|
|
72
|
+
{group.title}
|
|
73
73
|
</Typography>
|
|
74
74
|
</Time>
|
|
75
75
|
<Divider size={4} />
|
|
@@ -85,8 +85,8 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
85
85
|
creationTime={swap.creationTime}
|
|
86
86
|
status={swap.status}
|
|
87
87
|
onClick={onSwapClick}
|
|
88
|
-
onlyShowTime={group.title === 'Today'}
|
|
89
88
|
tooltipContainer={getContainer()}
|
|
89
|
+
onlyShowTime={group.title === i18n.t('Today')}
|
|
90
90
|
swapTokenData={{
|
|
91
91
|
from: {
|
|
92
92
|
token: {
|
|
@@ -40,6 +40,7 @@ export function LiquiditySourcePage({ sourceType }: PropTypes) {
|
|
|
40
40
|
const supportedUniqueSwappersGroups: Array<UniqueSwappersGroupType> =
|
|
41
41
|
getUniqueSwappersGroups(swappers, disabledLiquiditySources);
|
|
42
42
|
|
|
43
|
+
const types = { Exchanges: i18n.t('Exchanges'), Bridges: i18n.t('Bridges') };
|
|
43
44
|
const validTypes: Array<LiquiditySourceType> = [];
|
|
44
45
|
if (sourceType === 'Exchanges') {
|
|
45
46
|
validTypes.push('DEX');
|
|
@@ -103,7 +104,7 @@ export function LiquiditySourcePage({ sourceType }: PropTypes) {
|
|
|
103
104
|
suffix: (
|
|
104
105
|
<LiquiditySourceSuffix>
|
|
105
106
|
<Button variant="ghost" size="xsmall" onClick={toggleAllSources}>
|
|
106
|
-
{i18n.t(
|
|
107
|
+
{hasSelectAll ? i18n.t('Deselect all') : i18n.t('Select all')}
|
|
107
108
|
</Button>
|
|
108
109
|
</LiquiditySourceSuffix>
|
|
109
110
|
),
|
|
@@ -115,7 +116,9 @@ export function LiquiditySourcePage({ sourceType }: PropTypes) {
|
|
|
115
116
|
fullWidth
|
|
116
117
|
color="light"
|
|
117
118
|
variant="contained"
|
|
118
|
-
placeholder={i18n.t('Search {sourceType}', {
|
|
119
|
+
placeholder={i18n.t('Search {sourceType}', {
|
|
120
|
+
sourceType: types[sourceType],
|
|
121
|
+
})}
|
|
119
122
|
onChange={searchHandler}
|
|
120
123
|
/>
|
|
121
124
|
{fetchStatus === 'loading' && <LoadingLiquiditySourceList />}
|
|
@@ -2,7 +2,7 @@ import { i18n } from '@lingui/core';
|
|
|
2
2
|
import {
|
|
3
3
|
Divider,
|
|
4
4
|
getCountCategories,
|
|
5
|
-
SelectableCategoryList
|
|
5
|
+
SelectableCategoryList,
|
|
6
6
|
} from '@rango-dev/ui';
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@ export function SelectBlockchainPage(props: PropTypes) {
|
|
|
27
27
|
const fetchStatus = useAppStore().fetchStatus;
|
|
28
28
|
|
|
29
29
|
const blockchains = useAppStore().blockchains({
|
|
30
|
-
type
|
|
30
|
+
type,
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const countActiveCategories = getCountCategories(blockchains);
|
|
@@ -37,7 +37,7 @@ export function SelectBlockchainPage(props: PropTypes) {
|
|
|
37
37
|
return (
|
|
38
38
|
<Layout
|
|
39
39
|
header={{
|
|
40
|
-
title: i18n.t(`Select Blockchain`)
|
|
40
|
+
title: i18n.t(`Select Blockchain`),
|
|
41
41
|
}}>
|
|
42
42
|
<Divider size={12} />
|
|
43
43
|
|
|
@@ -68,11 +68,15 @@ export function SelectSwapItemsPage(props: PropTypes) {
|
|
|
68
68
|
setToToken({ token, meta: { blockchains, tokens } });
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
const types = {
|
|
72
|
+
source: i18n.t('Source'),
|
|
73
|
+
destination: i18n.t('Destination'),
|
|
74
|
+
};
|
|
71
75
|
|
|
72
76
|
return (
|
|
73
77
|
<Layout
|
|
74
78
|
header={{
|
|
75
|
-
title: i18n.t('Swap {type}', { type }),
|
|
79
|
+
title: i18n.t('Swap {type}', { type: types[type] }),
|
|
76
80
|
}}>
|
|
77
81
|
<BlockchainsSection
|
|
78
82
|
blockchains={blockchains}
|
package/src/utils/date.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GroupBy } from '../components/SwapsGroup/SwapsGroup.types';
|
|
2
2
|
import type { PendingSwap } from 'rango-types';
|
|
3
3
|
|
|
4
|
+
import { i18n } from '@lingui/core';
|
|
4
5
|
import dayjs from 'dayjs';
|
|
5
6
|
|
|
6
7
|
export const groupSwapsByDate: GroupBy = (swaps) => {
|
|
@@ -14,28 +15,28 @@ export const groupSwapsByDate: GroupBy = (swaps) => {
|
|
|
14
15
|
[
|
|
15
16
|
'today',
|
|
16
17
|
{
|
|
17
|
-
title: 'Today',
|
|
18
|
+
title: i18n.t('Today'),
|
|
18
19
|
swaps: [],
|
|
19
20
|
},
|
|
20
21
|
],
|
|
21
22
|
[
|
|
22
23
|
'week',
|
|
23
24
|
{
|
|
24
|
-
title: 'This week',
|
|
25
|
+
title: i18n.t('This week'),
|
|
25
26
|
swaps: [],
|
|
26
27
|
},
|
|
27
28
|
],
|
|
28
29
|
[
|
|
29
30
|
'month',
|
|
30
31
|
{
|
|
31
|
-
title: 'This month',
|
|
32
|
+
title: i18n.t('This month'),
|
|
32
33
|
swaps: [],
|
|
33
34
|
},
|
|
34
35
|
],
|
|
35
36
|
[
|
|
36
37
|
'year',
|
|
37
38
|
{
|
|
38
|
-
title: 'This year',
|
|
39
|
+
title: i18n.t('This year'),
|
|
39
40
|
swaps: [],
|
|
40
41
|
},
|
|
41
42
|
],
|