help debug error.

This commit is contained in:
ssallam 2021-01-18 15:57:55 +01:00
parent 8d65cb5fb5
commit 00eacb7832

View File

@ -30,7 +30,7 @@ export const ONE_BD = BigDecimal.fromString('1.0')
export const ONE_BASE_18 = BigInt.fromI32(10).pow(18 as u8) export const ONE_BASE_18 = BigInt.fromI32(10).pow(18 as u8)
export const BONE = BigDecimal.fromString('1000000000000000000') export const BONE = BigDecimal.fromString('1000000000000000000')
export const ENABLE_DEBUG = false export const ENABLE_DEBUG = true
const network = dataSource.network() const network = dataSource.network()
@ -151,6 +151,9 @@ export function updatePoolTransactionToken(
feeValue: BigDecimal feeValue: BigDecimal
): void { ): void {
const ptx = PoolTransaction.load(poolTx) const ptx = PoolTransaction.load(poolTx)
if (ptx == null) {
log.error('?????????????????????????? PoolTransaction not found for {}, pooltokenid {} ????????????????', [poolTx, poolTokenId])
}
const poolToken = PoolToken.load(poolTokenId) const poolToken = PoolToken.load(poolTokenId)
const pool = PoolEntity.load(poolToken.poolId) const pool = PoolEntity.load(poolToken.poolId)
const ptxTokenValuesId = poolTx.concat('-').concat(poolToken.tokenAddress) const ptxTokenValuesId = poolTx.concat('-').concat(poolToken.tokenAddress)