1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

service fixes

This commit is contained in:
Jernej Pregelj 2019-02-15 15:35:14 +01:00
parent 1aa2ff7c76
commit 01b268efaa

View File

@ -30,17 +30,16 @@ export default class Details extends Component<DetailsProps, DetailsState> {
try {
const account = await this.context.ocean.getAccounts()
const service = ddo.findServiceByType('Access')
const serviceAgreementSignatureResult: any = await this.context.ocean.signServiceAgreement(
const serviceAgreementSignatureResult = await this.context.ocean.signServiceAgreement(
ddo.id,
service.serviceDefinitionId,
account[0]
)
Logger.log(service)
await this.context.ocean.initializeServiceAgreement(
ddo.id,
service.serviceDefinitionId,
serviceAgreementSignatureResult.serviceAgreementId,
serviceAgreementSignatureResult.serviceAgreementSignature,
serviceAgreementSignatureResult.agreementId,
serviceAgreementSignatureResult.signature,
(files: any) => {
Logger.log('downloading files', files)
files.forEach((file: any) => {