-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix/import acct when timed out #1832
Conversation
… session has timed out
@@ -466,6 +469,8 @@ export const popupMessageListener = (request: Request, sessionStore: Store) => { | |||
|
|||
const currentState = sessionStore.getState(); | |||
|
|||
sessionTimer.startSession(); |
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.
Small oversight - we were not starting the session timer on account creation
@@ -491,9 +496,6 @@ export const popupMessageListener = (request: Request, sessionStore: Store) => { | |||
keyName: TEMPORARY_STORE_EXTRA_ID, | |||
}); | |||
} catch (e) { | |||
captureException( | |||
`Could not login when adding account: ${JSON.stringify(e)}`, | |||
); |
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.
removing this Sentry alert because this will be triggered every time a user enters an incorrect password. This will pollute our Sentry dashboard with non-errors
let activePrivateKey = ""; | ||
try { | ||
// await _unlockKeystore({ keyID, password }); | ||
await _unlockKeystore({ keyID, password }); |
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.
mistakenly left this out - make sure to check the user's password is correct
@@ -555,12 +560,39 @@ export const popupMessageListener = (request: Request, sessionStore: Store) => { | |||
const importAccount = async () => { | |||
const { password, privateKey } = request; | |||
let sourceKeys; | |||
|
|||
let mnemonicPhrase = await getEncryptedTemporaryData({ |
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.
these changes are similar to the changes I added here for add account
: cb9d65c
We're making sure that if our session has timed out, we log back in with the user's password before continuing.
This is actually a bug that already exists in production, so making sure the UX is better in the new version
@@ -1121,9 +1155,6 @@ export const popupMessageListener = (request: Request, sessionStore: Store) => { | |||
try { | |||
await loginToAllAccounts(password); | |||
} catch (e) { | |||
captureException( | |||
`Could not login when confirming password: ${JSON.stringify(e)}`, | |||
); |
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 change as above - don't report to Sentry every time a user enter's an incorrect password
* Feature/memory security improvement 5.27.2 (#1827) * add temporary store extra data * add tests for switching accounts * reset session length * upgrade jest and add unit tests * rm unused selectors * fix sendpayment test * rm npm package and add unit tests * add better error handling and Sentry capture * rm console.log * make sure to login before adding new stellar address * add a test for imported S key payment * Fix/import acct when timed out (#1832) * make sure to login to all accounts before importing by private key if session has timed out * update comment * login before showing mnemonic phrase (#1834) * login before showing mnemonic phrase * add more Sentry error capture
* Feature/memory security improvement 5.27.2 (#1827) * add temporary store extra data * add tests for switching accounts * reset session length * upgrade jest and add unit tests * rm unused selectors * fix sendpayment test * rm npm package and add unit tests * add better error handling and Sentry capture * rm console.log * make sure to login before adding new stellar address * add a test for imported S key payment * Fix/import acct when timed out (#1832) * make sure to login to all accounts before importing by private key if session has timed out * update comment * login before showing mnemonic phrase (#1834) * login before showing mnemonic phrase * add more Sentry error capture
Similar to
add account
, if our session has timed out, make sure to log back in before adding a new account to the mix