mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix initialize
This commit is contained in:
parent
2d060ff79b
commit
799c2e98f2
@ -74,14 +74,21 @@ export class Provider extends Instantiable {
|
|||||||
serviceType: string,
|
serviceType: string,
|
||||||
consumerAddress: string
|
consumerAddress: string
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const DDO = await this.ocean.assets.resolve(did)
|
let DDO
|
||||||
|
try {
|
||||||
|
DDO = await this.ocean.assets.resolve(did)
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.error(e)
|
||||||
|
throw new Error('Failed to resolve DID')
|
||||||
|
}
|
||||||
const { dtAddress } = DDO
|
const { dtAddress } = DDO
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
did,
|
documentId: did,
|
||||||
dtAddress,
|
serviceId: serviceIndex,
|
||||||
serviceIndex,
|
serviceType: serviceType,
|
||||||
serviceType,
|
tokenAddress: dtAddress,
|
||||||
consumerAddress
|
consumerAddress: consumerAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user