From 49e78a32ce64e7b903dc4510cb44ccc309e36e4e Mon Sep 17 00:00:00 2001 From: theborakompanioni Date: Thu, 19 Oct 2023 00:45:06 +0200 Subject: [PATCH] chore: support rich features array format --- src/components/Settings.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 4f2e2a82..b4541097 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -86,7 +86,10 @@ export default function Settings({ wallet, stopWallet }: SettingsProps) { .then((data) => data && data.features) .then((features) => { if (abortCtrl.signal.aborted) return - setShowLogsEnabled(features && features.logs === true) + const hasLogsFeatureOld = features && features.logs === true + const hasLogsFeature = + features && Array.isArray(features) && features.some((it) => it.name === 'logs' && it.enabled === true) + setShowLogsEnabled(hasLogsFeatureOld || hasLogsFeature) }) .catch((_) => { if (abortCtrl.signal.aborted) return