Skip to content

Commit

Permalink
fix: hide network in navbar on mainnet (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Apr 4, 2024
1 parent 6ac99d5 commit 2f50a51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Nav = ({ network }) => {
<A id="logo" href="/" onClick={() => setHideHero(false)}>
<img src={logo} alt="boltz.exchange logo" />
</A>
<Show when={network !== "main"}>
<Show when={network !== "mainnet"}>
<div id="network" class="btn btn-small">
{network}
</div>
Expand Down
3 changes: 2 additions & 1 deletion tests/pages/Nav.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render, screen } from "@solidjs/testing-library";

import Nav from "../../src/components/Nav";
import mainnetConfig from "../../src/configs/mainnet.json";
import { contextWrapper } from "../helper";

describe("Nav", () => {
Expand All @@ -17,7 +18,7 @@ describe("Nav", () => {
);

test("should not show network on mainnet", async () => {
const network = "main";
const network = mainnetConfig.network;

render(() => <Nav network={network} />, { wrapper: contextWrapper });

Expand Down

0 comments on commit 2f50a51

Please sign in to comment.