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

chore: remove testnet2 #143

Closed
wants to merge 1 commit into from
Closed
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 packages/starknet-snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/ConsenSys/starknet-snap.git"
},
"source": {
"shasum": "qUjSJdXDzmnc8/A0a26/T3g9wcvUpHP40R0xcchskLQ=",
"shasum": "WUuzEIRZnbOoZyFL+RwRHXkXSKdhDwsz6JYIOLAxKus=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 0 additions & 2 deletions packages/starknet-snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
STARKNET_INTEGRATION_NETWORK,
STARKNET_MAINNET_NETWORK,
STARKNET_TESTNET_NETWORK,
STARKNET_TESTNET2_NETWORK,
} from './utils/constants';
import { upsertErc20Token, upsertNetwork } from './utils/snapUtils';
import { getStoredNetworks } from './getStoredNetworks';
Expand Down Expand Up @@ -83,7 +82,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ origin, request }) =>
} else {
await upsertNetwork(STARKNET_TESTNET_NETWORK, snap, saveMutex, state);
}
await upsertNetwork(STARKNET_TESTNET2_NETWORK, snap, saveMutex, state);
for (const token of PRELOADED_TOKENS) {
await upsertErc20Token(token, snap, saveMutex, state);
}
Expand Down
26 changes: 2 additions & 24 deletions packages/starknet-snap/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ export const STARKNET_TESTNET_NETWORK: Network = {
accountClassHash: '0x033434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2', // from argent-x repo
};

export const STARKNET_TESTNET2_NETWORK: Network = {
name: 'Goerli Testnet 2',
chainId: constants.StarknetChainId.SN_GOERLI2,
baseUrl: 'https://alpha4-2.starknet.io',
nodeUrl: 'https://starknet-goerli2.infura.io/v3/60c7253fb48147658095fe0460ac9ee9',
voyagerUrl: 'https://goerli-2.voyager.online',
accountClassHash: '0x033434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2', // from argent-x repo
};

export const STARKNET_INTEGRATION_NETWORK: Network = {
name: 'Goerli Integration',
chainId: constants.StarknetChainId.SN_GOERLI,
Expand All @@ -65,14 +56,6 @@ export const ETHER_TESTNET: Erc20Token = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
};

export const ETHER_TESTNET2: Erc20Token = {
address: '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
name: 'Ether',
symbol: 'ETH',
decimals: 18,
chainId: STARKNET_TESTNET2_NETWORK.chainId,
};

export const DAI_MAINNET: Erc20Token = {
address: '0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3',
name: 'DAI',
Expand Down Expand Up @@ -129,12 +112,7 @@ export const TEST_TOKEN_TESTNET: Erc20Token = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
};

export const PRELOADED_TOKENS = [ETHER_MAINNET, ETHER_TESTNET, ETHER_TESTNET2];
export const PRELOADED_NETWORKS = [
STARKNET_MAINNET_NETWORK,
STARKNET_TESTNET_NETWORK,
STARKNET_TESTNET2_NETWORK,
STARKNET_INTEGRATION_NETWORK,
];
export const PRELOADED_TOKENS = [ETHER_MAINNET, ETHER_TESTNET];
export const PRELOADED_NETWORKS = [STARKNET_MAINNET_NETWORK, STARKNET_TESTNET_NETWORK, STARKNET_INTEGRATION_NETWORK];

export const PROXY_CONTRACT_HASH = '0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918'; // from argent-x repo
7 changes: 0 additions & 7 deletions packages/wallet-ui/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ export const TOKENS: any = {
coingeckoId: 'usd-coin',
},
},
[constants.StarknetChainId.TESTNET2]: {
'0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7': {
coingeckoId: 'ethereum',
},
},
};

export const DECIMALS_DISPLAYED_MAX_LENGTH = 11;
Expand All @@ -38,8 +33,6 @@ export const STARKNET_MAINNET_EXPLORER = 'https://voyager.online/';

export const STARKNET_TESTNET_EXPLORER = 'https://goerli.voyager.online/';

export const STARKNET_TESTNET2_EXPLORER = 'https://goerli-2.voyager.online/';

export const SNAPS_DOC_URL = 'https://docs.metamask.io/guide/snaps.html';

export const STARKNET_ADDRESS_LENGTH = 66;
Expand Down
4 changes: 0 additions & 4 deletions packages/wallet-ui/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ethers } from 'ethers';
import {
DECIMALS_DISPLAYED_MAX_LENGTH,
STARKNET_MAINNET_EXPLORER,
STARKNET_TESTNET2_EXPLORER,
STARKNET_TESTNET_EXPLORER,
TIMEOUT_DURATION,
} from './constants';
Expand All @@ -28,9 +27,6 @@ export const openExplorerTab = (
case constants.StarknetChainId.TESTNET:
explorerUrl = STARKNET_TESTNET_EXPLORER;
break;
case constants.StarknetChainId.TESTNET2:
explorerUrl = STARKNET_TESTNET2_EXPLORER;
break;
}
window.open(explorerUrl + type + '/' + address, '_blank')?.focus();
};
Expand Down
Loading