var NewAddressSection = React.createClass({
generateAddress: function() {
lbry.getNewAddress((results) => {
this.setState({
address: results,
})
});
},
getInitialState: function() {
return {
address: "",
}
},
render: function() {
return (
Create New Address:
);
}
});
var SendToAddressSection = React.createClass({
sendToAddress: function() {
this.setState({
results: "",
});
lbry.sendToAddress(this.state.amount, this.state.address, (results) => {
if(results === true)
{
this.setState({
results: "Your transaction was completed successfully.",
});
}
else
{
this.setState({
results: "Something went wrong: " + results
});
}
});
},
getInitialState: function() {
return {
address: "",
amount: 0.0,
balance: "Checking balance...",
results: "",
}
},
componentWillMount: function() {
lbry.getBalance((results) => {
this.setState({
balance: results,
});
});
},
setAmount: function(event) {
this.setState({
amount: event.target.value,
})
},
setAddress: function(event) {
this.setState({
address: event.target.value,
})
},
render: function() {
return (
Send To Address:
Results:
{this.state.results}
);
}
});
var WalletPage = React.createClass({
render: function() {
return (
);
}
});