Skip to content

Commit

Permalink
fix: remove moment
Browse files Browse the repository at this point in the history
  • Loading branch information
essserrr committed Dec 27, 2024
1 parent 92ed13e commit 582d80d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/sdk/sdk-legacy/core/creditSession.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import moment from "moment";
import type { Address } from "viem";

import { PERCENTAGE_DECIMALS } from "../../constants";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 582d80d

Please sign in to comment.