Refactoring of Tokens & Balances (#5372)

* Remove ETH filter

* Remove unused Blockchain reducer+actions

* Simpler Token updates and fetching

* Cleanup use of balances

* Cleanup of balances

* Cleanup of Balances

* Linting

* Update List Component

* Separate tokens from balances

* Refactoring balance fetchin and storing - Part I

* Linting

* Better ETH token description and use

* Working Transfer with new logic

* Add debugging

* Querying the tokens filter on new block

* Fixing the tests - PART I

* Fix txCount
This commit is contained in:
Nicolas Gotchac
2017-04-19 18:00:05 +02:00
committed by Jaco Greeff
parent fc18299869
commit 37690cfde2
49 changed files with 725 additions and 1027 deletions

View File

@@ -45,7 +45,6 @@ class Contract extends Component {
accounts: PropTypes.object,
accountsInfo: PropTypes.object,
balances: PropTypes.object,
contracts: PropTypes.object,
netVersion: PropTypes.string.isRequired,
params: PropTypes.object
@@ -115,10 +114,9 @@ class Contract extends Component {
}
render () {
const { accountsInfo, balances, contracts, netVersion, params } = this.props;
const { accountsInfo, contracts, netVersion, params } = this.props;
const { allEvents, contract, queryValues, loadingEvents } = this.state;
const account = contracts[params.address];
const balance = balances[params.address];
if (!account) {
return null;
@@ -133,7 +131,6 @@ class Contract extends Component {
<Page padded>
<Header
account={ account }
balance={ balance }
isContract
>
{ this.renderBlockNumber(account.meta) }
@@ -520,13 +517,11 @@ class Contract extends Component {
function mapStateToProps (state) {
const { accounts, accountsInfo, contracts } = state.personal;
const { balances } = state.balances;
const { netVersion } = state.nodeStatus;
return {
accounts,
accountsInfo,
balances,
contracts,
netVersion
};