1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

fix supply in searchforDT

This commit is contained in:
alexcos20 2020-09-10 04:36:56 -07:00
parent 6f22b930dc
commit 64d62726ff

View File

@ -348,7 +348,7 @@ export class OceanFixedRateExchange {
const constituents = await this.getExchange(events[i].returnValues[0])
constituents.exchangeID = events[i].returnValues[0]
if (constituents.active === true && constituents.dataToken === dataTokenAddress) {
const supply = new BigNumber(this.web3.utils.fromWei(constituents.supply))
const supply = new BigNumber(await this.getSupply(constituents.exchangeID))
const required = new BigNumber(minSupply)
if (supply >= required) {
result.push(constituents)