1- import { describe , it , expect , beforeAll , jest } from '@jest/globals' ;
1+ import { describe , it , expect , beforeAll } from '@jest/globals' ;
22import { HDNodeWallet , Wallet } from 'ethers' ;
33import { IExec } from 'iexec' ;
4- import BN from 'bn.js' ;
54import { IExecDataProtectorCore } from '../../../src/index.js' ;
65import {
76 MAX_EXPECTED_BLOCKTIME ,
@@ -23,10 +22,13 @@ async function consumeProtectedDataOrder(
2322 secrets : Record < number , string > ,
2423 args : string
2524) {
26- const datasetOrderbook = await iexec . orderbook . fetchDatasetOrderbook ( protectedData , {
27- app : app ,
28- requester : await iexec . wallet . getAddress ( ) ,
29- } ) ;
25+ const datasetOrderbook = await iexec . orderbook . fetchDatasetOrderbook (
26+ protectedData ,
27+ {
28+ app : app ,
29+ requester : await iexec . wallet . getAddress ( ) ,
30+ }
31+ ) ;
3032 const datasetOrder = datasetOrderbook . orders [ 0 ] ?. order ;
3133 if ( ! datasetOrder ) {
3234 throw new Error ( 'No dataset order found' ) ;
@@ -132,8 +134,8 @@ describe('dataProtectorCore.getGrantedAccess()', () => {
132134 res . forEach ( ( grantedAccess ) => {
133135 expect (
134136 grantedAccess . apprestrict === authorizedApp ||
135- grantedAccess . apprestrict ===
136- '0x0000000000000000000000000000000000000000'
137+ grantedAccess . apprestrict ===
138+ '0x0000000000000000000000000000000000000000'
137139 ) . toBe ( true ) ;
138140 } ) ;
139141 } ,
@@ -152,8 +154,8 @@ describe('dataProtectorCore.getGrantedAccess()', () => {
152154 res . forEach ( ( grantedAccess ) => {
153155 expect (
154156 grantedAccess . requesterrestrict === authorizedUser ||
155- grantedAccess . requesterrestrict ===
156- '0x0000000000000000000000000000000000000000'
157+ grantedAccess . requesterrestrict ===
158+ '0x0000000000000000000000000000000000000000'
157159 ) . toBe ( true ) ;
158160 } ) ;
159161 } ,
@@ -188,7 +190,7 @@ describe('dataProtectorCore.getGrantedAccess()', () => {
188190 ( contact ) =>
189191 contact . apprestrict . toLowerCase ( ) === sconeAppAddress . toLowerCase ( ) &&
190192 contact . requesterrestrict . toLowerCase ( ) ===
191- userWalletAddress . toLowerCase ( )
193+ userWalletAddress . toLowerCase ( )
192194 ) ;
193195 expect ( result [ 0 ] ) . toEqual ( grantedAccess ) ;
194196 } ,
@@ -556,7 +558,9 @@ describe('dataProtectorCore.getGrantedAccess()', () => {
556558 } ) ;
557559
558560 // revoke all access - removes all dataset orders
559- await dataProtectorCore . revokeAllAccess ( { protectedData : protectedData . address } ) ;
561+ await dataProtectorCore . revokeAllAccess ( {
562+ protectedData : protectedData . address ,
563+ } ) ;
560564
561565 // check that no orders remain
562566 const { grantedAccess : accessAfterRevoke } =
0 commit comments