File tree Expand file tree Collapse file tree
src/components/policyServer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,23 +109,17 @@ export class PolicyServer {
109109 return await this . askServer ( command )
110110 }
111111
112- // use checkDownload functionality for initializeCompute and startCompute,
113- // it will do the same credentials checks
114112 async checkInitializeCompute (
115113 documentId : string ,
116114 ddo : DDO ,
117115 serviceId : string ,
118- fileIndex : number ,
119- transferTxId : string ,
120116 consumerAddress : string ,
121117 policyServer : any
122118 ) : Promise < PolicyServerResult > {
123- return await this . checkDownload (
119+ return await this . checkInitialize (
124120 documentId ,
125121 ddo ,
126122 serviceId ,
127- fileIndex ,
128- transferTxId ,
129123 consumerAddress ,
130124 policyServer
131125 )
@@ -140,15 +134,17 @@ export class PolicyServer {
140134 consumerAddress : string ,
141135 policyServer : any
142136 ) : Promise < PolicyServerResult > {
143- return await this . checkDownload (
137+ const command = {
138+ action : 'startCompute' ,
144139 documentId,
145140 ddo,
146141 serviceId,
147142 fileIndex,
148143 transferTxId,
149144 consumerAddress,
150145 policyServer
151- )
146+ }
147+ return await this . askServer ( command )
152148 }
153149
154150 async passThrough ( request : any ) : Promise < PolicyServerResult > {
You can’t perform that action at this time.
0 commit comments