fix(error): Fixed an error on send-receive feature

This commit is contained in:
Daniel Gonzalez
2020-07-02 14:38:26 -04:00
parent 10332dc9c7
commit 1d81f289a2
+23 -13
View File
@@ -1,10 +1,11 @@
import React from "react"
import PropTypes from "prop-types"
import { Content } from "adminlte-2-react"
import { Content, Row, Col, Box } from "adminlte-2-react"
import Receive from "./receive"
import Send from "./send"
import './send-receive.css'
import "./send-receive.css"
let _this
class SendReceive extends React.Component {
constructor(props) {
@@ -16,16 +17,25 @@ class SendReceive extends React.Component {
render() {
return (
<>
<Content>
<Receive
walletInfo={_this.props.walletInfo}
/>
<Send
updateBalance={_this.props.updateBalance}
bchWallet={_this.props.bchWallet}
/>
</Content>
{_this.props.walletInfo.mnemonic ? (
<Content>
<Receive walletInfo={_this.props.walletInfo} />
<Send
updateBalance={_this.props.updateBalance}
bchWallet={_this.props.bchWallet}
/>
</Content>
) : (
<Content>
<Box padding="true" className="container-nofound">
<Row>
<Col xs={12}>
<em>You need to create or import a wallet first</em>
</Col>
</Row>
</Box>
</Content>
)}
</>
)
}
@@ -35,7 +45,7 @@ SendReceive.propTypes = {
walletInfo: PropTypes.object.isRequired,
updateBalance: PropTypes.func.isRequired,
setBchWallet: PropTypes.func.isRequired,
bchWallet:PropTypes.object,
bchWallet: PropTypes.object,
}
export default SendReceive