Add new Componennt for Token Images (#4496) (#4498)

This commit is contained in:
Nicolas Gotchac
2017-02-09 17:41:27 +01:00
committed by Jaco Greeff
parent 48eac51c8a
commit 71f84067d9
11 changed files with 225 additions and 176 deletions

View File

@@ -73,7 +73,7 @@ describe('views/Account/Header', () => {
beforeEach(() => {
render({ balance: { balance: 'testing' } });
balance = component.find('Connect(Balance)');
balance = component.find('Balance');
});
it('renders', () => {

View File

@@ -37,7 +37,6 @@ class Account extends Component {
static propTypes = {
fetchCertifiers: PropTypes.func.isRequired,
fetchCertifications: PropTypes.func.isRequired,
images: PropTypes.object.isRequired,
setVisibleAccounts: PropTypes.func.isRequired,
accounts: PropTypes.object,
@@ -257,14 +256,13 @@ class Account extends Component {
return null;
}
const { balances, images } = this.props;
const { balances } = this.props;
return (
<Transfer
account={ account }
balance={ balance }
balances={ balances }
images={ images }
onClose={ this.store.toggleTransferDialog }
/>
);
@@ -289,12 +287,10 @@ class Account extends Component {
function mapStateToProps (state) {
const { accounts } = state.personal;
const { balances } = state.balances;
const { images } = state;
return {
accounts,
balances,
images
balances
};
}

View File

@@ -66,7 +66,6 @@ class Wallet extends Component {
static propTypes = {
address: PropTypes.string.isRequired,
balance: nullableProptype(PropTypes.object.isRequired),
images: PropTypes.object.isRequired,
isTest: PropTypes.bool.isRequired,
owned: PropTypes.bool.isRequired,
setVisibleAccounts: PropTypes.func.isRequired,
@@ -315,13 +314,12 @@ class Wallet extends Component {
return null;
}
const { walletAccount, balance, images } = this.props;
const { walletAccount, balance } = this.props;
return (
<Transfer
account={ walletAccount }
balance={ balance }
images={ images }
onClose={ this.onTransferClose }
/>
);
@@ -365,7 +363,6 @@ function mapStateToProps (_, initProps) {
const { isTest } = state.nodeStatus;
const { accountsInfo = {}, accounts = {} } = state.personal;
const { balances } = state.balances;
const { images } = state;
const walletAccount = accounts[address] || accountsInfo[address] || null;
if (walletAccount) {
@@ -379,7 +376,6 @@ function mapStateToProps (_, initProps) {
return {
address,
balance,
images,
isTest,
owned,
wallet,