2022-02-25 17:50:16 +01:00
|
|
|
import React from 'react';
|
2022-04-25 20:30:46 +02:00
|
|
|
import AddNetwork from './add-network';
|
2022-02-25 17:50:16 +01:00
|
|
|
|
2022-03-25 15:33:53 +01:00
|
|
|
const MATIC_TOKEN_IMAGE_URL = './images/matic-token.png';
|
|
|
|
const ARBITRUM_IMAGE_URL = './images/arbitrum.svg';
|
|
|
|
const OPTIMISM_IMAGE_URL = './images/optimism.svg';
|
2022-04-25 20:30:46 +02:00
|
|
|
const AVALANCHE_IMAGE_URL = './images/avax-token.png';
|
|
|
|
const PALM_IMAGE_URL = './images/palm.svg';
|
|
|
|
const BSC_IMAGE_URL = './images/bsc-filled.svg';
|
2022-03-25 15:33:53 +01:00
|
|
|
|
2022-02-25 17:50:16 +01:00
|
|
|
export default {
|
2023-02-22 23:42:50 +01:00
|
|
|
title: 'Components/App/AddNetwork',
|
2022-03-25 15:33:53 +01:00
|
|
|
argTypes: {
|
|
|
|
onBackClick: {
|
|
|
|
action: 'onBackClick',
|
2022-02-25 17:50:16 +01:00
|
|
|
},
|
2022-03-25 15:33:53 +01:00
|
|
|
onAddNetworkClick: {
|
|
|
|
action: 'onAddNetworkClick',
|
2022-02-25 17:50:16 +01:00
|
|
|
},
|
2022-03-25 15:33:53 +01:00
|
|
|
onAddNetworkManuallyClick: {
|
|
|
|
action: 'onAddNetworkManuallyClick',
|
2022-02-25 17:50:16 +01:00
|
|
|
},
|
2022-03-25 15:33:53 +01:00
|
|
|
featuredRPCS: {
|
|
|
|
control: 'array',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
featuredRPCS: [
|
|
|
|
{
|
2022-04-25 20:30:46 +02:00
|
|
|
chainId: '42161',
|
|
|
|
nickname: 'Arbitrum One',
|
|
|
|
rpcUrl: 'https://arbitrum-mainnet.infura.io/v3/{INFURA_API_KEY}',
|
|
|
|
ticker: 'AETH',
|
2022-03-25 15:33:53 +01:00
|
|
|
rpcPrefs: {
|
2022-04-25 20:30:46 +02:00
|
|
|
blockExplorerUrl: 'https://explorer.arbitrum.io',
|
|
|
|
imageUrl: ARBITRUM_IMAGE_URL,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
chainId: '43114',
|
|
|
|
nickname: 'Avalanche Mainnet C-Chain',
|
|
|
|
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',
|
|
|
|
ticker: 'AVAX',
|
|
|
|
rpcPrefs: {
|
|
|
|
blockExplorerUrl: 'https://snowtrace.io/',
|
|
|
|
imageUrl: AVALANCHE_IMAGE_URL,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
chainId: '56',
|
|
|
|
nickname: 'BNB Smart Chain',
|
|
|
|
rpcUrl: 'https://bsc-dataseed.binance.org/',
|
|
|
|
ticker: 'BNB',
|
|
|
|
rpcPrefs: {
|
|
|
|
blockExplorerUrl: 'https://bscscan.com/',
|
|
|
|
imageUrl: BSC_IMAGE_URL,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
chainId: '250',
|
|
|
|
nickname: 'Fantom Opera',
|
|
|
|
rpcUrl: 'https://rpc.ftm.tools/',
|
|
|
|
ticker: 'FTM',
|
|
|
|
rpcPrefs: {
|
|
|
|
blockExplorerUrl: 'https://ftmscan.com/',
|
|
|
|
imageUrl: '',
|
2022-03-25 15:33:53 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-04-25 20:30:46 +02:00
|
|
|
chainId: '1666600000',
|
|
|
|
nickname: 'Harmony Mainnet Shard 0',
|
|
|
|
rpcUrl: 'https://api.harmony.one/',
|
|
|
|
ticker: 'ONE',
|
|
|
|
rpcPrefs: {
|
|
|
|
blockExplorerUrl: 'https://explorer.harmony.one/',
|
|
|
|
imageUrl: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
chainId: '10',
|
|
|
|
nickname: 'Optimism',
|
|
|
|
rpcUrl: 'https://optimism-mainnet.infura.io/v3/{INFURA_API_KEY}',
|
2022-03-25 15:33:53 +01:00
|
|
|
ticker: 'KOR',
|
|
|
|
rpcPrefs: {
|
2022-04-25 20:30:46 +02:00
|
|
|
blockExplorerUrl: 'https://optimistic.etherscan.io/',
|
2022-03-25 15:33:53 +01:00
|
|
|
imageUrl: OPTIMISM_IMAGE_URL,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-04-25 20:30:46 +02:00
|
|
|
chainId: '137',
|
|
|
|
nickname: 'Polygon Mainnet',
|
|
|
|
rpcUrl: 'https://polygon-mainnet.infura.io/v3/{INFURA_API_KEY}',
|
|
|
|
ticker: 'MATIC',
|
2022-03-25 15:33:53 +01:00
|
|
|
rpcPrefs: {
|
2022-04-25 20:30:46 +02:00
|
|
|
blockExplorerUrl: 'https://polygonscan.com/',
|
|
|
|
imageUrl: MATIC_TOKEN_IMAGE_URL,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
chainId: '11297108109',
|
|
|
|
nickname: 'Palm',
|
|
|
|
rpcUrl: 'https://palm-mainnet.infura.io/v3/{INFURA_API_KEY}',
|
|
|
|
ticker: 'PALM',
|
|
|
|
rpcPrefs: {
|
|
|
|
blockExplorerUrl: 'https://explorer.palm.io/',
|
|
|
|
imageUrl: PALM_IMAGE_URL,
|
2022-03-25 15:33:53 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2022-02-25 17:50:16 +01:00
|
|
|
};
|
|
|
|
|
2022-03-25 15:33:53 +01:00
|
|
|
export const DefaultStory = (args) => <AddNetwork {...args} />;
|
|
|
|
|
2022-02-25 17:50:16 +01:00
|
|
|
DefaultStory.storyName = 'Default';
|