on master help sign in
misc notes, add .env to gitignore
94a4817~sarlev-sarsen
.gitignore+1
@@ -11,6 +11,7 @@
11
11
12# misc
12# misc
13.DS_Store
13.DS_Store
14+.env
14.env.local
15.env.local
15.env.development.local
16.env.development.local
16.env.test.local
17.env.test.local
DEVELOPMENT.md+2−1
@@ -34,7 +34,6 @@ it's a good place to get started. On the testnet, it's the address:
34
34
35You can authenticate as it using the following mnemonic:
35You can authenticate as it using the following mnemonic:
36
36
37−TODO: THIS SEED FAILS ON RECOVERY KEY SIGN IN with error: `"code":7979,"data":{}}`
38```
37```
39benefit crew supreme gesture quantum web media hazard theory mercy wing kitten
38benefit crew supreme gesture quantum web media hazard theory mercy wing kitten
40```
39```
@@ -209,6 +208,8 @@ Start a local fake ship from the master branch in the [urbit repo](https://githu
209> :roller|setkey '58d62eb79797502bc0f66cd3e7a49d00287bff53a2734b799ef09cb746340ed0'
208> :roller|setkey '58d62eb79797502bc0f66cd3e7a49d00287bff53a2734b799ef09cb746340ed0'
210> :roller|quota 9.999
209> :roller|quota 9.999
211> |eyre/cors/approve 'https://127.0.0.1:3000'
210> |eyre/cors/approve 'https://127.0.0.1:3000'
211+:: If you run into issues, also add 'https://localhost:3000' the the eyre CORS approvals
212+::
212:: Once L2 txs have been sent via Bridge, this will manually commit and batch them, avoiding waiting for the timer
213:: Once L2 txs have been sent via Bridge, this will manually commit and batch them, avoiding waiting for the timer
213::
214::
214> :roller|commit
215> :roller|commit
src/lib/flags.js+1
@@ -2,6 +2,7 @@ import { version } from '../../package.json';
2
2
3// are we running bridge in a development build
3// are we running bridge in a development build
4export const isDevelopment = import.meta.env.DEV === true;
4export const isDevelopment = import.meta.env.DEV === true;
5+// TODO update to Sepolia
5export const isGoerli = import.meta.env.VITE_GOERLI === 'true';
6export const isGoerli = import.meta.env.VITE_GOERLI === 'true';
6export const isMainnet = import.meta.env.VITE_MAINNET === 'true';
7export const isMainnet = import.meta.env.VITE_MAINNET === 'true';
7export const versionLabel =
8export const versionLabel =
src/lib/network.js+9−8
@@ -1,3 +1,4 @@
1+// TODO update to Sepolia from Goerli
1import { isDevelopment, isGoerli, isMainnet } from './flags';
2import { isDevelopment, isGoerli, isMainnet } from './flags';
2import {
3import {
3 ETHEREUM_GOERLI_CHAIN_ID,
4 ETHEREUM_GOERLI_CHAIN_ID,
@@ -16,12 +17,12 @@ const renderNetworkType = network =>
16 network === NETWORK_TYPES.OFFLINE
17 network === NETWORK_TYPES.OFFLINE
17 ? 'Offline'
18 ? 'Offline'
18 : network === NETWORK_TYPES.GOERLI
19 : network === NETWORK_TYPES.GOERLI
19− ? 'Goerli'
20+ ? 'Goerli'
20− : network === NETWORK_TYPES.MAINNET
21+ : network === NETWORK_TYPES.MAINNET
21− ? 'Main Network'
22+ ? 'Main Network'
22− : network === NETWORK_TYPES.LOCAL
23+ : network === NETWORK_TYPES.LOCAL
23− ? 'Local Node'
24+ ? 'Local Node'
24− : 'Offline';
25+ : 'Offline';
25
26
26const chainIdToNetworkType = chainId => {
27const chainIdToNetworkType = chainId => {
27 switch (chainId) {
28 switch (chainId) {
@@ -38,8 +39,8 @@ const expectedChainId = () => {
38 return isGoerli
39 return isGoerli
39 ? ETHEREUM_GOERLI_CHAIN_ID
40 ? ETHEREUM_GOERLI_CHAIN_ID
40 : isDevelopment && !isMainnet
41 : isDevelopment && !isMainnet
41− ? ETHEREUM_LOCAL_CHAIN_ID
42+ ? ETHEREUM_LOCAL_CHAIN_ID
42− : ETHEREUM_MAINNET_CHAIN_ID;
43+ : ETHEREUM_MAINNET_CHAIN_ID;
43};
44};
44
45
45export {
46export {
src/views/Login/LoginSelector.tsx+9−3
@@ -105,9 +105,15 @@ export default function LoginSelector({
105 if (expectedChainId() === ETHEREUM_LOCAL_CHAIN_ID) {
105 if (expectedChainId() === ETHEREUM_LOCAL_CHAIN_ID) {
106 await window.ethereum.request({
106 await window.ethereum.request({
107 method: "wallet_addEthereumChain",
107 method: "wallet_addEthereumChain",
108+ params: [{
108− params: [{chainId: ETHEREUM_LOCAL_CHAIN_ID,
109+ chainId: ETHEREUM_LOCAL_CHAIN_ID,
109− chainName: "Ganache",
110+ chainName: "Ganache",
110− rpcUrls: ["http://127.0.0.1:8545"]
111+ rpcUrls: ["http://127.0.0.1:8545"],
112+ nativeCurrency: {
113+ name: "Ether",
114+ symbol: "ETH",
115+ decimals: 18
116+ }
111 }]
117 }]
112 });
118 });
113 }
119 }