vaimee / desmo-sdk

MIT License
2 stars 1 forks source link

Cleanup Desmo module #1

Closed iosonopersia closed 2 years ago

iosonopersia commented 2 years ago

Assigned the correct type to the iexec member of the Desmo module and added checks against this possibly undefined variable.

As a result, since the createRequestorder function from the iExec SDK (the latest v7.2.1) expects an object that does not have the callback property, a compilation error inside the buyQuery method emerged and needs to be addressed before accepting this Pull Request.

EDIT: see #5 for information on how we chose to deal with the callback issue.

relu91 commented 2 years ago

I read in #5 that the changes you made make the buyQuery function throw. Not sure what I should review here. Do you want some specific feedback?

Another thing, if you had introduced those changes in 3721e99 in other PR I would probably already merge them. it looks like an improvement and I like the observe pattern instead of the polling function. That's why I asked you all to have one PR for one issue.

iosonopersia commented 2 years ago

@relu91 Talking about the retrieveTaskID method... another question arises: will there always be a 0 field in deal.tasks? I think what we really need is a complete review of the Desmo module, maybe you could do it together with @iotondato. It should be checked whether we are using properly the iExec SDK...