diff --git a/common/containers/Tabs/GenerateWallet/components/Keystore/DownloadWallet.tsx b/common/containers/Tabs/GenerateWallet/components/Keystore/DownloadWallet.tsx index f8a31387..74e61b10 100644 --- a/common/containers/Tabs/GenerateWallet/components/Keystore/DownloadWallet.tsx +++ b/common/containers/Tabs/GenerateWallet/components/Keystore/DownloadWallet.tsx @@ -33,7 +33,7 @@ export default class DownloadWallet extends Component { role="button" className="DlWallet-download btn btn-primary btn-lg" aria-label="Download Keystore File (UTC / JSON · Recommended · Encrypted)" - aria-describedby={translate('x_KeystoreDesc')} + aria-describedby={translate('x_KeystoreDesc', true)} download={filename} href={this.getBlob()} onClick={this.handleDownloadKeystore} diff --git a/common/containers/Tabs/GenerateWallet/components/Keystore/PaperWallet.tsx b/common/containers/Tabs/GenerateWallet/components/Keystore/PaperWallet.tsx index 8f121dc8..73fc2658 100644 --- a/common/containers/Tabs/GenerateWallet/components/Keystore/PaperWallet.tsx +++ b/common/containers/Tabs/GenerateWallet/components/Keystore/PaperWallet.tsx @@ -20,7 +20,7 @@ const PaperWallet: React.SFC = props => ( { const translated = translate(x); - if (typeof translated === 'string') { - return !!translated.trim(); - } return !!translated; }); } export type TranslateType = React.ReactElement | string; -export default function translate(key: string, textOnly: boolean = false): TranslateType { +function translate(key: string, textOnly?: false): React.ReactElement; +function translate(key: string, textOnly: true): string; + +function translate(key: string, textOnly: boolean = false) { return textOnly ? translateRaw(key) : ; } +export default translate; + export function translateRaw(key: string) { const lang = getLanguageSelection(configuredStore.getState()); diff --git a/package.json b/package.json index cd269da0..0c7e1950 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@types/qrcode": "0.8.0", "@types/qrcode.react": "0.6.2", "@types/query-string": "5.0.1", - "@types/react": "16.0.34", + "@types/react": "16.0.35", "@types/react-dom": "16.0.3", "@types/react-redux": "5.0.14", "@types/react-router-dom": "4.2.3",