test: add keys folder

This commit is contained in:
mahyargdz
2025-03-15 14:25:52 +03:30
parent 146c38025a
commit cb9860853e
8 changed files with 123 additions and 17 deletions
+2 -12
View File
@@ -3,18 +3,8 @@ import Decimal from "decimal.js";
import { ValueTransformer } from "typeorm";
export class DecimalTransformer implements ValueTransformer {
// to(value: Decimal | string | number): string {
// return new Decimal(value).toString();
// }
// from(value: string): number {
// return new Decimal(value).toNumber();
// }
to(value: Decimal | number | null): string | null {
if (value === null) return "0";
return value instanceof Decimal ? value.toString() : new Decimal(value).toString();
to(value: Decimal | null): string | null {
return value ? value.toString() : "0";
}
from(value: string | null): number {