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
2 changes: 1 addition & 1 deletion .github/workflows/socket-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ name: Socket reachability scan

on:
schedule:
- cron: '48 8 * * 6'
- cron: "48 8 * * 6"
workflow_dispatch:

permissions:
Expand Down
30 changes: 30 additions & 0 deletions __tests__/components/FeeBreakdownBottomSheet.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,34 @@ describe("FeeBreakdownBottomSheet", () => {
expect(queryByText(`${BASE_FEE} XLM`)).toBeNull();
});
});

describe("inclusion fee override (preview)", () => {
it("previews the override inclusion fee and total without using the stored fee", () => {
mockUseTransactionBuilderStore.mockReturnValue({
...defaultBuilderState,
sorobanInclusionFeeXlm: INCLUSION_FEE,
sorobanResourceFeeXlm: RESOURCE_FEE,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any);

const overrideFee = "0.027";
const { getByText, queryByText } = render(
<FeeBreakdownBottomSheet
onClose={mockOnClose}
isSorobanContext
inclusionFeeXlmOverride={overrideFee}
/>,
);

// Inclusion reflects the in-progress override, not the stored fee.
expect(getByText(`${overrideFee} XLM`)).toBeTruthy();
expect(queryByText(`${INCLUSION_FEE} XLM`)).toBeNull();

// Total = override inclusion + resource fee.
const expectedTotal = (parseFloat(overrideFee) + parseFloat(RESOURCE_FEE))
.toFixed(7)
.replace(/\.?0+$/, "");
expect(getByText(`${expectedTotal} XLM`)).toBeTruthy();
});
});
});
16 changes: 4 additions & 12 deletions __tests__/components/TokensCollectiblesInline.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ describe("TokensCollectiblesInline", () => {
renderComponent();

expect(screen.getByText("Collectibles")).toBeTruthy();
expect(
screen.getByTestId("collectibles-inline-error"),
).toBeTruthy();
expect(screen.getByTestId("collectibles-inline-error")).toBeTruthy();
expect(screen.getByText("Error loading collectibles")).toBeTruthy();
});

Expand Down Expand Up @@ -308,9 +306,7 @@ describe("TokensCollectiblesInline", () => {

renderComponent();

expect(
screen.getByText("No tokens or collectibles to send"),
).toBeTruthy();
expect(screen.getByText("No tokens or collectibles to send")).toBeTruthy();
});

it("hides the collectibles section when there are no collectibles", () => {
Expand All @@ -321,9 +317,7 @@ describe("TokensCollectiblesInline", () => {
expect(screen.getByText("Tokens")).toBeTruthy();
expect(screen.getByTestId("balances-list-token-row")).toBeTruthy();
expect(screen.queryByText("Collectibles")).toBeNull();
expect(
screen.queryByText("No tokens or collectibles to send"),
).toBeNull();
expect(screen.queryByText("No tokens or collectibles to send")).toBeNull();
});

it("renders both the tokens and collectibles sections when both are present", () => {
Expand Down Expand Up @@ -351,9 +345,7 @@ describe("TokensCollectiblesInline", () => {
expect(screen.getByTestId("balances-list-token-row")).toBeTruthy();
expect(screen.getByText("Collectibles")).toBeTruthy();
expect(screen.getByText("Collectible #42")).toBeTruthy();
expect(
screen.queryByText("No tokens or collectibles to send"),
).toBeNull();
expect(screen.queryByText("No tokens or collectibles to send")).toBeNull();
});

it("hides the tokens section when there are no balances", () => {
Expand Down
Loading
Loading