-
Notifications
You must be signed in to change notification settings - Fork 216
feat(wallet): system settings screen #2200
feat(wallet): system settings screen #2200
Conversation
14ed217
to
1ae8c27
Compare
f038212
to
b4abd39
Compare
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.
Some feedback
b4abd39
to
c41af9f
Compare
I've addressed all these issues @korhaliv . Ready for re-review. |
c41af9f
to
a9d6ddb
Compare
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.
Some more feedback
electron/updater.js
Outdated
await autoUpdater.checkForUpdates() | ||
updaterLog.info('Automatic Updates enabled') | ||
this.isActive = true | ||
autoUpdater.checkForUpdates() | ||
const oneHour = 60 * 60 * 1000 |
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.
Let's extract this into the config ?
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.
Done
package.json
Outdated
@@ -350,8 +350,10 @@ | |||
"lodash.merge": "4.6.1", | |||
"lodash.partition": "4.6.0", | |||
"lodash.pick": "4.4.0", | |||
"lodash.set": "^4.3.2", |
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.
Looks like set
was added not in exact
mode
const { isSettingsMenuOpen, closeSettingsMenu } = this.props | ||
if ( | ||
this.menuRef && | ||
(this.menuRef && !this.menuRef.contains(event.target)) && |
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.
redundant this.menuRef
check
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.
yep, removed
this.menuRef && | ||
(this.menuRef && !this.menuRef.contains(event.target)) && | ||
(this.buttonRef && !this.buttonRef.contains(event.target)) && | ||
isSettingsMenuOpen |
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'd move this to be the first check since it's faster than contains
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.
good call. done
{isSettingsMenuOpen ? <AngleUp width="0.6em" /> : <AngleDown width="0.6em" />} | ||
</Flex> | ||
</Flex> | ||
<Box ref={this.setWrapperRef}>{isSettingsMenuOpen && this.renderSettingsMenu()}</Box> |
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.
Is isSettingsMenuOpen
check is purposely applied to the inner render func and not to the wrapping Box
?
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.
No! Updated.
@@ -32,19 +32,21 @@ export const receiveLocale = (event, locale) => dispatch => { | |||
|
|||
export const initLocale = () => async (dispatch, getState) => { |
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.
async can go looks like
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.
Actually, setLocale
is an async method so I've updated this to await it.
const userCurrency = state.settings.fiatTicker | ||
if (userCurrency) { | ||
dispatch(setFiatTicker(userCurrency)) | ||
const currentConfig = settingsSelectors.currentConfig(state) |
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.
Here too
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.
Same here. Added missing await
@@ -150,6 +137,8 @@ const tickerSelectors = {} | |||
|
|||
tickerSelectors.currency = currencySelector | |||
tickerSelectors.tickerLoading = tickerLoadingSelector | |||
tickerSelectors.fiatTicker = fiatTickerSelector | |||
tickerSelectors.fiatTickers = fiatTickersSelector |
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.
Ideally i'd like to have this named differently. LIke fiatTicker and allFilatTicker or fiatTickerList
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 ticker reducer is exceptionally bad in terms of its naming and this issue of pluralised vs singular is a recurring one throughout our code codebase. I know this has come up several times and I have given the same response every time - but I really don't want to get into renaming things as part of this PR.
We need to do a wider cleanup of all of our reducers and standardize a bunch of things like this.
utils/renameKeys.js
Outdated
@@ -0,0 +1,10 @@ | |||
const renameKeys = (keysMap, obj) => |
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.
Could you add a desc please and/or some basic tests in order to know how to use this
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 method was actually never used in the end so I have removed it completely
* @param {Object} base Object to compare with | ||
* @return {Object} Return a new object who represent the diff | ||
*/ | ||
const difference = (object, base) => { |
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.
Ideally, some tests would be great for this kind of utils, as they may be tricky sometimes
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.
Added a few basic tests for this.
a9d6ddb
to
7715c2c
Compare
40d38d5
to
099251e
Compare
In order to support flexible fees, use generic keys fast, medium, slow rather than specific time based keys. Fix LN-Zap#2099
099251e
to
a471a92
Compare
a471a92
to
38a5650
Compare
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.
Tested ACK 38a5650
38a5650
to
d9cd800
Compare
Description:
Add new system settings screen for managing global config options.
Note: This PR implements the base functionality in a basic way. Still waiting for final designs.
Motivation and Context:
fix #1535
fix #1536
fix #2099
How Has This Been Tested?
Manually
Screenshots:
Types of changes:
Feature
Checklist: