File tree Expand file tree Collapse file tree
playground-ui/src/constants Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - Add global ` localhost ` scopes ([ #250 ] ( https://github.com/MetaMask/connect-monorepo/pull/250 ) )
13+
1014## [ 0.6.0]
1115
1216### Changed
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ global.Buffer = Buffer;
2323const CONNECT_AND_SIGN_MESSAGE = 'Hello from MetaMask Connect Playground!' ;
2424
2525function App ( ) {
26- const [ customScopes , setCustomScopes ] = useState < string [ ] > ( [ 'eip155:1' ] ) ;
26+ const [ customScopes , setCustomScopes ] = useState < string [ ] > (
27+ window . location . hostname === '127.0.0.1' || window . location . hostname === 'localhost'
28+ ? [ 'eip155:1337' ]
29+ : [ 'eip155:1' ] ,
30+ ) ;
2731 const [ caipAccountIds , setCaipAccountIds ] = useState < CaipAccountId [ ] > ( [ ] ) ;
2832
2933 const [ wagmiError , setWagmiError ] = useState < Error | null > ( null ) ;
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export const LegacyEVMSDKProvider = ({
7575 'eip155:5' : 'https://goerli.infura.io/v3/demo' ,
7676 'eip155:11155111' : 'https://sepolia.infura.io/v3/demo' ,
7777 'eip155:137' : 'https://polygon-rpc.com' ,
78+ 'eip155:1337' : 'http://127.0.0.1:8545' ,
7879 } ;
7980 const supportedNetworks = convertCaipToHexKeys ( caipNetworks ) ;
8081
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const FEATURED_NETWORKS = {
1515 'zkSync Era Mainnet' : 'eip155:324' ,
1616 'Base Mainnet' : 'eip155:8453' ,
1717 'Solana Mainnet' : 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' ,
18+ 'Localhost 8545' : 'eip155:1337' ,
1819} as const ;
1920
2021/**
You can’t perform that action at this time.
0 commit comments