@@ -40,6 +40,7 @@ class Bridge extends React.Component {
40 this.state = {
40 this.state = {
42 routeCrumbs: Stack([ ROUTE_NAMES.LANDING ]),
42 routeCrumbs: Stack([ ROUTE_NAMES.LANDING ]),
43 // network
44 // network
44 networkType: networkType,
45 networkType: networkType,
45 web3: Maybe.Nothing(),
46 web3: Maybe.Nothing(),
@@ -51,6 +52,7 @@ class Bridge extends React.Component {
51 // urbit wallet-related
52 // urbit wallet-related
52 urbitWallet: Maybe.Nothing(),
53 urbitWallet: Maybe.Nothing(),
53 authMnemonic: Maybe.Nothing(),
54 authMnemonic: Maybe.Nothing(),
55+ networkSeedCache: null,
55 pointCursor: Maybe.Nothing(),
57 pointCursor: Maybe.Nothing(),
56 pointCache: {},
58 pointCache: {},
@@ -70,6 +72,7 @@ class Bridge extends React.Component {
70 this.setAuthMnemonic = this.setAuthMnemonic.bind(this)
72 this.setAuthMnemonic = this.setAuthMnemonic.bind(this)
71 this.setPointCursor = this.setPointCursor.bind(this)
73 this.setPointCursor = this.setPointCursor.bind(this)
72 this.setTxnHashCursor = this.setTxnHashCursor.bind(this)
74 this.setTxnHashCursor = this.setTxnHashCursor.bind(this)
75+ this.setNetworkSeedCache = this.setNetworkSeedCache.bind(this)
73 this.addToPointCache = this.addToPointCache.bind(this)
76 this.addToPointCache = this.addToPointCache.bind(this)
@@ -88,7 +91,7 @@ class Bridge extends React.Component {
89 // if (process.env.NODE_ENV === 'development') {
92 // if (process.env.NODE_ENV === 'development') {
91− // const socket = 'wss://localhost:8545'
94+ // const socket = 'ws://localhost:8545'
92 // const provider = new Web3.providers.WebsocketProvider(socket)
95 // const provider = new Web3.providers.WebsocketProvider(socket)
93 // const web3 = new Web3(provider)
96 // const web3 = new Web3(provider)
94 // const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV)
97 // const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV)
@@ -98,7 +101,8 @@ class Bridge extends React.Component {
99 // this.setState({
102 // this.setState({
100 // routeCrumbs: Stack([
103 // routeCrumbs: Stack([
101− // ROUTE_NAMES.CREATE_GALAXY,
104+ // // ROUTE_NAMES.CREATE_GALAXY,
105+ // // ROUTE_NAMES.SHIP,
102 // ROUTE_NAMES.SHIPS,
106 // ROUTE_NAMES.SHIPS,
103 // // ROUTE_NAMES.MNEMONIC,
107 // // ROUTE_NAMES.MNEMONIC,
104 // ROUTE_NAMES.WALLET,
108 // ROUTE_NAMES.WALLET,
@@ -106,20 +110,22 @@ class Bridge extends React.Component {
106 // ROUTE_NAMES.LANDING
110 // ROUTE_NAMES.LANDING
108 // networkType: NETWORK_NAMES.LOCAL,
112 // networkType: NETWORK_NAMES.LOCAL,
113+ // pointCursor: Maybe.Just(0),
109 // web3: Maybe.Just(web3),
114 // web3: Maybe.Just(web3),
110 // contracts: Maybe.Just(contracts),
115 // contracts: Maybe.Just(contracts),
111 // walletType: WALLET_NAMES.MNEMONIC,
116 // walletType: WALLET_NAMES.MNEMONIC,
112 // wallet: walletFromMnemonic(mnemonic, hdpath),
117 // wallet: walletFromMnemonic(mnemonic, hdpath),
113 // urbitWallet: Maybe.Nothing(),
118 // urbitWallet: Maybe.Nothing(),
114− // authMnemonic: Maybe.Nothing()
119+ // authMnemonic: Maybe.Just('benefit crew supreme gesture quantum web media hazard theory mercy wing kitten')
119− pushRoute(symbol) {
124+ pushRoute(symbol, routeData) {
120 if (lodash.includes(ROUTE_NAMES, symbol)) {
125 if (lodash.includes(ROUTE_NAMES, symbol)) {
121 this.setState((state, _) => ({
126 this.setState((state, _) => ({
122 routeCrumbs: state.routeCrumbs.push(symbol),
127 routeCrumbs: state.routeCrumbs.push(symbol),
128+ routeData: routeData
125 // Scroll to top of page with each route transition.
131 // Scroll to top of page with each route transition.
@@ -152,6 +158,12 @@ class Bridge extends React.Component {
161+ setNetworkSeedCache(networkSeed) {
163+ networkSeedCache: networkSeed
155 setNetwork(web3, contracts) {
167 setNetwork(web3, contracts) {
156 this.setState({
168 this.setState({
157 web3: web3,
169 web3: web3,
@@ -202,12 +214,14 @@ class Bridge extends React.Component {
202 render() {
214 render() {
204 routeCrumbs,
216 routeCrumbs,
205 networkType,
218 networkType,
206 walletType,
219 walletType,
207 walletHdPath,
220 walletHdPath,
209 urbitWallet,
222 urbitWallet,
210 authMnemonic,
223 authMnemonic,
211 pointCursor,
225 pointCursor,
212 pointCache,
226 pointCache,
213 txnHashCursor,
227 txnHashCursor,
@@ -235,6 +249,7 @@ class Bridge extends React.Component {
235 // router
249 // router
236 pushRoute={ this.pushRoute }
250 pushRoute={ this.pushRoute }
237 popRoute={ this.popRoute }
251 popRoute={ this.popRoute }
252+ routeData={ routeData }
238 // network
253 // network
239 setNetworkType={ this.setNetworkType }
254 setNetworkType={ this.setNetworkType }
240 setNetwork={ this.setNetwork }
255 setNetwork={ this.setNetwork }
@@ -258,6 +273,8 @@ class Bridge extends React.Component {
258 addToPointCache={ this.addToPointCache }
273 addToPointCache={ this.addToPointCache }
259 pointCursor={ pointCursor }
274 pointCursor={ pointCursor }
260 pointCache={ pointCache }
275 pointCache={ pointCache }
276+ networkSeedCache= { networkSeedCache }
277+ setNetworkSeedCache= { this.setNetworkSeedCache }
262 setTxnHashCursor={ this.setTxnHashCursor }
279 setTxnHashCursor={ this.setTxnHashCursor }
263 txnHashCursor={ txnHashCursor } />
280 txnHashCursor={ txnHashCursor } />