Skip to content

Commit

Permalink
BestPrice interface
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Oct 8, 2020
1 parent aa58431 commit 40e4085
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ddo/DDO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Proof } from './interfaces/Proof'
import { PublicKey } from './interfaces/PublicKey'
import { Service, ServiceType } from './interfaces/Service'
import Web3Provider from '../datatokens/Web3Provider'
import { BestPrice } from './interfaces/BestPrice'
/**
* DID Descriptor Object.
* Contains all the data related to an asset.
Expand Down Expand Up @@ -51,11 +52,7 @@ export class DDO {

public proof: Proof

public dtBalance: number

public OceanBalance: number

public dtPrice: number
public price: BestPrice

public constructor(ddo: Partial<DDO> = {}) {
Object.assign(this, ddo, {
Expand Down
7 changes: 7 additions & 0 deletions src/ddo/interfaces/BestPrice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export interface BestPrice {
type: 'pool' | 'exchange'
address: string
value: number
ocean: number
datatoken: number
}
1 change: 1 addition & 0 deletions src/ddo/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './AdditionalInformation'
export * from './Authentication'
export * from './BestPrice'
export * from './Curation'
export * from './EditableMetadata'
export * from './EditableMetadataLinks'
Expand Down

0 comments on commit 40e4085

Please sign in to comment.