mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1513781 - Use cached keys in FxA commands registration. r=vladikoff,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D14782 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
dc7c5aedef
commit
37b79a2c14
@ -272,7 +272,11 @@ class SendTab {
|
||||
publicKey: sendTabKeys.publicKey,
|
||||
authSecret: sendTabKeys.authSecret,
|
||||
};
|
||||
const {kSync, kXCS} = await this._fxAccounts.getKeys();
|
||||
// getEncryptedKey() can be called right after a sign-in/up to FxA:
|
||||
// We get -cached- keys using getSignedInUser() instead of getKeys()
|
||||
// because we will await on getKeys() which is already awaiting on
|
||||
// the promise we return.
|
||||
const {kSync, kXCS} = await this._fxAccounts.getSignedInUser();
|
||||
if (!kSync || !kXCS) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user