mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
rename from OrderHistory to Order
This commit is contained in:
parent
386bb892ac
commit
2a715c9442
@ -33,7 +33,7 @@ export enum OrderProgressStep {
|
|||||||
TransferDataToken
|
TransferDataToken
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderHistory {
|
export interface Order {
|
||||||
dtAddress: string
|
dtAddress: string
|
||||||
amount: string
|
amount: string
|
||||||
timestamp: number
|
timestamp: number
|
||||||
@ -603,8 +603,8 @@ export class Assets extends Instantiable {
|
|||||||
account: Account,
|
account: Account,
|
||||||
serviceType?: string,
|
serviceType?: string,
|
||||||
fromBlock?: number
|
fromBlock?: number
|
||||||
): Promise<OrderHistory[]> {
|
): Promise<Order[]> {
|
||||||
const results: OrderHistory[] = []
|
const results: Order[] = []
|
||||||
const address = this.web3.utils.toChecksumAddress(account.getId())
|
const address = this.web3.utils.toChecksumAddress(account.getId())
|
||||||
const events = await this.web3.eth.getPastLogs({
|
const events = await this.web3.eth.getPastLogs({
|
||||||
topics: [
|
topics: [
|
||||||
@ -614,7 +614,7 @@ export class Assets extends Instantiable {
|
|||||||
})
|
})
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
const blockDetails = await this.web3.eth.getBlock(events[i].blockNumber)
|
const blockDetails = await this.web3.eth.getBlock(events[i].blockNumber)
|
||||||
const order: OrderHistory = {
|
const order: Order = {
|
||||||
dtAddress: events[i].address,
|
dtAddress: events[i].address,
|
||||||
timestamp: parseInt(String(blockDetails.timestamp)),
|
timestamp: parseInt(String(blockDetails.timestamp)),
|
||||||
transactionHash: events[i].transactionHash,
|
transactionHash: events[i].transactionHash,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user