revert wallet changes

This commit is contained in:
Jeremy Kauffman 2016-08-21 10:57:11 -04:00
parent f9a1bd99c0
commit 3554d34c53

View file

@ -99,7 +99,7 @@ var SendToAddressSection = React.createClass({
<h4>Results</h4>
{this.state.results}
</div>
: ''
: ''
}
</section>
);
@ -111,13 +111,12 @@ var WalletPage = React.createClass({
document.title = "My Wallet";
},
/*
Below should be refactored so that balance is shared all of wallet page. Or even broader?
What is the proper React pattern for sharing a global state like balance?
Below should be refactored so that balance is shared all of wallet page. Or even broader?
What is the proper React pattern for sharing a global state like balance?
*/
getInitialState: function() {
return {
balance: "Checking balance...",
txlog: "Loading transactions...",
}
},
componentWillMount: function() {
@ -126,21 +125,6 @@ var WalletPage = React.createClass({
balance: results,
});
});
console.log('Trying to get transaction history...')
lbry.call('get_transaction_history', {}, (results) => {
console.log('Got transaction history:')
console.log(results)
var out = 'Transaction history loaded.'
if (results.length == 0) {
out = 'No transactions yet.'
} else {
out = JSON.stringify(results)
}
console.log(out)
this.setState({
txlog: out,
})
});
},
render: function() {
return (
@ -155,11 +139,7 @@ var WalletPage = React.createClass({
<h3>Claim Invite Code</h3>
<Link href="?claim" label="Claim a LBRY beta invite code" button="alt" />
</section>
<section className="card">
<h3>Transaction History</h3>
{this.state.txlog}
</section>
</main>
);
}
});
});