Skip to content

Commit

Permalink
rename from OrderHistory to Order
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Oct 1, 2020
1 parent 386bb89 commit 2a715c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ocean/Assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export enum OrderProgressStep {
TransferDataToken
}

export interface OrderHistory {
export interface Order {
dtAddress: string
amount: string
timestamp: number
Expand Down Expand Up @@ -603,8 +603,8 @@ export class Assets extends Instantiable {
account: Account,
serviceType?: string,
fromBlock?: number
): Promise<OrderHistory[]> {
const results: OrderHistory[] = []
): Promise<Order[]> {
const results: Order[] = []
const address = this.web3.utils.toChecksumAddress(account.getId())
const events = await this.web3.eth.getPastLogs({
topics: [
Expand All @@ -614,7 +614,7 @@ export class Assets extends Instantiable {
})
for (let i = 0; i < events.length; i++) {
const blockDetails = await this.web3.eth.getBlock(events[i].blockNumber)
const order: OrderHistory = {
const order: Order = {
dtAddress: events[i].address,
timestamp: parseInt(String(blockDetails.timestamp)),
transactionHash: events[i].transactionHash,
Expand Down

0 comments on commit 2a715c9

Please sign in to comment.