Skip to content

Commit

Permalink
Merge pull request #9129 from LedgerHQ/fix/live-14726/llm-ui-fixes
Browse files Browse the repository at this point in the history
fix(live-14726): llm spacing internalization
  • Loading branch information
liviuciulinaru authored Feb 7, 2025
2 parents d12c829 + 1e3e035 commit 7cec2d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-clouds-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

LLM: fix spacing and internalization
6 changes: 3 additions & 3 deletions apps/ledger-live-mobile/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3351,7 +3351,7 @@
},
"form": {
"validate": "Confirm Swap transaction",
"tab": "Exchange",
"tab": "Swap",
"button": "Continue",
"from": "From",
"to": "To",
Expand Down Expand Up @@ -3460,8 +3460,8 @@
"receive": "Receive"
},
"placeholder": "Select",
"title": "Exchange",
"cta": "Exchange",
"title": "Swap",
"cta": "Swap",
"from": "From",
"to": "To",
"loading": "Loading...",
Expand Down
12 changes: 6 additions & 6 deletions apps/ledger-live-mobile/src/screens/Swap/LiveApp/WebView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useEnv from "@ledgerhq/live-common/hooks/useEnv";
import { LiveAppManifest } from "@ledgerhq/live-common/platform/types";
import { getEnv } from "@ledgerhq/live-env";
import { Flex } from "@ledgerhq/native-ui";
import React from "react";
import { Platform } from "react-native";
Expand All @@ -21,28 +21,28 @@ type Props = {
setWebviewState: React.Dispatch<React.SetStateAction<WebviewState>>;
};

const SWAP_API_BASE = getEnv("SWAP_API_BASE");
const SWAP_USER_IP = getEnv("SWAP_USER_IP");

export function WebView({ manifest, setWebviewState }: Props) {
const customHandlers = useSwapLiveAppCustomHandlers(manifest);
const { theme } = useTheme();
const { language } = useSettings();
const { ticker: currencyTicker } = useSelector(counterValueCurrencySelector);
const discreet = useSelector(discreetModeSelector);
const countryLocale = getCountryLocale();
const SWAP_API_BASE = useEnv("SWAP_API_BASE");
const SWAP_USER_IP = useEnv("SWAP_USER_IP");
const exportSettings = useSelector(exportSettingsSelector);
const devMode = exportSettings.developerModeEnabled.toString();

return (
<Flex pb={1} flex={1}>
<Flex flex={1}>
<Web3AppWebview
manifest={manifest}
customHandlers={customHandlers}
onStateChange={setWebviewState}
inputs={{
swapApiBase: SWAP_API_BASE,
swapUserIp: SWAP_USER_IP,
devMode: exportSettings.developerModeEnabled ? "true" : "false",
devMode,
theme,
lang: language,
locale: language, // LLM doesn't support different locales. By doing this we don't have to have specific LLM/LLD logic in earn, and in future if LLM supports locales we will change this from `language` to `locale`
Expand Down

0 comments on commit 7cec2d3

Please sign in to comment.