-
Notifications
You must be signed in to change notification settings - Fork 974
Conversation
6bc57e5
to
1f9d193
Compare
d0d903e
to
cd94b65
Compare
Open questions:
And I will squash after reviews are done, so that it's easier to track changes when reviewing. |
6a2d73e
to
b4ae95e
Compare
Question number 3 was solved with @bsclifton help. We only have two more 😃 |
417a8c7
to
d8ab9d5
Compare
About #7481 (comment):
|
3e8cfe1
to
47e03f8
Compare
@cezaraugusto I agree. I added translations and we should leave |
b9cdefc
to
81a36a2
Compare
needs rebase. @NejcZdovc how doable it is to split each refactored/moved component in its own PR? This way we can speed-up code review and reduce regression risks. |
If you do please open an issue as tracking reference, similar to #7380 |
If it's ok with you I would rebase it after I squash it, otherwise merge mistake is quite possible, because I created 14 commits. I presume that there will be more conflicts, because it will take some time to review it and new changes will land in the master. If you don't need multiple commits for easier review, I can squash it right now. I think it would take too time consuming to split it now. I started really slow and small, but things are so connected (to do big changes) that I end up with one big PR. Sorry about that. |
ok np, just fix conflict/squash and we can start reviewing |
81a36a2
to
90f2314
Compare
@cezaraugusto conflict resolved, you can start with the review |
|
||
// style | ||
const globalStyles = require('../../styles/global') | ||
const paymentStyles = require('../../styles/payment') |
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.
super ++
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 Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
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 there's a typo on file name: advanceSettings
-> advancedSettings
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.
++
minimumPageTimeHigh=1 minute | ||
minimumVisitsLow=1 visit | ||
minimumVisitsMedium=5 visits | ||
minimumVisitsHigh=10 visits |
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.
thanks for 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.
++!
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.
Feedback left, great job 😄 This has some really nice cleanup which makes both maintaining the code and testing easier
Ping me once you've addressed the feedback by Cezar and I and we can squash + merge 😄
@@ -39,3 +40,41 @@ module.exports.shouldTrackView = (view, responseList) => { | |||
} | |||
return false | |||
} | |||
|
|||
module.exports.btcToCurrencyString = (btc, ledgerData) => { |
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.
Awesome! thanks for pulling this out- will make testing easy
const minDuration = this.props.ledgerData.getIn(['synopsisOptions', 'minDuration']) | ||
const minPublisherVisits = this.props.ledgerData.getIn(['synopsisOptions', 'minPublisherVisits']) | ||
|
||
// TODO translate seconds, minute and visits |
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.
You can remove this TODO since you put it into the preferences.properties 😄
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.
Removed
} else if (ledgerData.get('created')) { | ||
const transactions = ledgerData.get('transactions') | ||
const pendingFunds = Number(ledgerData.get('unconfirmed') || 0) | ||
|
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 entire method (walletStatus) could benefit from moving over to ledgerUtil 😄 (it would need to be reworked to take ledgerData as input). That would also make mocking it easier
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.
Moved
} | ||
} | ||
} | ||
|
||
.bitcoinDashboard { |
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.
Love seeing all this LESS being deleted 😄
less/about/preferences.less
Outdated
} | ||
} | ||
|
||
// TODO check what to remove |
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.
Was there more that needed to be removed? or did you need to test anything which had been removed so far?
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.
Just a left over
mockery.registerMock('../../../../extensions/brave/img/coinbase_2x.png') | ||
mockery.registerMock('../../../../extensions/brave/img/coinbase_logo.png') | ||
mockery.registerMock('../../../../extensions/brave/img/android_download.svg') | ||
mockery.registerMock('../../../../extensions/brave/img/ios_download.svg') |
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.
👍
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.
Awesome, thanks for all the hard-work. Bold - and very welcome - changes.
I left some comments and the only blocker is the crash of secondary key on ledger recovery.
@@ -0,0 +1,148 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
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 there's a typo on file name -> advanceSettings
/advancedSettings
. This is replicated although the changes
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.
@bsclifton fixed this
/> | ||
<div className={css(styles.keyContainer)}> | ||
<h3 className={css(styles.keyContainer__h3)} data-l10n-id='secondKey' /> | ||
<span className={css(styles.keyContainer__span)}>{passphrase}</span> |
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.
app crashes if I try to copy key 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.
Hmmm, it's not crashing for me. Can you please provide some reproduction steps?
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.
STR:
- Clear profile
- Enable payments
- Go to advanced settings
- Click backup your wallet
- Key 2 doesn't exist
- Try to copy key 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.
I tried this steps, but key 2 exists for me and copy is working as well. So the problem is not in a copy but in fact that key 2 doesn't exists
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.
As discussed on a Slack, this is specific to one ledger-state.json
file and I can't reproduce it with my ledger or on fresh profile, so I think this is not related to this PR
} | ||
|
||
return <div className={css(styles.historyFooter)}> | ||
<div className={css(styles.nextPayement)}> |
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.
typo
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.
Fixed
return <div {...props}> | ||
<SwitchControl id={this.props.prefKey} | ||
small={this.props.small} | ||
disabled={this.props.disabled} | ||
onClick={this.onClick} | ||
checkedOn={this.props.checked !== undefined ? this.props.checked : getSetting(this.props.prefKey, this.props.settings)} /> | ||
<label className={css(this.props.small && settingCheckboxStyles.label)} data-l10n-id={this.props.dataL10nId} htmlFor={this.props.prefKey} /> | ||
checkedOn={this.props.checked !== undefined ? this.props.checked : getSetting(this.props.prefKey, this.props.settings)} |
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.
(minor) can you stringify undefined
to 'undefined'
?
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.
Why would we want to compare it as a string?
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 meant to typeof this.props.checked !== 'undefined'
, but doesn't matter result is the same, let's keep as-is, sorry
@@ -85,224 +83,6 @@ const braveryPermissionNames = { | |||
'noScript': ['boolean', 'number'] | |||
} | |||
|
|||
class BitcoinDashboard extends ImmutableComponent { |
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.
If you didn't yet, please reference that PR also closes #7380
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.
f375451 it's already in
|
||
.nextReconcileDate { | ||
margin-bottom: 0; | ||
} |
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.
YESSSS
The lesser the LESS, the less™
Resolves brave#7501 brave#7380 brave#6364 Auditors: @bsclifton @cezaraugusto Test plan: - everything should work the same as was before the chage
e0d5db1
to
405efe5
Compare
@cezaraugusto @bsclifton Fixed everything that was found in the review process. PR is also squashed now. Can you please do a final review? |
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.
++ great work, thanks
++ great work, @NejcZdovc! Thanks for taking the time to review in detail too, @cezaraugusto 😄 |
git rebase -i
to squash commits (if needed).Resolves #7501
Auditors
@bsclifton @cezaraugusto
Test plan
Everything should be the same as was before the change