-
Notifications
You must be signed in to change notification settings - Fork 6
feat/enhancements #8
Conversation
Add normalize.css.
Pull Request Test Coverage Report for Build 12
💛 - Coveralls |
satello
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! My biggest overarching concern is there is quite a bit of code in here that currently wouldn't be used in the DApp such as the all the eth balance stuff and some of the utils and helpers. If we think we will never use it its probably worth it to take it out to reduce the clutter
README.md
Outdated
| DEV_ARBITRATOR_ADDRESS=0xaea35f89f98996ae06aac344ab4b9ce1731059c4 | ||
| REACT_APP_DEV_ETHEREUM_PROVIDER=http://localhost:8545 | ||
| REACT_APP_DEV_STORE_PROVIDER=https://kleros.in | ||
| REACT_APP_DEV_ARBITRATOR_ADDRESS=0xaea35f89f98996ae06aac344ab4b9ce1731059c4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This address has changed. I think you might just want to leave this blank in the boilerplate as it is likely to change a lot
| import * as walletSelectors from '../reducers/wallet' | ||
| import { eth } from './kleros' | ||
| import { renderIf } from '../utils/react-redux' | ||
| import RequiresMetaMask from '../components/requires-meta-mask' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like components being PascalCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean I should change the filename/path? Or is this good?
The only reason I made the filename kebab-case was so we can enforce a consistent filename pattern with the linter. Otherwise it would be up to us to make sure only component files have PascalCase filenames. I guess it's not that bad. What do you think?
| const { isWeb3Loaded } = this.state | ||
| const { accounts, children } = this.props | ||
|
|
||
| return renderIf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
src/bootstrap/kleros.js
Outdated
|
|
||
| export default new Kleros(web3.currentProvider, process.env.STORE_PROVIDER) | ||
| export { eth } | ||
| export default new Kleros(eth.currentProvider, process.env.STORE_PROVIDER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/constants/errors.js
Outdated
| export const WEB3_NOT_RESOLVED = | ||
| 'The object `web3` was not found. Maybe try to install Metamask https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en' | ||
| export const ETH_NO_ACCOUNTS = | ||
| 'web3 accounts were not found. Maybe try installing MetaMask: https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the wording should be something like web3 accounts not found. Do you have MetaMask installed? ...
| @@ -1,31 +1,71 @@ | |||
| import React, { PureComponent } from 'react' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this balance page for? is it just an example container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I needed an example container so I could write an integration test with the whole redux saga fetch/loading/{receive,failed} flow.
|
@satello I changed the ETH_NO_ACCOUNTS message. I got rid of all the utils that are not being used. Do you think there is anything else I should remove? I also made the app more "generic" by changing |
| newState = { ...newState, ['loading' + resource]: false } | ||
| for (const actionTypePrefix of Object.keys(automaticActionPluginMap)) { | ||
| const l = actionTypePrefix.length | ||
| const a = action.type.slice(0, l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name var l or a it's not very explicit
|
@satello I disagree with the |
|
@epiqueras good work |
This PR hopefully finalizes the boilerplate standard for now.
react-blockiesfor the security icons #5I also went around and standardized import/exports to follow a common standard (The index files in utils/components were causing Webpack to choke up when ran though jest or storybook because of circular dependencies):
e.g.
* assyntaxe.g.