From 9bd9938061c449c917148c4afbda3f2c4d264041 Mon Sep 17 00:00:00 2001 From: Theophile Sandoz Date: Fri, 7 Feb 2025 18:01:18 +0100 Subject: [PATCH] fix(llm): fix the analytics console for deep properties --- .changeset/blue-humans-destroy.md | 5 +++++ .../src/components/AnalyticsConsole/Event.tsx | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changeset/blue-humans-destroy.md diff --git a/.changeset/blue-humans-destroy.md b/.changeset/blue-humans-destroy.md new file mode 100644 index 000000000000..d74efc893de4 --- /dev/null +++ b/.changeset/blue-humans-destroy.md @@ -0,0 +1,5 @@ +--- +"live-mobile": minor +--- + +Fix the analytics console for deep properties diff --git a/apps/ledger-live-mobile/src/components/AnalyticsConsole/Event.tsx b/apps/ledger-live-mobile/src/components/AnalyticsConsole/Event.tsx index 6c76072b5f06..e78cc0fe28e9 100644 --- a/apps/ledger-live-mobile/src/components/AnalyticsConsole/Event.tsx +++ b/apps/ledger-live-mobile/src/components/AnalyticsConsole/Event.tsx @@ -22,10 +22,7 @@ const Event: React.FC = ({ const propertiesText = useMemo( () => propertiesToDisplay - ? JSON.stringify(propertiesToDisplay, Object.keys(propertiesToDisplay).sort(), 2) - .split("\n") - .slice(1, -1) - .join("\n") + ? JSON.stringify(propertiesToDisplay, null, 2).replace(/^{\n|\n}$/g, "") : null, [propertiesToDisplay], );