fix: populate address if not in redux state

This commit is contained in:
Sean Yesmunt 2018-04-18 19:02:24 -04:00
parent 4ec85d4edb
commit 63183f58cd

View file

@ -13,7 +13,12 @@ type Props = {
class WalletAddress extends React.PureComponent<Props> {
componentWillMount() {
this.props.checkAddressIsMine(this.props.receiveAddress);
const { checkAddressIsMine, receiveAddress, getNewAddress } = this.props;
if (!receiveAddress) {
getNewAddress();
} else {
checkAddressIsMine(receiveAddress);
}
}
render() {