Skip to content

Commit

Permalink
No dev types injection with metadata v14 (polkadot-js#6471)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored Nov 3, 2021
1 parent 0bc5b62 commit df784a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/page-settings/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export { useCounter };

function SettingsApp ({ basePath, onStatusChange }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const { isApiConnected, isApiReady } = useApi();
const { api, isApiConnected, isApiReady } = useApi();
const numExtensions = useCounter();

const items = useMemo(() => [
Expand All @@ -47,9 +47,11 @@ function SettingsApp ({ basePath, onStatusChange }: Props): React.ReactElement<P

const hidden = useMemo(
() => (isApiConnected && isApiReady)
? []
? api.runtimeMetadata.version <= 13
? []
: ['developer']
: ['metadata', 'i18n'],
[isApiConnected, isApiReady]
[api, isApiConnected, isApiReady]
);

return (
Expand Down

0 comments on commit df784a7

Please sign in to comment.