eslint config tweaks, turn off eqeqeq rule
This commit is contained in:
parent
7a9c78ddfc
commit
8dd9d79f35
11
.eslintrc
11
.eslintrc
|
@ -5,17 +5,14 @@
|
|||
},
|
||||
"extends": [
|
||||
"oceanprotocol",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"prettier/react",
|
||||
"prettier/standard",
|
||||
"prettier",
|
||||
"prettier/@typescript-eslint"
|
||||
],
|
||||
"plugins": ["@typescript-eslint", "prettier"],
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"rules": {
|
||||
"no-use-before-define": "off",
|
||||
"eqeqeq": "off",
|
||||
"@typescript-eslint/no-use-before-define": "error"
|
||||
},
|
||||
"env": { "es6": true, "node": true }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,6 @@ export const ENABLE_DEBUG = true
|
|||
|
||||
const network = dataSource.network()
|
||||
|
||||
export const OCEAN: string = getOceanAddress()
|
||||
|
||||
function getOceanAddress(): string {
|
||||
if (network == 'ropsten') {
|
||||
return '0x5e8dcb2afa23844bcc311b00ad1a0c30025aade9'
|
||||
|
@ -46,6 +44,8 @@ function getOceanAddress(): string {
|
|||
return '0x967da4048cd07ab37855c090aaf366e4ce1b9f48'
|
||||
}
|
||||
|
||||
export const OCEAN: string = getOceanAddress()
|
||||
|
||||
export function _debuglog(
|
||||
message: string,
|
||||
event: ethereum.Event,
|
||||
|
@ -310,11 +310,10 @@ export function createPoolTransaction(
|
|||
|
||||
pool.consumePrice = poolTx.consumePrice
|
||||
pool.spotPrice = poolTx.spotPrice
|
||||
const { lockedValue } = pool
|
||||
pool.lockedValue = pool.oceanReserve + pool.datatokenReserve * pool.spotPrice
|
||||
const factory = PoolFactory.load('1')
|
||||
factory.totalLockedValue =
|
||||
factory.totalLockedValue - lockedValue + pool.lockedValue
|
||||
factory.totalLockedValue - pool.lockedValue + pool.lockedValue
|
||||
|
||||
pool.transactionCount = pool.transactionCount.plus(BigInt.fromI32(1))
|
||||
|
||||
|
|
|
@ -438,8 +438,11 @@ export function handleTransfer(event: Transfer): void {
|
|||
poolTx.sharesTransferAmount = value
|
||||
poolTx.sharesBalance = poolShareTo.balance
|
||||
}
|
||||
debuglog('pool shares mint: (id, value, totalShares)', event, [poolId, value.toString(), pool.totalShares.toString()])
|
||||
|
||||
debuglog('pool shares mint: (id, value, totalShares)', event, [
|
||||
poolId,
|
||||
value.toString(),
|
||||
pool.totalShares.toString()
|
||||
])
|
||||
} else if (isBurn) {
|
||||
if (poolShareFrom == null) {
|
||||
createPoolShareEntity(poolShareFromId, poolId, event.params.from.toHex())
|
||||
|
@ -452,7 +455,11 @@ export function handleTransfer(event: Transfer): void {
|
|||
poolTx.sharesTransferAmount = -value
|
||||
poolTx.sharesBalance = poolShareFrom.balance
|
||||
}
|
||||
debuglog('pool shares burn: (id, value, totalShares)', event, [poolId, value.toString(), pool.totalShares.toString()])
|
||||
debuglog('pool shares burn: (id, value, totalShares)', event, [
|
||||
poolId,
|
||||
value.toString(),
|
||||
pool.totalShares.toString()
|
||||
])
|
||||
} else {
|
||||
if (poolShareTo == null) {
|
||||
createPoolShareEntity(poolShareToId, poolId, event.params.to.toHex())
|
||||
|
|
Loading…
Reference in New Issue