1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

Send the DID registry transaction before send the DDO to Aquarius. #200

This commit is contained in:
Pedro Gutiérrez 2019-04-23 01:44:34 +02:00 committed by Pedro Gutiérrez
parent c116cde4ca
commit 4438206914

View File

@ -134,7 +134,6 @@ export class OceanAssets extends Instantiable {
ddo.addChecksum() ddo.addChecksum()
await ddo.addProof(this.ocean, publisher.getId(), publisher.getPassword()) await ddo.addProof(this.ocean, publisher.getId(), publisher.getPassword())
const storedDdo = await this.ocean.aquarius.storeDDO(ddo)
await didRegistry.registerAttribute( await didRegistry.registerAttribute(
did.getId(), did.getId(),
ddo.getChecksum(), ddo.getChecksum(),
@ -142,6 +141,7 @@ export class OceanAssets extends Instantiable {
serviceEndpoint, serviceEndpoint,
publisher.getId(), publisher.getId(),
) )
const storedDdo = await this.ocean.aquarius.storeDDO(ddo)
return storedDdo return storedDdo
} }