mirror of
https://github.com/oceanprotocol/market.git
synced 2024-06-30 05:41:41 +02:00
multiple remove liquidity fixes
* never go more than 100% in slider * fix removing OCEAN
This commit is contained in:
parent
6904cdf293
commit
f01f885884
|
@ -81,7 +81,7 @@ export default function Remove({
|
|||
: await ocean.pool.removeOceanLiquidity(
|
||||
accountId,
|
||||
poolAddress,
|
||||
amountDatatoken,
|
||||
amountOcean,
|
||||
amountPoolShares
|
||||
)
|
||||
|
||||
|
|
|
@ -15,9 +15,12 @@ export async function getMaxValuesRemove(
|
|||
amountMaxOcean
|
||||
)
|
||||
|
||||
const amountMaxPercent = `${Math.floor(
|
||||
let amountMaxPercent = `${Math.floor(
|
||||
(Number(amountMaxPoolShares) / Number(poolTokens)) * 100
|
||||
)}`
|
||||
if (Number(amountMaxPercent) > 100) {
|
||||
amountMaxPercent = '100'
|
||||
}
|
||||
|
||||
const amountOcean = await ocean.pool.getOceanRemovedforPoolShares(
|
||||
poolAddress,
|
||||
|
|
Loading…
Reference in New Issue
Block a user