diff --git a/src/wallet.ts b/src/wallet.ts index 555a0203..c314ca97 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -32,7 +32,7 @@ export type TransactionParams = { export type MessageParams = TransactionParams & { data: string; - signatureMethod: string; + signatureMethod?: string; }; export type TypedMessageParams = MessageParams & { @@ -42,7 +42,7 @@ export type TypedMessageParams = MessageParams & { export interface WalletMiddlewareOptions { getAccounts: (req: JsonRpcRequest) => Promise; processDecryptMessage?: ( - msgParams: Omit, + msgParams: MessageParams, req: JsonRpcRequest, ) => Promise; processEncryptionPublicKey?: ( @@ -430,7 +430,7 @@ WalletMiddlewareOptions): JsonRpcMiddleware { const ciphertext: string = params[0]; const address: string = await validateAndNormalizeKeyholder(params[1], req); const extraParams = params[2] || {}; - const msgParams: Omit = { + const msgParams: MessageParams = { ...extraParams, from: address, data: ciphertext,