mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -35,7 +35,7 @@ export class NativeMessageHandlerService {
|
||||
private messagingService: MessagingService,
|
||||
private i18nService: I18nService,
|
||||
private encryptedMessageHandlerService: EncryptedMessageHandlerService,
|
||||
private dialogService: DialogService
|
||||
private dialogService: DialogService,
|
||||
) {}
|
||||
|
||||
async handleMessage(message: Message) {
|
||||
@@ -91,7 +91,7 @@ export class NativeMessageHandlerService {
|
||||
this.messagingService.send("setFocus");
|
||||
|
||||
const nativeMessagingVerified = await firstValueFrom(
|
||||
VerifyNativeMessagingDialogComponent.open(this.dialogService, { applicationName }).closed
|
||||
VerifyNativeMessagingDialogComponent.open(this.dialogService, { applicationName }).closed,
|
||||
);
|
||||
|
||||
if (nativeMessagingVerified !== true) {
|
||||
@@ -114,7 +114,7 @@ export class NativeMessageHandlerService {
|
||||
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
|
||||
secret,
|
||||
remotePublicKey,
|
||||
EncryptionAlgorithm
|
||||
EncryptionAlgorithm,
|
||||
);
|
||||
|
||||
this.sendResponse({
|
||||
@@ -138,15 +138,14 @@ export class NativeMessageHandlerService {
|
||||
|
||||
private async handleEncryptedMessage(message: EncryptedMessage) {
|
||||
message.encryptedCommand = EncString.fromJSON(
|
||||
message.encryptedCommand.toString() as EncryptedString
|
||||
message.encryptedCommand.toString() as EncryptedString,
|
||||
);
|
||||
const decryptedCommandData = await this.decryptPayload(message);
|
||||
const { command } = decryptedCommandData;
|
||||
|
||||
try {
|
||||
const responseData = await this.encryptedMessageHandlerService.responseDataForCommand(
|
||||
decryptedCommandData
|
||||
);
|
||||
const responseData =
|
||||
await this.encryptedMessageHandlerService.responseDataForCommand(decryptedCommandData);
|
||||
|
||||
await this.sendEncryptedResponse(message, { command, payload: responseData });
|
||||
} catch (error) {
|
||||
@@ -156,7 +155,7 @@ export class NativeMessageHandlerService {
|
||||
|
||||
private async encryptPayload(
|
||||
payload: DecryptedCommandData,
|
||||
key: SymmetricCryptoKey
|
||||
key: SymmetricCryptoKey,
|
||||
): Promise<EncString> {
|
||||
return await this.cryptoService.encrypt(JSON.stringify(payload), key);
|
||||
}
|
||||
@@ -180,7 +179,7 @@ export class NativeMessageHandlerService {
|
||||
try {
|
||||
let decryptedResult = await this.cryptoService.decryptToUtf8(
|
||||
message.encryptedCommand as EncString,
|
||||
this.ddgSharedSecret
|
||||
this.ddgSharedSecret,
|
||||
);
|
||||
|
||||
decryptedResult = this.trimNullCharsFromMessage(decryptedResult);
|
||||
@@ -200,7 +199,7 @@ export class NativeMessageHandlerService {
|
||||
|
||||
private async sendEncryptedResponse(
|
||||
originalMessage: EncryptedMessage,
|
||||
response: DecryptedCommandData
|
||||
response: DecryptedCommandData,
|
||||
) {
|
||||
if (!this.ddgSharedSecret) {
|
||||
this.sendResponse({
|
||||
|
||||
Reference in New Issue
Block a user