Account view updates (#4008)

* Fix null account render issue, add tests

* Add tests for #3999 fix (merged in #4000)

* Only include sinon-as-promised globally for mocha

* Move transactions state into tested store

* Add esjify for mocha + ejs (cherry-picked)

* Extract store state into store, test it

* Use address (as per PR comments)

* Fix failing test after master merge
This commit is contained in:
Jaco Greeff
2017-01-05 12:06:35 +01:00
committed by GitHub
parent 881066243b
commit 602a4429cc
22 changed files with 1210 additions and 281 deletions

View File

@@ -50,8 +50,7 @@ export default class Actionbar extends Component {
}
return (
<ToolbarGroup
className={ styles.toolbuttons }>
<ToolbarGroup className={ styles.toolbuttons }>
{ buttons }
</ToolbarGroup>
);

View File

@@ -25,7 +25,7 @@ import styles from './certifications.css';
class Certifications extends Component {
static propTypes = {
account: PropTypes.string.isRequired,
address: PropTypes.string.isRequired,
certifications: PropTypes.array.isRequired,
dappsUrl: PropTypes.string.isRequired
}
@@ -60,10 +60,10 @@ class Certifications extends Component {
}
function mapStateToProps (_, initProps) {
const { account } = initProps;
const { address } = initProps;
return (state) => {
const certifications = state.certifications[account] || [];
const certifications = state.certifications[address] || [];
const dappsUrl = state.api.dappsUrl;
return { certifications, dappsUrl };

View File

@@ -22,13 +22,16 @@ import CompareIcon from 'material-ui/svg-icons/action/compare-arrows';
import ComputerIcon from 'material-ui/svg-icons/hardware/desktop-mac';
import ContractIcon from 'material-ui/svg-icons/action/code';
import DashboardIcon from 'material-ui/svg-icons/action/dashboard';
import DeleteIcon from 'material-ui/svg-icons/action/delete';
import DoneIcon from 'material-ui/svg-icons/action/done-all';
import LockedIcon from 'material-ui/svg-icons/action/lock-outline';
import EditIcon from 'material-ui/svg-icons/content/create';
import LockedIcon from 'material-ui/svg-icons/action/lock';
import NextIcon from 'material-ui/svg-icons/navigation/arrow-forward';
import PrevIcon from 'material-ui/svg-icons/navigation/arrow-back';
import SaveIcon from 'material-ui/svg-icons/content/save';
import SendIcon from 'material-ui/svg-icons/content/send';
import SnoozeIcon from 'material-ui/svg-icons/av/snooze';
import VerifyIcon from 'material-ui/svg-icons/action/verified-user';
import VisibleIcon from 'material-ui/svg-icons/image/remove-red-eye';
import VpnIcon from 'material-ui/svg-icons/notification/vpn-lock';
@@ -41,13 +44,16 @@ export {
ComputerIcon,
ContractIcon,
DashboardIcon,
DeleteIcon,
DoneIcon,
EditIcon,
LockedIcon,
NextIcon,
PrevIcon,
SaveIcon,
SendIcon,
SnoozeIcon,
VerifyIcon,
VisibleIcon,
VpnIcon
};