Skip to content

Commit 9e3931f

Browse files
test: update sendTelegramBulk e2e test for grantedAccess API
- Replace bulkRequest with grantedAccess parameter - Remove unused prepareBulkRequest call (now internal to sendTelegram) - Add maxProtectedDataPerTask parameter - Make protectedData optional in test call
1 parent f2fbc23 commit 9e3931f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/e2e/sendTelegramBulk.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe('web3telegram.sendTelegram() - Bulk Processing', () => {
165165
};
166166

167167
// Prepare the bulk request using the contacts
168-
const bulkRequest = await consumerDataProtectorInstance.prepareBulkRequest({
168+
await consumerDataProtectorInstance.prepareBulkRequest({
169169
bulkOrders,
170170
app: defaultConfig.dappAddress,
171171
workerpool: TEST_CHAIN.prodWorkerpool,
@@ -177,9 +177,10 @@ describe('web3telegram.sendTelegram() - Bulk Processing', () => {
177177

178178
// Process the bulk request
179179
const result: ProcessBulkRequestResponse | SendTelegramSingleResponse = await web3telegram.sendTelegram({
180-
telegramContent: 'Bulk test message', // Required by types but ignored when bulkRequest is provided
181-
protectedData: validProtectedData1.address, // Required by types but ignored when bulkRequest is provided
182-
bulkRequest,
180+
telegramContent: 'Bulk test message',
181+
// protectedData is optional when grantedAccess is provided
182+
grantedAccess: bulkOrders,
183+
maxProtectedDataPerTask: 3,
183184
workerpoolMaxPrice: prodWorkerpoolPublicPrice,
184185
});
185186

0 commit comments

Comments
 (0)