From 98e2c3892d5cdb035eff797f82aac8502fb7c965 Mon Sep 17 00:00:00 2001 From: Ahamed Faizal Date: Fri, 8 Dec 2023 12:01:59 +0800 Subject: [PATCH 1/2] fix/AELF-24401518: Removed network section from the header as wont support testnet and sidechain --- app/layout.tsx | 2 +- components/common/header/index.tsx | 5 ----- components/index.html | 2 +- components/transactions/components/AllTransactions.tsx | 3 ++- package.json | 1 + state/index.ts | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index 29865f6..3947be7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,7 +6,7 @@ export default function RootLayout({ return ( - Companion wallet + Ledger wallet {children} diff --git a/components/common/header/index.tsx b/components/common/header/index.tsx index ba4be4a..e4e7424 100644 --- a/components/common/header/index.tsx +++ b/components/common/header/index.tsx @@ -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"; @@ -16,7 +15,6 @@ interface HeaderProps { externalClasses?: Partial<{container: string, header: string}>; } const Header = ({ - showNetwork, externalClasses, }: HeaderProps) => { const network = useRecoilValue(networkState); @@ -29,9 +27,6 @@ const Header = ({ Aelf logo Ledger Wallet - {showNetwork && - - } diff --git a/components/index.html b/components/index.html index a9ea131..26a54c6 100644 --- a/components/index.html +++ b/components/index.html @@ -2,7 +2,7 @@ - Companion wallet + Ledger wallet
diff --git a/components/transactions/components/AllTransactions.tsx b/components/transactions/components/AllTransactions.tsx index 69d4ef6..5229961 100644 --- a/components/transactions/components/AllTransactions.tsx +++ b/components/transactions/components/AllTransactions.tsx @@ -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"; @@ -128,7 +129,7 @@ const AllTransactions = () => { dataIndex: "amount", key: "amount", render: (val) => ( - roundNumber(val) + fromExponential(roundNumber(val)) ), }, ]; diff --git a/package.json b/package.json index e8056cc..224f904 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/state/index.ts b/state/index.ts index a036c41..eedcf8e 100644 --- a/state/index.ts +++ b/state/index.ts @@ -13,7 +13,7 @@ export enum NetworkStateEnum { } export const networkState = atom({ key: "networkState", - default: NetworkStateEnum.testnet, + default: NetworkStateEnum.mainnet, }); export enum ChainStateEnum { From 0b49373f09a3eccba3de652850ec206cb6236e64 Mon Sep 17 00:00:00 2001 From: Ahamed Faizal Date: Fri, 8 Dec 2023 12:05:30 +0800 Subject: [PATCH 2/2] fix/AELF-24401518: Update of lock file --- package-lock.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package-lock.json b/package-lock.json index dd1be2b..821c112 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,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", @@ -13561,6 +13562,11 @@ "node": ">= 0.6" } }, + "node_modules/from-exponential": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/from-exponential/-/from-exponential-1.1.1.tgz", + "integrity": "sha512-VBE7f5OVnYwdgB3LHa+Qo29h8qVpxhVO9Trlc+AWm+/XNAgks1tAwMFHb33mjeiof77GglsJzeYF7OqXrROP/A==" + }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",