mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
optimizations in FRE
This commit is contained in:
parent
815668720b
commit
dfceb09d5e
@ -377,10 +377,8 @@ export class OceanFixedRateExchange {
|
|||||||
toBlock: 'latest'
|
toBlock: 'latest'
|
||||||
})
|
})
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
if (account) {
|
if (!account || events[i].returnValues[3] === account)
|
||||||
if (events[i].returnValues[3] === account)
|
result.push(await this.getExchange(events[i].returnValues[0]))
|
||||||
result.push(await this.getExchange(events[i].returnValues[0]))
|
|
||||||
} else result.push(await this.getExchange(events[i].returnValues[0]))
|
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
@ -402,10 +400,8 @@ export class OceanFixedRateExchange {
|
|||||||
toBlock: 'latest'
|
toBlock: 'latest'
|
||||||
})
|
})
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
if (account) {
|
if (!account || events[i].returnValues[1] === account)
|
||||||
if (events[i].returnValues[1] === account)
|
result.push(this.getEventData(events[i]))
|
||||||
result.push(this.getEventData(events[i]))
|
|
||||||
} else result.push(this.getEventData(events[i]))
|
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user