fix liquidity (#363)

This commit is contained in:
mihaisc 2022-02-25 15:12:17 +02:00 committed by GitHub
parent f127e2206f
commit ab2d80429a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,12 +86,12 @@ export function handleExit(event: LOG_EXIT): void {
poolTx.datatoken = token.id
poolTx.datatokenValue = ammount.neg()
pool.datatokenLiquidity.minus(ammount)
pool.datatokenLiquidity = pool.datatokenLiquidity.minus(ammount)
} else {
poolTx.baseToken = token.id
poolTx.baseTokenValue = ammount.neg()
pool.baseTokenLiquidity.minus(ammount)
pool.baseTokenLiquidity = pool.baseTokenLiquidity.minus(ammount)
removeLiquidity(token.id, ammount)
}