Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/KeyringController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { remove0x, isValidHexAddress } from '@metamask/utils';
import type {
Hex,
Json,
Bytes,
Keyring,
KeyringClass,
Eip1024EncryptedData,
Expand Down Expand Up @@ -467,7 +466,7 @@ class KeyringController extends EventEmitter {
async getEncryptionPublicKey(
address: string,
opts: Record<string, unknown> = {},
): Promise<Bytes> {
): Promise<string> {
const normalizedAddress = normalizeToHex(address) as Hex;
const keyring = await this.getKeyringForAccount(address);
if (!keyring.getEncryptionPublicKey) {
Expand All @@ -490,7 +489,7 @@ class KeyringController extends EventEmitter {
async decryptMessage(msgParams: {
from: string;
data: Eip1024EncryptedData;
}): Promise<Bytes> {
}): Promise<string> {
const address = normalizeToHex(msgParams.from) as Hex;
const keyring = await this.getKeyringForAccount(address);
if (!keyring.decryptMessage) {
Expand All @@ -516,7 +515,7 @@ class KeyringController extends EventEmitter {
data: Record<string, unknown>[];
},
opts: Record<string, unknown> = { version: 'V1' },
): Promise<Bytes> {
): Promise<string> {
// Cast to `Hex` here is safe here because `msgParams.from` is not nullish.
// `normalizeToHex` returns `Hex` unless given a nullish value.
const address = normalizeToHex(msgParams.from) as Hex;
Expand Down