Skip to content

Commit

Permalink
chore: support rich features array format
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Oct 18, 2023
1 parent 9759139 commit 49e78a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49e78a3

Please sign in to comment.