@rango-dev/widget-embedded 0.22.4-next.7 → 0.22.4-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/Quote/Quote.d.ts.map +1 -1
- package/dist/constants/languages.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/store/AppStore.d.ts +2 -2
- package/dist/store/app.d.ts +2 -2
- package/package.json +2 -2
- package/src/components/Quote/Quote.tsx +9 -5
- package/src/constants/languages.ts +2 -1
- package/src/pages/SettingsPage.tsx +11 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SettingsPage.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SettingsPage.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,wBAAgB,YAAY,sBA6M3B"}
|
package/dist/store/AppStore.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const AppStoreContext: React.Context<import("zustand").UseBoundSt
|
|
|
8
8
|
persist: {
|
|
9
9
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<import("./app").AppStoreState, {
|
|
10
10
|
theme: import("./slices/settings").ThemeMode;
|
|
11
|
-
language: "en" | "es" | "ja" | "fr" | null;
|
|
11
|
+
language: "en" | "es" | "ja" | "fr" | "pt" | null;
|
|
12
12
|
affiliatePercent: number | null;
|
|
13
13
|
affiliateRef: string | null;
|
|
14
14
|
affiliateWallets: {
|
|
@@ -27,7 +27,7 @@ export declare const AppStoreContext: React.Context<import("zustand").UseBoundSt
|
|
|
27
27
|
onFinishHydration: (fn: (state: import("./app").AppStoreState) => void) => () => void;
|
|
28
28
|
getOptions: () => Partial<import("zustand/middleware").PersistOptions<import("./app").AppStoreState, {
|
|
29
29
|
theme: import("./slices/settings").ThemeMode;
|
|
30
|
-
language: "en" | "es" | "ja" | "fr" | null;
|
|
30
|
+
language: "en" | "es" | "ja" | "fr" | "pt" | null;
|
|
31
31
|
affiliatePercent: number | null;
|
|
32
32
|
affiliateRef: string | null;
|
|
33
33
|
affiliateWallets: {
|
package/dist/store/app.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare function createAppStore(initialData?: WidgetConfig): import("zust
|
|
|
9
9
|
persist: {
|
|
10
10
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<AppStoreState, {
|
|
11
11
|
theme: import("./slices/settings").ThemeMode;
|
|
12
|
-
language: "en" | "es" | "ja" | "fr" | null;
|
|
12
|
+
language: "en" | "es" | "ja" | "fr" | "pt" | null;
|
|
13
13
|
affiliatePercent: number | null;
|
|
14
14
|
affiliateRef: string | null;
|
|
15
15
|
affiliateWallets: {
|
|
@@ -28,7 +28,7 @@ export declare function createAppStore(initialData?: WidgetConfig): import("zust
|
|
|
28
28
|
onFinishHydration: (fn: (state: AppStoreState) => void) => () => void;
|
|
29
29
|
getOptions: () => Partial<import("zustand/middleware").PersistOptions<AppStoreState, {
|
|
30
30
|
theme: import("./slices/settings").ThemeMode;
|
|
31
|
-
language: "en" | "es" | "ja" | "fr" | null;
|
|
31
|
+
language: "en" | "es" | "ja" | "fr" | "pt" | null;
|
|
32
32
|
affiliatePercent: number | null;
|
|
33
33
|
affiliateRef: string | null;
|
|
34
34
|
affiliateWallets: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.22.4-next.
|
|
3
|
+
"version": "0.22.4-next.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@rango-dev/queue-manager-core": "^0.25.1-next.0",
|
|
26
26
|
"@rango-dev/queue-manager-rango-preset": "^0.27.1-next.1",
|
|
27
27
|
"@rango-dev/queue-manager-react": "^0.25.1-next.0",
|
|
28
|
-
"@rango-dev/ui": "^0.28.2-next.
|
|
28
|
+
"@rango-dev/ui": "^0.28.2-next.8",
|
|
29
29
|
"@rango-dev/wallets-react": "^0.13.1-next.1",
|
|
30
30
|
"@rango-dev/wallets-shared": "^0.27.1-next.1",
|
|
31
31
|
"bignumber.js": "^9.1.1",
|
|
@@ -122,6 +122,14 @@ export function Quote(props: QuoteProps) {
|
|
|
122
122
|
stepState = 'warning';
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
let alertTitle = stepHasError
|
|
126
|
+
? i18n.t('Slippage Error')
|
|
127
|
+
: i18n.t('Slippage Warning');
|
|
128
|
+
|
|
129
|
+
if (error?.type === QuoteErrorType.BRIDGE_LIMIT) {
|
|
130
|
+
alertTitle = error?.recommendation;
|
|
131
|
+
}
|
|
132
|
+
|
|
125
133
|
return {
|
|
126
134
|
swapper: {
|
|
127
135
|
displayName: getSwapperDisplayName(swap.swapperId, swappers),
|
|
@@ -197,11 +205,7 @@ export function Quote(props: QuoteProps) {
|
|
|
197
205
|
<Alert
|
|
198
206
|
variant="alarm"
|
|
199
207
|
type={stepHasError ? 'error' : 'warning'}
|
|
200
|
-
title={
|
|
201
|
-
error?.type === QuoteErrorType.BRIDGE_LIMIT
|
|
202
|
-
? error?.recommendation
|
|
203
|
-
: i18n.t(`Slippage ${stepHasError ? 'Error' : 'Warning'}:`)
|
|
204
|
-
}
|
|
208
|
+
title={alertTitle}
|
|
205
209
|
footer={
|
|
206
210
|
<FooterAlert>
|
|
207
211
|
{error?.type === QuoteErrorType.BRIDGE_LIMIT && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FlagPropTypes, Language } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
|
-
import { English, French, Japanese, Spanish } from '@rango-dev/ui';
|
|
3
|
+
import { English, French, Japanese, Portuguese, Spanish } from '@rango-dev/ui';
|
|
4
4
|
|
|
5
5
|
export type LanguageItem = {
|
|
6
6
|
title: string;
|
|
@@ -14,6 +14,7 @@ export const LANGUAGES: LanguageItem[] = [
|
|
|
14
14
|
{ title: 'Spanish', label: 'Español', local: 'es', SVGFlag: Spanish },
|
|
15
15
|
{ title: 'French', label: 'Français', local: 'fr', SVGFlag: French },
|
|
16
16
|
{ title: 'Japanese', label: '日本語', local: 'ja', SVGFlag: Japanese },
|
|
17
|
+
{ title: 'Portuguese', label: 'Português', local: 'pt', SVGFlag: Portuguese },
|
|
17
18
|
];
|
|
18
19
|
|
|
19
20
|
export const DEFAULT_LANGUAGE = 'en';
|
|
@@ -129,18 +129,16 @@ export function SettingsPage() {
|
|
|
129
129
|
onClick: () => navigate(navigationRoutes.exchanges),
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* };
|
|
143
|
-
*/
|
|
132
|
+
const languageItem = {
|
|
133
|
+
id: 'language-item',
|
|
134
|
+
title: (
|
|
135
|
+
<Typography variant="title" size="xmedium">
|
|
136
|
+
{i18n.t('Language')}
|
|
137
|
+
</Typography>
|
|
138
|
+
),
|
|
139
|
+
end: <ChevronRightIcon color="gray" />,
|
|
140
|
+
onClick: () => navigate(navigationRoutes.languages),
|
|
141
|
+
};
|
|
144
142
|
|
|
145
143
|
const themeItem = {
|
|
146
144
|
id: 'theme-item',
|
|
@@ -185,7 +183,7 @@ export function SettingsPage() {
|
|
|
185
183
|
const settingItems = isLiquidityHidden ? [] : [bridgeItem, exchangeItem];
|
|
186
184
|
|
|
187
185
|
if (!isLanguageHidden) {
|
|
188
|
-
|
|
186
|
+
settingItems.push(languageItem);
|
|
189
187
|
}
|
|
190
188
|
if (!theme?.singleTheme && !isThemeHidden) {
|
|
191
189
|
settingItems.push(themeItem);
|