Skip to content

Commit d223455

Browse files
committed
Add in optional argument
1 parent aa7e887 commit d223455

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/module/src/method/MethodParameterEncoder.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export function isFlexibleProvablePure(
7575

7676
export function checkArgsProvable(
7777
target: RuntimeModule<unknown>,
78-
methodName: string
78+
methodName: string,
79+
base = true
7980
) {
8081
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
8182
const paramtypes: ArgTypeArray = Reflect.getMetadata(
@@ -92,7 +93,11 @@ export function checkArgsProvable(
9293

9394
const indizes = paramtypes
9495
.map((type, index) => {
95-
if (isProofBaseType(type) || isFlexibleProvablePure(type)) {
96+
if (
97+
base
98+
? isProofBaseType(type) || isFlexibleProvablePure(type)
99+
: isFlexibleProvablePure(type)
100+
) {
96101
return undefined;
97102
}
98103
return `${index}`;

packages/module/src/method/runtimeMethod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function runtimeMethodInternal(options: {
201201
methodName: string,
202202
descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<any>>
203203
) => {
204-
checkArgsProvable(target, methodName);
204+
checkArgsProvable(target, methodName, false);
205205
const executionContext = container.resolve<RuntimeMethodExecutionContext>(
206206
RuntimeMethodExecutionContext
207207
);

0 commit comments

Comments
 (0)