mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
update and clarify migration example
This commit is contained in:
parent
9572b4eb3b
commit
66a056cf59
@ -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)
|
||||
```
|
||||
|
@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"name": "events-handler",
|
||||
"version": "~0.4.1"
|
||||
"version": "~0.4.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user