diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue
index 7979faf..b93ac71 100644
--- a/src/components/TopBar.vue
+++ b/src/components/TopBar.vue
@@ -52,6 +52,7 @@ const getNetworkImage = (networkName: NetworkEnum) => {
let validImages = {
Ethereum: ethereumImage,
Polygon: polygonImage,
+ Localhost: ethereumImage
};
return validImages[networkName];
@@ -159,7 +160,23 @@ const getNetworkImage = (networkName: NetworkEnum) => {
Polygon
-
+
+
+
+
+
diff --git a/src/model/NetworkEnum.ts b/src/model/NetworkEnum.ts
index 47a1f2a..0304338 100644
--- a/src/model/NetworkEnum.ts
+++ b/src/model/NetworkEnum.ts
@@ -1,4 +1,5 @@
export enum NetworkEnum {
ethereum = "Ethereum",
polygon = "Polygon",
+ localhost = "Localhost",
}
diff --git a/src/utils/alchemy.ts b/src/utils/alchemy.ts
deleted file mode 100644
index 14816ec..0000000
--- a/src/utils/alchemy.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { Network, Alchemy } from "alchemy-sdk";
-import { useEtherStore } from "@/store/ether";
-
-const getAlchemy = () => {
- const possibleSettings = {
- Ethereum: {
- apiKey: import.meta.env.VITE_GOERLI_API_KEY,
- network: Network.ETH_GOERLI,
- },
- Polygon: {
- apiKey: import.meta.env.VITE_MUMBAI_API_KEY,
- network: Network.MATIC_MUMBAI,
- },
- };
- const etherStore = useEtherStore();
-
- const settings = possibleSettings[etherStore.networkName];
- const alchemy = new Alchemy(settings);
- return alchemy;
-};
-
-const showLatestBlockNumber = async () => {
- const alchemy = getAlchemy();
-
- const latestBlock = await alchemy.core.getBlockNumber();
- if (latestBlock) console.log(latestBlock);
-};
-
-export default {
- getAlchemy,
- showLatestBlockNumber,
-};