From 9fafe63959a679a032de91bf31ce08aed6b5c35c Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:39:24 +0100 Subject: [PATCH] fix: missing gyro data table --- modules/pool/lib/pool-creator.service.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/pool/lib/pool-creator.service.ts b/modules/pool/lib/pool-creator.service.ts index 4158b394e..7785cd069 100644 --- a/modules/pool/lib/pool-creator.service.ts +++ b/modules/pool/lib/pool-creator.service.ts @@ -236,6 +236,22 @@ export class PoolCreatorService { }); } + // TODO: It's just a quick fix. Remove after merging json column replacement for tables + if (pool.poolType!.includes('Gyro')) { + await prisma.prismaPoolGyroData.upsert({ + where: { poolId_chain: { poolId: pool.id, chain: this.chain } }, + create: { + id: pool.id, + poolId: pool.id, + chain: this.chain, + ...(poolWithoutTokens.gyroData!.update || {}), + }, + update: { + ...(poolWithoutTokens.gyroData!.update || {}), + }, + }); + } + await prisma.prismaPool.update({ data: poolWithoutTokens, where: {