-
Notifications
You must be signed in to change notification settings - Fork 973
Adds transition for disabled wallets #11626
Conversation
8bedda4
to
d037100
Compare
when this is merged and new build is done, we need to check if we didn't regressed in #11506 |
app/browser/api/ledger.js
Outdated
@@ -2212,7 +2226,7 @@ const migration = (state) => { | |||
} | |||
}) | |||
} catch (err) { | |||
console.log('Error migrating file', err.toString()) | |||
console.log(err.toString()) |
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.
nit console.error here so it has callstack 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.
will check the whole ledger.js
file and replace it where needed
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
app/browser/api/ledger.js
Outdated
@@ -2327,7 +2364,7 @@ const transitionWalletToBat = () => { | |||
|
|||
try { | |||
client.transition(newPaymentId, (err, properties) => { | |||
if (err) { | |||
if (err || newClient == null) { |
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 you want !newClient
here because otherwise newClient
's false
could be used in the else
.
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
app/common/state/migrationState.js
Outdated
|
||
hasBeenNotified: (state) => { | ||
state = validateState(state) | ||
return state.getIn(['migrations', 'batMercuryTimestamp']) !== state.getIn(['migrations', 'btc2BatNotifiedTimestamp']) |
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.
Pls add comment here that this only happens on initial state, I think that's the case from reading the code.
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
app/common/state/migrationState.js
Outdated
|
||
hasUpgradedWallet: (state) => { | ||
state = validateState(state) | ||
return state.getIn(['migrations', 'batMercuryTimestamp']) !== state.getIn(['migrations', 'btc2BatTimestamp']) |
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.
Pls add comment here that this only happens on initial state, I think that's the case from reading the code.
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
37b6568
to
87bd992
Compare
Resolves brave#11611 Auditors: Test Plan:
Resolves brave#11614 Auditors: Test Plan:
87bd992
to
9c8f3b5
Compare
Codecov Report
@@ Coverage Diff @@
## master #11626 +/- ##
==========================================
+ Coverage 52.26% 52.33% +0.07%
==========================================
Files 268 269 +1
Lines 25311 25377 +66
Branches 4034 4042 +8
==========================================
+ Hits 13228 13281 +53
- Misses 12083 12096 +13
|
Adds transition for disabled wallets
Adds transition for disabled wallets
Adds transition for disabled wallets
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #11611
Resolves #11614
Auditors:
Plan A
Plan B
Plan C
Plan D
Reviewer Checklist:
Tests