Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions __tests__/lib/fee-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { describe, it, expect } from "vitest";
import {
calculateFeeBreakdown,
isHighFee,
formatFee,
calculateBatchFees,
TYPICAL_FEES,
} from "@/lib/fee-utils";
Expand Down Expand Up @@ -51,20 +50,6 @@ describe("isHighFee", () => {
});
});

describe("formatFee", () => {
it("converts stroops to XLM string", () => {
expect(formatFee(10_000_000)).toBe("1.0000000");
});

it("respects decimals parameter", () => {
expect(formatFee(10_000_000, 2)).toBe("1.00");
});

it("handles small fees", () => {
expect(formatFee(100)).toBe("0.0000100");
});
});

describe("calculateBatchFees", () => {
it("multiplies fee per operation by count", () => {
const result = calculateBatchFees(5, 50_000);
Expand Down
8 changes: 0 additions & 8 deletions lib/fee-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ export function isHighFee(fee: number, averageFee: number): boolean {
return fee > averageFee * 2;
}

/**
* Format fee amount for display
*/
export function formatFee(stroops: number, decimals: number = 7): string {
const xlm = stroops / 1e7;
return xlm.toFixed(Math.min(decimals, 7));
}

/**
* Calculate batch operation total fees
*/
Expand Down
Loading