mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
remove duplicate totalSupply
This commit is contained in:
parent
69a0b0d8a2
commit
617bf7fe33
@ -157,24 +157,6 @@ export class Pool extends PoolFactory {
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total supply of pool tokens
|
||||
* @param {String} poolAddress
|
||||
* @return {String}
|
||||
*/
|
||||
async totalSupply(poolAddress: string): Promise<string> {
|
||||
let result = null
|
||||
|
||||
try {
|
||||
const pool = new this.web3.eth.Contract(this.poolABI, poolAddress)
|
||||
const totalSupply = await pool.methods.totalSupply().call()
|
||||
result = this.web3.utils.fromWei(totalSupply)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds tokens to pool
|
||||
* @param {String} account
|
||||
|
Loading…
x
Reference in New Issue
Block a user