Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/AELF-24401518: Removed network section from the header as wont support testnet and sidechain #16

Merged
merged 2 commits into from
Dec 8, 2023
Merged
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 app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function RootLayout({
return (
<html lang="en">
<head>
<title>Companion wallet</title>
<title>Ledger wallet</title>
</head>
<body>{children}</body>
</html>
Expand Down
5 changes: 0 additions & 5 deletions components/common/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
NetworkStateEnum,
networkState,
} from "@/state";
import NetworkSelection from "@/components/overview/components/NetworkSelection";
import logoTestnetImage from '@/assets/icon/logo-testnet.svg';
import logoMainnetImage from '@/assets/icon/logo-mainnet.svg';
import styles from "./style.module.css";
Expand All @@ -16,7 +15,6 @@ interface HeaderProps {
externalClasses?: Partial<{container: string, header: string}>;
}
const Header = ({
showNetwork,
externalClasses,
}: HeaderProps) => {
const network = useRecoilValue(networkState);
Expand All @@ -29,9 +27,6 @@ const Header = ({
<Image src={network == NetworkStateEnum.testnet ? logoTestnetImage : logoMainnetImage} alt="Aelf logo" height={36}/>
<Typography.Text className={clsx(styles.title, network == NetworkStateEnum.mainnet && styles.mainnetworkHeaderTitle)}>Ledger Wallet</Typography.Text>
</Col>
{showNetwork && <Col span={12}>
<NetworkSelection />
</Col>}
</Row>
</Layout.Header>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Companion wallet</title>
<title>Ledger wallet</title>
</head>
<body>
<div id="app"></div>
Expand Down
3 changes: 2 additions & 1 deletion components/transactions/components/AllTransactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Image from 'next/image';
import { useState } from "react";
import fromExponential from 'from-exponential';
import useSWR from "swr";
import { useRecoilValue } from "recoil";
import { Table, Tooltip, Flex, Space, Tag } from "antd";
Expand Down Expand Up @@ -128,7 +129,7 @@ const AllTransactions = () => {
dataIndex: "amount",
key: "amount",
render: (val) => (
roundNumber(val)
fromExponential(roundNumber(val))
),
},
];
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"date-fns": "^2.30.0",
"from-exponential": "^1.1.1",
"next": "latest",
"protobufjs": "^7.2.5",
"protobufjs-cli": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum NetworkStateEnum {
}
export const networkState = atom<NetworkStateEnum>({
key: "networkState",
default: NetworkStateEnum.testnet,
default: NetworkStateEnum.mainnet,
});

export enum ChainStateEnum {
Expand Down