@rango-dev/widget-embedded 0.23.1-next.30 → 0.23.1-next.32
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/Quote/QuoteTrigger.d.ts.map +1 -1
- package/dist/components/Quotes/SelectStrategy.d.ts.map +1 -1
- package/dist/constants/quote.d.ts +1 -5
- package/dist/constants/quote.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/components/Quote/QuoteTrigger.tsx +12 -6
- package/src/components/Quotes/SelectStrategy.tsx +26 -1
- package/src/constants/quote.ts +1 -24
- package/src/containers/Settings/Lists.tsx +1 -1
- package/src/hooks/useScreenDetect.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.23.1-next.
|
|
3
|
+
"version": "0.23.1-next.32",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@rango-dev/queue-manager-core": "^0.26.0",
|
|
27
27
|
"@rango-dev/queue-manager-rango-preset": "^0.28.1-next.3",
|
|
28
28
|
"@rango-dev/queue-manager-react": "^0.26.0",
|
|
29
|
-
"@rango-dev/ui": "^0.29.1-next.
|
|
29
|
+
"@rango-dev/ui": "^0.29.1-next.18",
|
|
30
30
|
"@rango-dev/wallets-react": "^0.14.1-next.1",
|
|
31
31
|
"@rango-dev/wallets-shared": "^0.28.1-next.1",
|
|
32
32
|
"bignumber.js": "^9.1.1",
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
|
@@ -152,12 +152,18 @@ export function QuoteTrigger(props: QuoteTriggerProps) {
|
|
|
152
152
|
{blockchains.length <= MAX_BLOCKCHAINS ||
|
|
153
153
|
(blockchains.length > MAX_BLOCKCHAINS &&
|
|
154
154
|
index < MAX_BLOCKCHAINS - 1) ? (
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
<Tooltip
|
|
156
|
+
container={tooltipContainer}
|
|
157
|
+
side="bottom"
|
|
158
|
+
content={blockchain.displayName}
|
|
159
|
+
sideOffset={4}>
|
|
160
|
+
<ImageComponent
|
|
161
|
+
content={''}
|
|
162
|
+
src={blockchain.image}
|
|
163
|
+
open={false}
|
|
164
|
+
className={index !== 0 ? 'blockchainImage' : ''}
|
|
165
|
+
/>
|
|
166
|
+
</Tooltip>
|
|
161
167
|
) : (
|
|
162
168
|
index === MAX_BLOCKCHAINS - 1 && (
|
|
163
169
|
<Tooltip
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { PreferenceType } from 'rango-sdk';
|
|
2
|
+
|
|
3
|
+
import { i18n } from '@lingui/core';
|
|
1
4
|
import { Select } from '@rango-dev/ui';
|
|
2
5
|
import React from 'react';
|
|
3
6
|
|
|
4
|
-
import { ROUTE_STRATEGY } from '../../constants/quote';
|
|
5
7
|
import { useQuoteStore } from '../../store/quote';
|
|
6
8
|
|
|
7
9
|
import { SelectContainer } from './Quotes.styles';
|
|
@@ -9,6 +11,29 @@ import { SelectContainer } from './Quotes.styles';
|
|
|
9
11
|
export function SelectStrategy(props: { container: HTMLElement }) {
|
|
10
12
|
const { updateQuotePartialState, sortStrategy } = useQuoteStore();
|
|
11
13
|
|
|
14
|
+
const ROUTE_STRATEGY: { value: PreferenceType; label: string }[] = [
|
|
15
|
+
{
|
|
16
|
+
value: 'SMART',
|
|
17
|
+
label: i18n.t('Smart Routing'),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: 'FEE',
|
|
21
|
+
label: i18n.t('Lowest Fee'),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: 'SPEED',
|
|
25
|
+
label: i18n.t('Fastest Transfer'),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: 'NET_OUTPUT',
|
|
29
|
+
label: i18n.t('Maximum Return'),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: 'PRICE',
|
|
33
|
+
label: i18n.t('Maximum Output'),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
12
37
|
return (
|
|
13
38
|
<SelectContainer>
|
|
14
39
|
<Select
|
package/src/constants/quote.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SwapFee, TagValue } from 'rango-sdk';
|
|
2
2
|
|
|
3
3
|
import { i18n } from '@lingui/core';
|
|
4
4
|
|
|
@@ -22,29 +22,6 @@ export type FeesGroup = {
|
|
|
22
22
|
nonePayable: { [key in NameOfFees]?: SwapFee[] };
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export const ROUTE_STRATEGY: { value: PreferenceType; label: string }[] = [
|
|
26
|
-
{
|
|
27
|
-
value: 'SMART',
|
|
28
|
-
label: i18n.t('Smart Routing'),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
value: 'FEE',
|
|
32
|
-
label: i18n.t('Lowest Fee'),
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
value: 'SPEED',
|
|
36
|
-
label: i18n.t('Fastest Transfer'),
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
value: 'NET_OUTPUT',
|
|
40
|
-
label: i18n.t('Maximum Return'),
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
value: 'PRICE',
|
|
44
|
-
label: i18n.t('Maximum Output'),
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
25
|
export const HIGH_PRIORITY_TAGS: TagValue[] = [
|
|
49
26
|
'RECOMMENDED',
|
|
50
27
|
'CENTRALIZED',
|
|
@@ -199,7 +199,7 @@ export function SettingsLists() {
|
|
|
199
199
|
{currentLanguage}
|
|
200
200
|
</Typography>
|
|
201
201
|
<Divider direction="horizontal" size={8} />
|
|
202
|
-
<ChevronRightIcon color="gray"
|
|
202
|
+
<ChevronRightIcon color="gray" />
|
|
203
203
|
</>
|
|
204
204
|
),
|
|
205
205
|
onClick: () => navigate(navigationRoutes.languages),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLayoutEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* mobile: screen <= 480
|
|
@@ -37,7 +37,7 @@ const useScreenDetect = () => {
|
|
|
37
37
|
setIsExtraLargeScreen(window.innerWidth > MIN_EXTRA_LARGE_SCREEN_WIDTH);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
useLayoutEffect(() => {
|
|
41
41
|
handleResize(); // Initial check
|
|
42
42
|
window.addEventListener('resize', handleResize);
|
|
43
43
|
return () => window.removeEventListener('resize', handleResize);
|