diff --git a/components/Alias.tsx b/components/Alias.tsx index d043853d..2bc05b76 100644 --- a/components/Alias.tsx +++ b/components/Alias.tsx @@ -20,7 +20,6 @@ const Alias = ({ aliasesCtx.getAlias(address, length).then(setAlias); }, [address, aliasesCtx, length]); - console; return ( diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index dbc65d46..d2111ca9 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -29,7 +29,6 @@ import useIsOwner from "../utils/useIsOwner"; import { signers, toStorage } from "../versioned/apis"; import { hasTzip27Support } from "../versioned/util"; import Alias from "./Alias"; -import Copy from "./Copy"; import Tooltip from "./Tooltip"; type selectItemProps = { @@ -69,19 +68,7 @@ const SelectedItem = ({

{name}

{threshold}

- {/* - - {!address ? ( - ... - ) : ( - `${address.substring(0, 5)}...${address.substring( - address.length - 5 - )}` - )} - - */} - - +

{formattedBalance.toFixed(2)} Tez

@@ -259,11 +246,9 @@ const Sidebar = ({ className="radix-disabled:opacity-50 relative flex select-none items-center rounded-md px-8 py-2 text-sm font-medium text-zinc-300 focus:bg-zinc-800 focus:bg-zinc-900 focus:outline-none" > - {/*

- {state.aliases[address]} -

*/} - - +

+ +

{address.substring(0, 5)}... diff --git a/package.json b/package.json index 0d363def..b84e4c63 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "env-cmd -f ./config/.env next dev", + "dev": "env-cmd -f ./config/.env.dev next dev", "sandbox": "env-cmd -f ./config/.env.sandbox next dev --port 4000", "build": "next build", "start": "next start --port 80", diff --git a/utils/getTzktAlias.ts b/utils/getTzktAlias.ts deleted file mode 100644 index 502a69fe..00000000 --- a/utils/getTzktAlias.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { useEffect, useState } from "react"; -import { TZKT_API_URL } from "../context/config"; - -export const useTzktAccountAlias = (accountAddress: string) => { - const [alias, setAlias] = useState(undefined); - - useEffect(() => { - (async () => - fetch(`${TZKT_API_URL}/v1/accounts/${accountAddress}`).then( - async response => { - if (response.status >= 200 && response.status < 300) { - const json = await response.json(); - if (json["alias"]) { - setAlias(json["alias"]); - } - } - } - ))(); - }, [accountAddress]); - - return alias; -};