Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"packages/*"
],
"resolutions": {
"@polkadot/api": "^1.0.0-beta.28",
"@polkadot/api-contract": "^1.0.0-beta.28",
"@polkadot/keyring": "^2.0.0-beta.6",
"@polkadot/types": "^1.0.0-beta.28",
"@polkadot/util": "^2.0.0-beta.6",
"@polkadot/util-crypto": "^2.0.0-beta.6",
"@polkadot/api": "^1.0.0-beta.33",
"@polkadot/api-contract": "^1.0.0-beta.33",
"@polkadot/keyring": "^2.0.0-beta.9",
"@polkadot/types": "^1.0.0-beta.33",
"@polkadot/util": "^2.0.0-beta.9",
"@polkadot/util-crypto": "^2.0.0-beta.9",
"babel-core": "^7.0.0-bridge.0",
"typescript": "^3.7.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/react-components": "^0.39.0-beta.109",
"@polkadot/react-qr": "^0.48.0-beta.15",
"@polkadot/react-qr": "^0.48.0-beta.17",
"@types/file-saver": "^2.0.0",
"@types/yargs": "^15.0.1",
"detect-browser": "^4.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/api-contract": "^1.0.0-beta.28"
"@polkadot/api-contract": "^1.0.0-beta.33"
}
}
22 changes: 10 additions & 12 deletions packages/app-explorer/src/SummarySession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
// of the Apache-2.0 license. See the LICENSE file for details.

import { DerivedSessionInfo } from '@polkadot/api-derive/types';
import { I18nProps } from '@polkadot/react-components/types';

import React, { useEffect, useState } from 'react';
import { CardSummary } from '@polkadot/react-components';
import { useApi, useCall } from '@polkadot/react-hooks';

import translate from './translate';
import { formatNumber } from '@polkadot/util';

interface Props extends I18nProps {
import { useTranslation } from './translate';

interface Props {
sessionInfo?: DerivedSessionInfo;
withEra?: boolean;
withSession?: boolean;
}

function renderSession ({ sessionInfo, t, withSession = true }: Props): React.ReactNode {
function renderSession ({ sessionInfo, withSession = true }: Props, t: (input: string) => string): React.ReactNode {
if (!withSession || !sessionInfo) {
return null;
}
Expand All @@ -44,7 +43,7 @@ function renderSession ({ sessionInfo, t, withSession = true }: Props): React.Re
);
}

function renderEra ({ sessionInfo, t, withEra = true }: Props): React.ReactNode {
function renderEra ({ sessionInfo, withEra = true }: Props, t: (input: string) => string): React.ReactNode {
if (!withEra || !sessionInfo) {
return null;
}
Expand All @@ -68,9 +67,10 @@ function renderEra ({ sessionInfo, t, withEra = true }: Props): React.ReactNode
);
}

function SummarySession (props: Props): React.ReactElement<Props> {
export default function SummarySession (props: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const { api } = useApi();
const sessionInfo = useCall<DerivedSessionInfo>(api.derive.session.info, []);
const sessionInfo = useCall<DerivedSessionInfo>(api.derive.session?.info, []);
const [expanded, setExpanded] = useState<Props>(props);

useEffect((): void => {
Expand All @@ -79,10 +79,8 @@ function SummarySession (props: Props): React.ReactElement<Props> {

return (
<>
{renderSession(expanded)}
{renderEra(expanded)}
{renderSession(expanded, t)}
{renderEra(expanded, t)}
</>
);
}

export default translate(SummarySession);
2 changes: 1 addition & 1 deletion packages/apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@babel/runtime": "^7.8.3",
"@polkadot/react-components": "^0.39.0-beta.109",
"@polkadot/react-signer": "^0.39.0-beta.109",
"@polkadot/ui-assets": "^0.48.0-beta.15",
"@polkadot/ui-assets": "^0.48.0-beta.17",
"query-string": "^6.10.1"
}
}
4 changes: 2 additions & 2 deletions packages/react-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/api": "^1.0.0-beta.28",
"@polkadot/extension-dapp": "^0.20.1",
"@polkadot/api": "^1.0.0-beta.33",
"@polkadot/extension-dapp": "^0.21.0-beta.0",
"edgeware-node-types": "^1.1.0",
"rxjs-compat": "^6.5.3"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/keyring": "^2.0.0-beta.6",
"@polkadot/keyring": "^2.0.0-beta.9",
"@polkadot/react-api": "^0.39.0-beta.109",
"@polkadot/react-identicon": "^0.48.0-beta.15",
"@polkadot/react-identicon": "^0.48.0-beta.17",
"@polkadot/react-query": "^0.39.0-beta.109",
"@polkadot/ui-keyring": "^0.48.0-beta.15",
"@polkadot/ui-settings": "^0.48.0-beta.15",
"@polkadot/ui-keyring": "^0.48.0-beta.17",
"@polkadot/ui-settings": "^0.48.0-beta.17",
"@types/chart.js": "^2.9.11",
"@types/i18next": "^13.0.0",
"@types/react-copy-to-clipboard": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/react-components": "^0.39.0-beta.109",
"@polkadot/react-qr": "^0.48.0-beta.15"
"@polkadot/react-qr": "^0.48.0-beta.17"
}
}
Loading