From 66a056cf59ebba75cc0b042604c61fde8e8408fe Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 28 Jan 2020 19:42:07 +0100 Subject: [PATCH] update and clarify migration example --- MIGRATION.md | 7 ++++++- library.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 5b579b1..ca70432 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -13,14 +13,19 @@ squid-js v2.0.0 only works against: - Events Handler v0.4.4+ - Keeper Contracts v0.13.2+ -### Service index removal from `ocean.assets.order` & `ocean.assets.consume` +### Service index parameter removal from `ocean.assets` methods + +Removes the need to get the respective service from the DDO, the `ocean.assets` methods will now do this on their own automatically. ```js // old +const service = ddo.findServiceByType('access') +const did = ddo.id const agreementId = await ocean.assets.order(did, service.index, account) const path = await ocean.assets.consume(agreementId, did, service.index, account, folder) // NEW +const did = ddo.id const agreementId = await ocean.assets.order(did, account) const path = await ocean.assets.consume(agreementId, did, account, folder) ``` diff --git a/library.json b/library.json index 9d0cb91..b74efd3 100644 --- a/library.json +++ b/library.json @@ -19,7 +19,7 @@ }, { "name": "events-handler", - "version": "~0.4.1" + "version": "~0.4.4" } ] }