This commit is contained in:
Matthias Kretschmann 2021-01-18 16:38:59 +01:00
parent 4b4e8ed096
commit d5357e3718
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 15 additions and 14 deletions

18
package-lock.json generated
View File

@ -83,9 +83,9 @@
}
},
"@eslint/eslintrc": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
"integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
"integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
@ -95,7 +95,7 @@
"ignore": "^4.0.6",
"import-fresh": "^3.2.1",
"js-yaml": "^3.13.1",
"lodash": "^4.17.19",
"lodash": "^4.17.20",
"minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1"
},
@ -1885,13 +1885,13 @@
"dev": true
},
"eslint": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz",
"integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==",
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
"integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"@eslint/eslintrc": "^0.2.2",
"@eslint/eslintrc": "^0.3.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@ -1915,7 +1915,7 @@
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
"lodash": "^4.17.19",
"lodash": "^4.17.20",
"minimatch": "^3.0.4",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",

View File

@ -24,7 +24,7 @@
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"auto-changelog": "^2.2.1",
"eslint": "^7.17.0",
"eslint": "^7.18.0",
"eslint-config-oceanprotocol": "^1.5.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.1",

View File

@ -303,10 +303,11 @@ export function createPoolTransaction(
pool.consumePrice = poolTx.consumePrice
pool.spotPrice = poolTx.spotPrice
const lockedValue = pool.lockedValue
pool.lockedValue = pool.oceanReserve + (pool.datatokenReserve * pool.spotPrice)
let factory = PoolFactory.load('1')
factory.totalLockedValue = factory.totalLockedValue - lockedValue + pool.lockedValue
const { lockedValue } = pool
pool.lockedValue = pool.oceanReserve + pool.datatokenReserve * pool.spotPrice
const factory = PoolFactory.load('1')
factory.totalLockedValue =
factory.totalLockedValue - lockedValue + pool.lockedValue
pool.transactionCount = pool.transactionCount.plus(BigInt.fromI32(1))