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

@@ -55,7 +55,6 @@ class AddressSelect extends Component {
// Redux props
accountsInfo: PropTypes.object,
accounts: PropTypes.object,
balances: PropTypes.object,
contacts: PropTypes.object,
contracts: PropTypes.object,
tokens: PropTypes.object,
@@ -356,10 +355,9 @@ class AddressSelect extends Component {
}
renderAccountCard (_account) {
const { balances, accountsInfo } = this.props;
const { accountsInfo } = this.props;
const { address, index = null } = _account;
const balance = balances[address];
const account = {
...accountsInfo[address],
..._account
@@ -368,7 +366,6 @@ class AddressSelect extends Component {
return (
<AccountCard
account={ account }
balance={ balance }
className={ styles.account }
key={ `account_${index}` }
onClick={ this.handleClick }
@@ -650,12 +647,10 @@ class AddressSelect extends Component {
function mapStateToProps (state) {
const { accountsInfo } = state.personal;
const { balances } = state.balances;
const { reverse } = state.registry;
return {
accountsInfo,
balances,
reverse
};
}