mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add getDTMaxAddLiquidity and getOceanMaxAddLiquidity
This commit is contained in:
parent
d2b770a982
commit
f856ef7058
@ -351,6 +351,23 @@ export class OceanPool extends Pool {
|
||||
return this.calcSingleOutGivenPoolIn(poolAddress, this.oceanAddress, poolShares)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns max DT amount that you can add to the pool
|
||||
* @param poolAddress
|
||||
*/
|
||||
public async getDTMaxAddLiquidity(poolAddress: string): Promise<string> {
|
||||
const dtAddress = await this.getDTAddress(poolAddress)
|
||||
return this.getMaxAddLiquidity(poolAddress, dtAddress)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns max Ocean amount that you can add to the pool
|
||||
* @param poolAddress
|
||||
*/
|
||||
public async getOceanMaxAddLiquidity(poolAddress: string): Promise<string> {
|
||||
return this.getMaxAddLiquidity(poolAddress, this.oceanAddress)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns max amount of tokens that you can add to the pool
|
||||
* @param poolAddress
|
||||
|
Loading…
x
Reference in New Issue
Block a user