Skip to content

Commit a6d15a6

Browse files
committed
use PartialMessage and class instance
1 parent a67d07f commit a6d15a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { PlainMessage } from '@bufbuild/protobuf';
1+
import { PartialMessage } from '@bufbuild/protobuf';
22
import { createContextKey } from '@connectrpc/connect';
33
import {
44
AuthorizeRequest,
55
AuthorizeResponse,
66
} from '@penumbra-zone/protobuf/penumbra/custody/v1/custody_pb';
77

88
export const authorizeCtx = createContextKey<
9-
(req: PlainMessage<AuthorizeRequest>) => Promise<PlainMessage<AuthorizeResponse>>
9+
(req: PartialMessage<AuthorizeRequest>) => Promise<AuthorizeResponse>
1010
>(undefined as never);

packages/services/src/custody-service/authorize.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PlainMessage } from '@bufbuild/protobuf';
1+
import { PartialMessage } from '@bufbuild/protobuf';
22
import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect';
33
import { CustodyService } from '@penumbra-zone/protobuf';
44
import { Metadata } from '@penumbra-zone/protobuf/penumbra/core/asset/v1/asset_pb';
@@ -23,7 +23,7 @@ describe('Authorize request handler', () => {
2323
let req: AuthorizeRequest;
2424

2525
const mockFullViewingKeyCtx = vi.fn(() => Promise.resolve(testFullViewingKey));
26-
const mockAuthorizeCtx = vi.fn(({ plan }: PlainMessage<AuthorizeRequest>) =>
26+
const mockAuthorizeCtx = vi.fn(({ plan }: PartialMessage<AuthorizeRequest>) =>
2727
Promise.resolve(
2828
new AuthorizeResponse({ data: authorizePlan(testSpendKey, new TransactionPlan(plan)) }),
2929
),

0 commit comments

Comments
 (0)