On Wallet page, refresh address if it doesn't match the current wallet
This commit is contained in:
parent
96dedbf1bd
commit
8ebddc5a9f
1 changed files with 9 additions and 3 deletions
|
@ -18,10 +18,16 @@ var AddressSection = React.createClass({
|
|||
componentWillMount: function() {
|
||||
var address = localStorage.getItem('wallet_address');
|
||||
if (address === null) {
|
||||
self._refreshAddress();
|
||||
this._refreshAddress();
|
||||
} else {
|
||||
this.setState({
|
||||
address: address,
|
||||
lbry.checkAddressIsMine(address, (isMine) => {
|
||||
if (isMine) {
|
||||
this.setState({
|
||||
address: address,
|
||||
});
|
||||
} else {
|
||||
this._refreshAddress();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue