Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 386130d

Browse files
Fix phase 2 selected fp icon (#1522)
* fix(BTC): should show correct BABY icon for phase-2 selected FP * fix: remove report a bug button as there is no such link yet
1 parent 3762199 commit 386130d

File tree

5 files changed

+19
-33
lines changed

5 files changed

+19
-33
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"@babylonlabs-io/babylon-proto-ts": "1.12.0",
33-
"@babylonlabs-io/bsn-registry": "0.2.0",
33+
"@babylonlabs-io/bsn-registry": "0.2.2",
3434
"@babylonlabs-io/btc-staking-ts": "2.5.6",
3535
"@babylonlabs-io/core-ui": "1.35.2",
3636
"@babylonlabs-io/wallet-connector": "1.11.6",

src/ui/common/components/Menu/SettingMenu/SettingMenuWrapper.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
BugReportIcon,
3-
SettingMenu,
4-
ThemeIcon,
5-
ThemedIcon,
6-
} from "@babylonlabs-io/core-ui";
1+
import { SettingMenu, ThemeIcon } from "@babylonlabs-io/core-ui";
72
import { useTheme } from "next-themes";
83
import { useEffect, useState } from "react";
94
import { FaMoon, FaSun } from "react-icons/fa";
@@ -30,13 +25,6 @@ export const SettingMenuWrapper = () => {
3025
setTheme(newTheme);
3126
};
3227

33-
const handleReportBug = () => {
34-
const reportBugUrl = process.env.NEXT_PUBLIC_REPORT_BUG_URL;
35-
if (reportBugUrl) {
36-
window.open(reportBugUrl, "_blank", "noopener,noreferrer");
37-
}
38-
};
39-
4028
const handleTermsOfUse = () => {
4129
window.open(
4230
"https://babylonlabs.io/terms-of-use",
@@ -76,17 +64,6 @@ export const SettingMenuWrapper = () => {
7664
{getThemeDescription()}
7765
</SettingMenu.Description>
7866
</SettingMenu.Item>
79-
80-
<SettingMenu.Item
81-
icon={
82-
<ThemedIcon background rounded>
83-
<BugReportIcon />
84-
</ThemedIcon>
85-
}
86-
onClick={handleReportBug}
87-
>
88-
Report a Bug
89-
</SettingMenu.Item>
9067
</SettingMenu.Group>
9168

9269
<SettingMenu.Group>

src/ui/common/state/FinalityProviderBsnState.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
} from "@/ui/common/types/finalityProviders";
1313
import { createStateUtils } from "@/ui/common/utils/createStateUtils";
1414

15+
import { getBsnLogoUrl } from "../utils/bsnLogo";
16+
1517
interface SortState {
1618
field?: string;
1719
direction?: "asc" | "desc";
@@ -22,6 +24,15 @@ interface FilterState {
2224
status: "active" | "inactive" | "";
2325
}
2426

27+
const { chainId: BBN_CHAIN_ID } = getNetworkConfigBBN();
28+
29+
const defaultBabylonBsn: Bsn = {
30+
id: BBN_CHAIN_ID,
31+
name: "Babylon Genesis",
32+
description: "Babylon Genesis",
33+
logoUrl: getBsnLogoUrl(BBN_CHAIN_ID),
34+
};
35+
2536
interface FinalityProviderBsnState {
2637
filter: FilterState;
2738
finalityProviders: FinalityProvider[];
@@ -81,8 +92,6 @@ const FILTERS = {
8192
filter.status && !filter.search ? STATUS_FILTERS[filter.status](fp) : true,
8293
};
8394

84-
const { chainId: BBN_CHAIN_ID } = getNetworkConfigBBN();
85-
8695
const defaultState: FinalityProviderBsnState = {
8796
filter: {
8897
search: "",
@@ -139,7 +148,7 @@ export function FinalityProviderBsnState({ children }: PropsWithChildren) {
139148
});
140149

141150
const {
142-
data: bsnList = [],
151+
data: bsnList = [defaultBabylonBsn],
143152
isLoading: bsnLoading,
144153
isError: bsnError,
145154
} = useBsn({

src/ui/common/types/bsn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ export interface Bsn {
22
id: string;
33
name: string;
44
description: string;
5-
activeTvl: number;
65
logoUrl: string;
6+
activeTvl?: number;
77
}

0 commit comments

Comments
 (0)