From 00eacb7832adf0a66bf755518cf295c615d30430 Mon Sep 17 00:00:00 2001 From: ssallam Date: Mon, 18 Jan 2021 15:57:55 +0100 Subject: [PATCH] help debug error. --- src/helpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers.ts b/src/helpers.ts index ca12e0d..1545b87 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -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 BONE = BigDecimal.fromString('1000000000000000000') -export const ENABLE_DEBUG = false +export const ENABLE_DEBUG = true const network = dataSource.network() @@ -151,6 +151,9 @@ export function updatePoolTransactionToken( feeValue: BigDecimal ): void { const ptx = PoolTransaction.load(poolTx) + if (ptx == null) { + log.error('?????????????????????????? PoolTransaction not found for {}, pooltokenid {} ????????????????', [poolTx, poolTokenId]) + } const poolToken = PoolToken.load(poolTokenId) const pool = PoolEntity.load(poolToken.poolId) const ptxTokenValuesId = poolTx.concat('-').concat(poolToken.tokenAddress)