Remove localhost network implementation and only use goerli and mumbai networks

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR 2023-01-18 23:40:52 -03:00
parent be90ff746b
commit 98f6a30f35
3 changed files with 0 additions and 20 deletions

View File

@ -7,7 +7,6 @@ const getTokenAddress = (): string => {
const possibleTokenAddresses: { [key: string]: string } = {
Ethereum: "0x294003F602c321627152c6b7DED3EAb5bEa853Ee",
Polygon: "0x294003F602c321627152c6b7DED3EAb5bEa853Ee",
Localhost: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
};
return possibleTokenAddresses[etherStore.networkName];
@ -19,7 +18,6 @@ const getP2PixAddress = (): string => {
const possibleP2PixAddresses: { [key: string]: string } = {
Ethereum: "0x5f3EFA9A90532914545CEf527C530658af87e196",
Polygon: "0x5f3EFA9A90532914545CEf527C530658af87e196",
Localhost: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
};
return possibleP2PixAddresses[etherStore.networkName];
@ -31,7 +29,6 @@ const getProviderUrl = (): string => {
const possibleProvidersUrls: { [key: string]: string } = {
Ethereum: import.meta.env.VITE_GOERLI_API_URL,
Polygon: import.meta.env.VITE_MUMBAI_API_URL,
Localhost: import.meta.env.VITE_GOERLI_API_URL,
};
return possibleProvidersUrls[etherStore.networkName];
@ -42,8 +39,6 @@ const possibleChains: { [key: string]: NetworkEnum } = {
"5": NetworkEnum.ethereum,
"0x13881": NetworkEnum.polygon,
"80001": NetworkEnum.polygon,
"0x7a69": NetworkEnum.localhost,
"31337": NetworkEnum.localhost,
};
const network2Chain: { [key: string]: string } = {

View File

@ -170,20 +170,6 @@ const getNetworkImage = (networkName: NetworkEnum): string => {
<div class="w-full flex justify-center">
<hr class="w-4/5" />
</div>
<div
class="menu-button gap-2 px-4 rounded-md cursor-pointer"
@click="networkChange(NetworkEnum.localhost)"
>
<img
alt="Localhost"
width="20"
height="20"
src="@/assets/ethereum.svg"
/>
<span class="text-gray-900 py-4 text-end font-semibold text-sm">
Localhost
</span>
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
export enum NetworkEnum {
ethereum = "Ethereum",
polygon = "Polygon",
localhost = "Localhost",
}