diff --git a/.flowconfig b/.flowconfig index 90874500f9..f3cc1c3299 100644 --- a/.flowconfig +++ b/.flowconfig @@ -15,4 +15,4 @@ all=warn include_warnings=true module.name_mapper='^@polkadot/app-\(accounts\|addresses\|explorer\|extrinsics\|home\|rpc\|settings\|storage\|toolbox\|vanitygen\)\(.*\)$' -> '/packages/app-\1/src\2' module.name_mapper='^@polkadot/apps\(.*\)$' -> '/packages/apps/src\1' -module.name_mapper='^@polkadot/ui-\(app\|keyring\)\(.*\)$' -> '/packages/ui-\1/src\2' +module.name_mapper='^@polkadot/ui-\(app\|keyring\|signer\)\(.*\)$' -> '/packages/ui-\1/src\2' diff --git a/packages/app-accounts/src/Address.js b/packages/app-accounts/src/Address.js index e9aae23987..b873864230 100644 --- a/packages/app-accounts/src/Address.js +++ b/packages/app-accounts/src/Address.js @@ -55,7 +55,7 @@ export default class Address extends React.PureComponent { render (): React$Node { const { className, style } = this.props; - const { address, isValid, publicKey, shortValue } = this.state; + const { address, isValid, shortValue } = this.state; return (
{
- { - !isValid - ? null - : [ - , - - {' transactions'} - - ] - } + {this.renderBalance()} ); } + + renderBalance (): React$Node { + const { isValid, publicKey } = this.state; + + if (!isValid) { + return null; + } + + return [ + , + + {' transactions'} + + ]; + } } diff --git a/packages/app-accounts/src/Creator.js b/packages/app-accounts/src/Creator.js index 30907d2916..fa07d427ed 100644 --- a/packages/app-accounts/src/Creator.js +++ b/packages/app-accounts/src/Creator.js @@ -62,8 +62,8 @@ class Creator extends React.PureComponent { } render (): React$Node { - const { className, style, t } = this.props; - const { address, isNameValid, isPassValid, isSeedValid, isValid, name, password, seed } = this.state; + const { className, style } = this.props; + const { address, isSeedValid } = this.state; return (
{ : null } /> -
-
- -
-
- -
-
- -
-
+ {this.renderInput()}
- -