From a6de8cf43c2bd0c1a583538041cdadd94b2abacc Mon Sep 17 00:00:00 2001 From: Vasyl Ivanchuk Date: Sat, 24 Feb 2024 10:36:48 +0200 Subject: [PATCH] fix: add transaction error reason transformer --- packages/worker/src/entities/transaction.entity.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/worker/src/entities/transaction.entity.ts b/packages/worker/src/entities/transaction.entity.ts index 75d1090398..b7fe17d1fa 100644 --- a/packages/worker/src/entities/transaction.entity.ts +++ b/packages/worker/src/entities/transaction.entity.ts @@ -4,6 +4,7 @@ import { hexTransformer } from "../transformers/hex.transformer"; import { Batch } from "./batch.entity"; import { Block } from "./block.entity"; import { CountableEntity } from "./countable.entity"; +import { stringTransformer } from "../transformers/string.transformer"; @Entity({ name: "transactions" }) @Index(["receivedAt", "transactionIndex"]) @@ -89,9 +90,9 @@ export class Transaction extends CountableEntity { @Column({ type: "int", default: 1 }) public readonly receiptStatus: number; - @Column({ nullable: true }) + @Column({ nullable: true, transformer: stringTransformer }) public readonly error?: string; - @Column({ nullable: true }) + @Column({ nullable: true, transformer: stringTransformer }) public readonly revertReason?: string; }