import { IV3Wallet } from 'ethereumjs-wallet'; import React, { Component } from 'react'; import translate, { translateRaw } from 'translations'; import { makeBlob } from 'utils/blob'; import './DownloadWallet.scss'; import Template from '../Template'; interface Props { keystore: IV3Wallet; filename: string; continue(): void; } interface State { hasDownloadedWallet: boolean; } export default class DownloadWallet extends Component { public state: State = { hasDownloadedWallet: false }; public render() { const { filename } = this.props; const { hasDownloadedWallet } = this.state; return ( ); } public getBlob = () => makeBlob('text/json;charset=UTF-8', this.props.keystore); private handleContinue = () => this.state.hasDownloadedWallet && this.props.continue(); private handleDownloadKeystore = () => this.setState({ hasDownloadedWallet: true }); }