backend icon indicating copy to clipboard operation
backend copied to clipboard

update changed only tokens

Open gmbronco opened this issue 1 year ago • 0 comments

First query updates all the token rows - it get's really slow. Instead do select update.

modules/actions/content/sync-erc4626-blocked-buffers.ts

await prisma.$transaction([
    prisma.prismaToken.updateMany({
        where: {
            chain: chain,
        },
        data: { isBufferAllowed: true },
    }),
    prisma.prismaToken.updateMany({
        where: {
            chain: chain,
            address: { in: blockedBuffersForErc4626Addresses },
        },
        data: { isBufferAllowed: false },
    }),
]);

gmbronco avatar May 23 '25 11:05 gmbronco