@@ -12,6 +12,11 @@ import { NETWORK_NAMES } from './lib/network'
1212import { WALLET_NAMES, DEFAULT_HD_PATH } from './lib/wallet'
1313import { BRIDGE_ERROR } from './lib/error'
1414
15+// import Web3 from 'web3'
16+// import * as azimuth from 'azimuth-js'
17+// import { CONTRACT_ADDRESSES } from './lib/contracts'
18+// import { walletFromMnemonic } from './lib/wallet'
19+
1520import './style/index.css'
1621
1722class Bridge extends React.Component {
@@ -51,6 +56,7 @@ class Bridge extends React.Component {
5156 // urbit wallet-related
5257 urbitWallet: Maybe.Nothing(),
5358 authMnemonic: Maybe.Nothing(),
59+ networkSeedCache: null,
5460 // point
5561 pointCursor: Maybe.Nothing(),
5662 pointCache: {},
@@ -70,6 +76,7 @@ class Bridge extends React.Component {
7076 this.setAuthMnemonic = this.setAuthMnemonic.bind(this)
7177 this.setPointCursor = this.setPointCursor.bind(this)
7278 this.setTxnHashCursor = this.setTxnHashCursor.bind(this)
79+ this.setNetworkSeedCache = this.setNetworkSeedCache.bind(this)
7380 this.addToPointCache = this.addToPointCache.bind(this)
7481 }
7582
@@ -82,7 +89,7 @@ class Bridge extends React.Component {
8289
8390 // if (process.env.NODE_ENV === 'development') {
8491 //
85− // const socket = 'wss://localhost:8545'
92+ // const socket = 'ws://localhost:8545'
8693 // const provider = new Web3.providers.WebsocketProvider(socket)
8794 // const web3 = new Web3(provider)
8895 // const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV)
@@ -92,7 +99,8 @@ class Bridge extends React.Component {
9299 //
93100 // this.setState({
94101 // routeCrumbs: Stack([
95− // ROUTE_NAMES.CREATE_GALAXY,
102+ // // ROUTE_NAMES.CREATE_GALAXY,
103+ // // ROUTE_NAMES.SHIP,
96104 // ROUTE_NAMES.SHIPS,
97105 // // ROUTE_NAMES.MNEMONIC,
98106 // ROUTE_NAMES.WALLET,
@@ -100,12 +108,13 @@ class Bridge extends React.Component {
100108 // ROUTE_NAMES.LANDING
101109 // ]),
102110 // networkType: NETWORK_NAMES.LOCAL,
111+ // pointCursor: Maybe.Just(0),
103112 // web3: Maybe.Just(web3),
104113 // contracts: Maybe.Just(contracts),
105114 // walletType: WALLET_NAMES.MNEMONIC,
106115 // wallet: walletFromMnemonic(mnemonic, hdpath),
107116 // urbitWallet: Maybe.Nothing(),
108− // authMnemonic: Maybe.Nothing()
117+ // authMnemonic: Maybe.Just('benefit crew supreme gesture quantum web media hazard theory mercy wing kitten')
109118 // })
110119 // }
111120}
@@ -146,6 +155,12 @@ class Bridge extends React.Component {
146155 }
147156 }
148157
158+ setNetworkSeedCache(networkSeed) {
159+ this.setState({
160+ networkSeedCache: networkSeed
161+ })
162+ }
163+
149164 setNetwork(web3, contracts) {
150165 this.setState({
151166 web3: web3,
@@ -202,6 +217,7 @@ class Bridge extends React.Component {
202217 wallet,
203218 urbitWallet,
204219 authMnemonic,
220+ networkSeedCache,
205221 pointCursor,
206222 pointCache,
207223 txnHashCursor,
@@ -252,6 +268,8 @@ class Bridge extends React.Component {
252268 addToPointCache={ this.addToPointCache }
253269 pointCursor={ pointCursor }
254270 pointCache={ pointCache }
271+ networkSeedCache= { networkSeedCache }
272+ setNetworkSeedCache= { this.setNetworkSeedCache }
255273 // txn
256274 setTxnHashCursor={ this.setTxnHashCursor }
257275 txnHashCursor={ txnHashCursor } />