-
Notifications
You must be signed in to change notification settings - Fork 102
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
Conversation
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.
src/store/networkActions.js
Outdated
} | ||
}); | ||
} | ||
|
||
export function switchChain(network, id) { | ||
return (dispatch) => | ||
rpc.call('backend_switchChain', [network]).then((result) => { | ||
console.debug('switch chain', result); |
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 we're supposed to use log.debug
, i get lint warnings with console
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.
word. I was getting an error about import path and didn't understand where the package was. got it now.
src/store/networkActions.js
Outdated
|
||
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 |
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.
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.
solution: add them with 'object-shorthand'... i think
Updates
.eslintrc
to accommodate some warnings I was gettingUpdates 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 assumes0
Minor addition to README to cover a basic geth-connector-wallet setup.