Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint syntax, fix getFiat, and isaac's happier settings for development #130

Merged
merged 11 commits into from
Jun 15, 2017

Conversation

whilei
Copy link
Contributor

@whilei whilei commented Jun 14, 2017

  • Updates .eslintrc to accommodate some warnings I was getting

  • Updates a couple of files -- only as I came across them (far from complete) -- to use those eslinter settings

    • single-quotes,
    • object-shorthand,
    • object-curly-spacing...
      I'm not set on these settings; if you have other preferences I'm happy to adjust to whatever works. I would just like to make the code (eventually) compatible with the linter in any case.
  • Updates store/networkActions.js to use a much slower polling interval for sync status. 1/second was drowning my computer. This patch is not ideal -- it should eventually not be hardcoded, instead it should be configured as a node flag or something else -- but I haven't figured out how to do that yet. I'm not set on this; will be happy to revert if I'm the only one affected; I can just keep a git stash of the change if I need to.

  • Fix getFiat function to check for undefined/null argument, in which case it assumes 0

  • Minor addition to README to cover a basic geth-connector-wallet setup.

I don't know if ya'll use the linter as much as I do, but
it bothers me about a lot of things quite often...
If this gets in anybody/anythings way we can easily get rid of it.
Fixes double quotes to be single quotes, to val-object syntax,
and one import path that should have been relatively qualified
Problem: getting account/show throwing an error for me,
preventing loading account show.
> 'r.toString() undefined for null object'

Solution: set null/undefined arg to 0
It would be better to have this as a flag-configurable constant or
as a part of a '--develop' mode instead of hardcoding, but haven't
figured out how to do that yet.

Anyways, it really helps keep my computer from drowning
during development.
}
});
}

export function switchChain(network, id) {
return (dispatch) =>
rpc.call('backend_switchChain', [network]).then((result) => {
console.debug('switch chain', result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we're supposed to use log.debug, i get lint warnings with console

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

word. I was getting an error about import path and didn't understand where the package was. got it now.


let watchingHeight = false;
// (whilei: development: loading so often slows things a lot for me and clutters logs)
const loadSyncRate = 60 * 1000; // milliseconds
const loadHeightRate = 5 * 60 * 1000; // ditto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely related to this PR, but should we define all refresh actions in one place? right now in store.js we are refreshing transactions and exchange rates too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants