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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user