mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix getPoolSharesByAddress
This commit is contained in:
parent
7b16f7561f
commit
677ed0c492
@ -920,16 +920,18 @@ export class OceanPool extends Pool {
|
||||
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
const shares = await super.sharesBalance(account, events[i].returnValues[0])
|
||||
if (shares) {
|
||||
const onePool: PoolShare = {
|
||||
shares,
|
||||
poolAddress: events[i].returnValues[0],
|
||||
did: didPrefixed(didNoZeroX(await this.getDTAddress(events[i].returnValues[0])))
|
||||
if (parseFloat(shares) > 0) {
|
||||
const dtAddress = await this.getDTAddress(events[i].returnValues[0])
|
||||
if (dtAddress) {
|
||||
const onePool: PoolShare = {
|
||||
shares,
|
||||
poolAddress: events[i].returnValues[0],
|
||||
did: didPrefixed(didNoZeroX(dtAddress))
|
||||
}
|
||||
result.push(onePool)
|
||||
}
|
||||
result.push(onePool)
|
||||
}
|
||||
}
|
||||
console.log(result)
|
||||
return result
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user