Open iosonopersia opened 2 years ago
Update: removing the callback
parameter causes the following error when calling buyQuery
:
Error: Requester storage token is not set for selected provider "ipfs". Result archive upload will fail. at checkRequestRequirements (C:\Users\Simone\Documents\Github\desmo-sdk\node_modules\iexec\dist\common\execution\request-helper.js:103:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at IExecOrderModule.signRequestorder (C:\Users\Simone\Documents\Github\desmo-sdk\node_modules\iexec\dist\lib\IExecOrderModule.js:88:100) at Desmo.buyQuery (C:\Users\Simone\Documents\Github\desmo-sdk\src\lib\desmo-module.ts:162:28) at Context.
(C:\Users\Simone\Documents\Github\desmo-sdk\src\test\desmo-test.ts:45:7)
The doc is probably outdated... check the internal docs: https://github.com/iExecBlockchainComputing/iexec-sdk/blob/e41d2c282d10d3cbd19a4d8f47dd8e4639891aca/docs/interfaces/internal_.RequestorderTemplate.md. However, I still have to figure out why the callback is needed... since we must retrieve the task result manually... We have to investigate more.
I kept the callback
parameter in PR #1 but this means I had to use a @ts-ignore
comment. Let's keep this issue open until we fully understand how this function works.
We are using v7.2.1 of iExec SDK. Here's the line at which the callback
parameter gets used: see here. It gets validated to be sure it's a proper hex address and then it's put in the returned data structure.
We are using v7.2.1 of iExec SDK. Here's the line at which the
callback
parameter gets used: see here. It gets validated to be sure it's a proper hex address and then it's put in the returned data structure.
Related to this comment (?) In particular, I'm referring to why we need the verifyCallbackAddress
method.
See documentation of iExec SDK: IExecOrderModule:createRequestOrder.
The
createRequestOrder
function does not expect to receive acallback
parameter, so we need to check again the code ofbuyQuery
in theDesmo
module. We may simply need to remove this line.