Skip to content

Commit f1f2866

Browse files
feat: add callback mechanisme (#217)
* add callback to requestorder and add useCallback to requester secret * format --------- Co-authored-by: SeddikBellamine <[email protected]>
1 parent a88a12f commit f1f2866

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/config/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const MAX_DESIRED_APP_ORDER_PRICE = 0;
33
export const MAX_DESIRED_WORKERPOOL_ORDER_PRICE = 0;
44
export const DEFAULT_CONTENT_TYPE = 'text/plain';
55
export const ANY_DATASET_ADDRESS = 'any';
6+
export const CALLBACK_WEB3MAIL = '0x5f936db7ad6d29371808e42a87015595d90509ba';
67

78
export const DEFAULT_CHAIN_ID = 134;
89

src/web3mail/sendEmail.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Buffer } from 'buffer';
22
import {
3+
CALLBACK_WEB3MAIL,
34
DEFAULT_CONTENT_TYPE,
45
MAX_DESIRED_APP_ORDER_PRICE,
56
MAX_DESIRED_DATA_ORDER_PRICE,
@@ -268,6 +269,7 @@ export const sendEmail = async ({
268269
contentType: vContentType,
269270
senderName: vSenderName,
270271
emailContentEncryptionKey,
272+
useCallback: true,
271273
})
272274
);
273275

@@ -280,6 +282,7 @@ export const sendEmail = async ({
280282
workerpoolmaxprice: workerpoolorder.workerpoolprice,
281283
tag: ['tee', 'scone'],
282284
workerpool: vWorkerpoolAddressOrEns,
285+
callback: CALLBACK_WEB3MAIL,
283286
params: {
284287
iexec_secrets: {
285288
1: requesterSecretId,

0 commit comments

Comments
 (0)