@@ -10,14 +10,15 @@ import {
1010 isEnsTest ,
1111 throwIfMissing ,
1212} from '../utils/validators.js' ;
13+ import { Contact , FetchUserContactsParams } from './types.js' ;
14+ import { IExec } from 'iexec' ;
15+ import { PublishedDatasetorder } from 'iexec/IExecOrderbookModule' ;
1316import {
14- Contact ,
1517 DappAddressConsumer ,
1618 DappWhitelistAddressConsumer ,
17- FetchUserContactsParams ,
1819 IExecConsumer ,
1920 SubgraphConsumer ,
20- } from './types .js' ;
21+ } from './internalTypes .js' ;
2122
2223export const fetchUserContacts = async ( {
2324 graphQLClient = throwIfMissing ( ) ,
@@ -63,7 +64,7 @@ export const fetchUserContacts = async ({
6364 } ) ,
6465 ] ) ;
6566 const orders = dappOrders . concat ( whitelistOrders ) ;
66- const myContacts : Contact [ ] = [ ] ;
67+ const myContacts : Omit < Contact , 'name' > [ ] = [ ] ;
6768 let web3DappResolvedAddress = vDappAddressOrENS ;
6869 if ( isEnsTest ( vDappAddressOrENS ) ) {
6970 web3DappResolvedAddress = await iexec . ens . resolveName ( vDappAddressOrENS ) ;
@@ -78,6 +79,8 @@ export const fetchUserContacts = async ({
7879 const contact = {
7980 address : order . order . dataset . toLowerCase ( ) ,
8081 owner : order . signer . toLowerCase ( ) ,
82+ remainingAccess : order . remaining ,
83+ accessPrice : order . order . datasetprice ,
8184 accessGrantTimestamp : order . publicationTimestamp ,
8285 isUserStrict : order . order . requesterrestrict !== ZeroAddress ,
8386 } ;
@@ -102,7 +105,12 @@ async function fetchAllOrdersByApp({
102105 userAddress,
103106 appAddress,
104107 isUserStrict,
105- } ) {
108+ } : {
109+ iexec : IExec ;
110+ userAddress : string ;
111+ appAddress : string ;
112+ isUserStrict : boolean ;
113+ } ) : Promise < PublishedDatasetorder [ ] > {
106114 const ordersFirstPage = iexec . orderbook . fetchDatasetOrderbook (
107115 ANY_DATASET_ADDRESS ,
108116 {
0 commit comments