Skip to content

Commit 428591e

Browse files
fix: maxProtectedDataPerTask is optional
1 parent e7b2d59 commit 428591e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/sdk/src/lib/dataProtectorCore/prepareBulkRequest.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const prepareBulkRequest = async ({
3939
iexec = throwIfMissing(),
4040
bulkOrders,
4141
app,
42-
maxProtectedDataPerTask,
42+
maxProtectedDataPerTask = 100,
4343
appMaxPrice = MAX_DESIRED_APP_ORDER_PRICE,
4444
workerpoolMaxPrice = MAX_DESIRED_WORKERPOOL_ORDER_PRICE,
4545
args,
@@ -57,7 +57,6 @@ export const prepareBulkRequest = async ({
5757
}
5858
const vApp = addressOrEnsSchema().required().label('app').validateSync(app);
5959
const vMaxProtectedDataPerTask = positiveNumberSchema()
60-
.required()
6160
.label('maxProtectedDataPerTask')
6261
.validateSync(maxProtectedDataPerTask);
6362
const vAppMaxPrice = positiveNumberSchema()

packages/sdk/src/lib/types/coreTypes.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,11 @@ export type PrepareBulkRequestParams = {
453453
app: AddressOrENS;
454454

455455
/**
456-
* Maximum number of datasets per task
456+
* Maximum number of protected data to process per task (any protected data exceeding this number will be processed in another task)
457+
*
458+
* @default 100
457459
*/
458-
maxProtectedDataPerTask: number;
460+
maxProtectedDataPerTask?: number;
459461

460462
/**
461463
* Maximum price willing to pay for the app order (in nRLC)

0 commit comments

Comments
 (0)