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:
parent
6f22b930dc
commit
64d62726ff
@ -348,7 +348,7 @@ export class OceanFixedRateExchange {
|
|||||||
const constituents = await this.getExchange(events[i].returnValues[0])
|
const constituents = await this.getExchange(events[i].returnValues[0])
|
||||||
constituents.exchangeID = events[i].returnValues[0]
|
constituents.exchangeID = events[i].returnValues[0]
|
||||||
if (constituents.active === true && constituents.dataToken === dataTokenAddress) {
|
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)
|
const required = new BigNumber(minSupply)
|
||||||
if (supply >= required) {
|
if (supply >= required) {
|
||||||
result.push(constituents)
|
result.push(constituents)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user