This commit is contained in:
mihaisc 2021-09-03 14:40:08 +03:00 committed by GitHub
parent 4b85c1fc53
commit 4a6d342fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,12 +304,13 @@ export function updatePoolTransactionToken(
log.error('Cannot load PoolEntity {}', [poolToken.poolId]) log.error('Cannot load PoolEntity {}', [poolToken.poolId])
return return
} }
const ptxTokenValuesId = poolTx.concat('-').concat(poolToken.tokenAddress) const ptxTokenValuesId = poolTx.concat('-').concat(poolTokenId)
let ptxTokenValues = PoolTransactionTokenValues.load(ptxTokenValuesId) let ptxTokenValues = PoolTransactionTokenValues.load(ptxTokenValuesId)
if (ptxTokenValues == null) { if (ptxTokenValues == null) {
ptxTokenValues = new PoolTransactionTokenValues(ptxTokenValuesId) ptxTokenValues = new PoolTransactionTokenValues(ptxTokenValuesId)
log.warning('created PoolTransactionTokenValues for {}', [ptxTokenValuesId]) log.warning('created PoolTransactionTokenValues for {}', [ptxTokenValuesId])
} }
ptxTokenValues.txId = poolTx ptxTokenValues.txId = poolTx
ptxTokenValues.poolToken = poolTokenId ptxTokenValues.poolToken = poolTokenId
ptxTokenValues.poolAddress = poolToken.poolId ptxTokenValues.poolAddress = poolToken.poolId
@ -326,7 +327,10 @@ export function updatePoolTransactionToken(
} }
ptxTokenValues.save() ptxTokenValues.save()
log.warning('ptxTokenValues {} saved', [ptxTokenValues.id]) log.warning('ptxTokenValues {} saved {}', [
ptxTokenValues.id,
ptxTokenValues.type
])
if (ptxTokenValues.tokenAddress == OCEAN) { if (ptxTokenValues.tokenAddress == OCEAN) {
const factory = PoolFactory.load('1') const factory = PoolFactory.load('1')