Skip to content

Commit

Permalink
fix getOrderHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Oct 20, 2020
1 parent 75c0453 commit c1a0345
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ocean/Assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,13 @@ export class Assets extends Instantiable {
const address = account.getId().toLowerCase()
const { datatokens } = this.ocean
const topic1 = '0x000000000000000000000000' + address.substring(2)
const topic0 = datatokens.getStartOrderEventSignature()
const events = await this.web3.eth.getPastLogs({
topics: [[datatokens.getStartOrderEventSignature(), null, topic1]],
topics: [topic0, null, topic1],
fromBlock: fromBlock || 0,
toBlock: 'latest'
})

for (let i = 0; i < events.length; i++) {
const order: Order = {
dtAddress: events[i].address,
Expand Down

0 comments on commit c1a0345

Please sign in to comment.