Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Dec 2, 2023
1 parent cb8b8f4 commit 3a80724
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type TransactionParams = {

export type MessageParams = TransactionParams & {
data: string;
signatureMethod: string;
signatureMethod?: string;
};

export type TypedMessageParams = MessageParams & {
Expand All @@ -42,7 +42,7 @@ export type TypedMessageParams = MessageParams & {
export interface WalletMiddlewareOptions {
getAccounts: (req: JsonRpcRequest) => Promise<string[]>;
processDecryptMessage?: (
msgParams: Omit<MessageParams, 'signatureMethod'>,
msgParams: MessageParams,
req: JsonRpcRequest,
) => Promise<string>;
processEncryptionPublicKey?: (
Expand Down Expand Up @@ -430,7 +430,7 @@ WalletMiddlewareOptions): JsonRpcMiddleware<any, Block> {
const ciphertext: string = params[0];
const address: string = await validateAndNormalizeKeyholder(params[1], req);
const extraParams = params[2] || {};
const msgParams: Omit<MessageParams, 'signatureMethod'> = {
const msgParams: MessageParams = {
...extraParams,
from: address,
data: ciphertext,
Expand Down

0 comments on commit 3a80724

Please sign in to comment.