mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
update ocean.assets methods
This commit is contained in:
parent
e81c196d40
commit
c669089d3b
@ -59,8 +59,6 @@ export default class AssetFile extends PureComponent<
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const accounts = await ocean.accounts.list()
|
const accounts = await ocean.accounts.list()
|
||||||
const service = ddo.findServiceByType('access')
|
|
||||||
|
|
||||||
const agreements = await ocean.keeper.conditions.accessSecretStoreCondition.getGrantedDidByConsumer(
|
const agreements = await ocean.keeper.conditions.accessSecretStoreCondition.getGrantedDidByConsumer(
|
||||||
accounts[0].id
|
accounts[0].id
|
||||||
)
|
)
|
||||||
@ -74,7 +72,7 @@ export default class AssetFile extends PureComponent<
|
|||||||
;({ agreementId } = agreement)
|
;({ agreementId } = agreement)
|
||||||
} else {
|
} else {
|
||||||
agreementId = await ocean.assets
|
agreementId = await ocean.assets
|
||||||
.order(ddo.id, service.index, accounts[0])
|
.order(ddo.id, accounts[0])
|
||||||
.next((step: number) => this.setState({ step }))
|
.next((step: number) => this.setState({ step }))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +82,6 @@ export default class AssetFile extends PureComponent<
|
|||||||
const path = await ocean.assets.consume(
|
const path = await ocean.assets.consume(
|
||||||
agreementId,
|
agreementId,
|
||||||
ddo.id,
|
ddo.id,
|
||||||
service.index,
|
|
||||||
accounts[0],
|
accounts[0],
|
||||||
'',
|
'',
|
||||||
index
|
index
|
||||||
|
Loading…
Reference in New Issue
Block a user