mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
stop register asset in market on register
This commit is contained in:
parent
6ab85631ca
commit
edb2d43d99
@ -22,17 +22,19 @@ export default class Ocean {
|
||||
|
||||
if (!Ocean.instance) {
|
||||
ConfigProvider.setConfig(config)
|
||||
Ocean.instance = new Ocean(await Keeper.getInstance())
|
||||
Ocean.instance = new Ocean()
|
||||
Ocean.instance.keeper = await Keeper.getInstance()
|
||||
}
|
||||
|
||||
return Ocean.instance
|
||||
}
|
||||
|
||||
private static instance = null
|
||||
|
||||
// @ts-ignore
|
||||
private keeper: Keeper
|
||||
|
||||
private constructor(keeper: Keeper) {
|
||||
this.keeper = keeper
|
||||
private constructor() {
|
||||
}
|
||||
|
||||
public async getAccounts(): Promise<Account[]> {
|
||||
@ -45,8 +47,6 @@ export default class Ocean {
|
||||
|
||||
public async register(asset: Asset): Promise<DDO> {
|
||||
|
||||
const {market} = this.keeper
|
||||
|
||||
const assetId: string = IdGenerator.generateId()
|
||||
const did: string = `did:op:${assetId}`
|
||||
const template = new Access()
|
||||
@ -92,7 +92,6 @@ export default class Ocean {
|
||||
await AquariusProvider.getAquarius().storeDDO(ddo)
|
||||
asset.setId(assetId)
|
||||
|
||||
await market.register(assetId, asset.price, asset.publisher.getId())
|
||||
return ddo
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user