From 582d80d62dfa83d4124aeea7c554a112a7c1b897 Mon Sep 17 00:00:00 2001 From: esser Date: Fri, 27 Dec 2024 21:33:57 +0800 Subject: [PATCH] fix: remove moment --- src/sdk/sdk-legacy/core/creditSession.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/sdk/sdk-legacy/core/creditSession.ts b/src/sdk/sdk-legacy/core/creditSession.ts index 5bc224b0..e2160341 100644 --- a/src/sdk/sdk-legacy/core/creditSession.ts +++ b/src/sdk/sdk-legacy/core/creditSession.ts @@ -1,4 +1,3 @@ -import moment from "moment"; import type { Address } from "viem"; import { PERCENTAGE_DECIMALS } from "../../constants"; @@ -58,9 +57,7 @@ export class CreditSession { readonly version: number; readonly since: number; - readonly sinceDate: string; readonly closedAt: number; - readonly closedAtDate: string; readonly initialAmount: bigint; readonly borrowedAmount: bigint; @@ -126,12 +123,6 @@ export class CreditSession { this.since = payload.since || 0; this.closedAt = payload.closedAt || 0; - this.sinceDate = moment((payload.sinceTimestamp || 0) * 1000).format( - "Do MMM YYYY", - ); - this.closedAtDate = moment((payload.closedAtTimestamp || 0) * 1000).format( - "Do MMM YYYY", - ); this.sinceTimestamp = payload.sinceTimestamp || 0; this.closedAtTimestamp = payload.closedAtTimestamp || 0; @@ -217,9 +208,7 @@ export class CreditSessionFiltered { readonly status: CreditSessionStatus; readonly since: number; - readonly sinceDate: string; readonly closedAt: number; - readonly closedAtDate: string; readonly sinceTimestamp: number; readonly closedAtTimestamp: number; @@ -253,10 +242,6 @@ export class CreditSessionFiltered { this.status = CREDIT_SESSION_STATUS_BY_ID[payload.status || 0]; this.since = payload.since || 0; this.closedAt = payload.closedAt || 0; - this.sinceDate = moment((payload.since || 0) * 1000).format("Do MMM YYYY"); - this.closedAtDate = moment((payload.closedAt || 0) * 1000).format( - "Do MMM YYYY", - ); this.sinceTimestamp = payload.sinceTimestamp || 0; this.closedAtTimestamp = payload.closedAtTimestamp || 0;