prefer wallet_unused_address over wallet_new_address

This commit is contained in:
Alex Grintsvayg 2017-04-27 14:18:59 -04:00
parent 63da853ba7
commit e06c2320e1
3 changed files with 5 additions and 5 deletions

View file

@ -199,7 +199,7 @@ const CodeRequiredStage = React.createClass({
}) })
if (!this.state.address) { if (!this.state.address) {
lbry.call('wallet_new_address', {}, (address) => { lbry.getUnusedAddress((address) => {
setLocal('wallet_address', address); setLocal('wallet_address', address);
this.setState({ address: address }); this.setState({ address: address });
}); });

View file

@ -16,7 +16,7 @@ var AddressSection = React.createClass({
this.setState({ this.setState({
address: address, address: address,
}); });
}); }.bind(this));
}, },
_getNewAddress: function(event) { _getNewAddress: function(event) {
@ -24,12 +24,12 @@ var AddressSection = React.createClass({
event.preventDefault(); event.preventDefault();
} }
lbry.wallet_new_address().then(function(address) { lbry.getNewAddress((address) => {
window.localStorage.setItem('wallet_address', address); window.localStorage.setItem('wallet_address', address);
this.setState({ this.setState({
address: address, address: address,
}); });
}.bind(this)) }.bind(this));
}, },
getInitialState: function() { getInitialState: function() {

View file

@ -56,7 +56,7 @@ rewards.claimReward = function (type) {
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
lbry.get_new_address().then((address) => { lbry.wallet_new_address().then((address) => {
const params = { const params = {
reward_type: type, reward_type: type,
wallet_address: address, wallet_address: address,