chore: complete the payment service

This commit is contained in:
mahyargdz
2025-02-04 16:12:33 +03:30
parent 5d91afcc6e
commit 626206c389
25 changed files with 296 additions and 82 deletions
@@ -0,0 +1,16 @@
// eslint-disable-next-line import/no-named-as-default
import Decimal from "decimal.js";
export class DecimalTransformer {
to(value: Decimal | string | number): string {
return new Decimal(value).toString();
}
from(value: string): number {
return new Decimal(value).toNumber();
}
}
export function decimal(value: Decimal | number | string): number {
return new Decimal(value).toNumber();
}