mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-10-31 23:35:19 +01:00
fix liquidity (#363)
This commit is contained in:
parent
f127e2206f
commit
ab2d80429a
@ -86,12 +86,12 @@ export function handleExit(event: LOG_EXIT): void {
|
|||||||
poolTx.datatoken = token.id
|
poolTx.datatoken = token.id
|
||||||
poolTx.datatokenValue = ammount.neg()
|
poolTx.datatokenValue = ammount.neg()
|
||||||
|
|
||||||
pool.datatokenLiquidity.minus(ammount)
|
pool.datatokenLiquidity = pool.datatokenLiquidity.minus(ammount)
|
||||||
} else {
|
} else {
|
||||||
poolTx.baseToken = token.id
|
poolTx.baseToken = token.id
|
||||||
poolTx.baseTokenValue = ammount.neg()
|
poolTx.baseTokenValue = ammount.neg()
|
||||||
|
|
||||||
pool.baseTokenLiquidity.minus(ammount)
|
pool.baseTokenLiquidity = pool.baseTokenLiquidity.minus(ammount)
|
||||||
removeLiquidity(token.id, ammount)
|
removeLiquidity(token.id, ammount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user