@@ -12,6 +12,11 @@ import { NETWORK_NAMES } from './lib/network'
12import { WALLET_NAMES, DEFAULT_HD_PATH } from './lib/wallet'
12import { WALLET_NAMES, DEFAULT_HD_PATH } from './lib/wallet'
13import { BRIDGE_ERROR } from './lib/error'
13import { BRIDGE_ERROR } from './lib/error'
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'
15import './style/index.css'
20import './style/index.css'
17class Bridge extends React.Component {
22class Bridge extends React.Component {
@@ -51,6 +56,7 @@ class Bridge extends React.Component {
51 // urbit wallet-related
56 // urbit wallet-related
52 urbitWallet: Maybe.Nothing(),
57 urbitWallet: Maybe.Nothing(),
53 authMnemonic: Maybe.Nothing(),
58 authMnemonic: Maybe.Nothing(),
59+ networkSeedCache: null,
55 pointCursor: Maybe.Nothing(),
61 pointCursor: Maybe.Nothing(),
56 pointCache: {},
62 pointCache: {},
@@ -70,6 +76,7 @@ class Bridge extends React.Component {
70 this.setAuthMnemonic = this.setAuthMnemonic.bind(this)
76 this.setAuthMnemonic = this.setAuthMnemonic.bind(this)
71 this.setPointCursor = this.setPointCursor.bind(this)
77 this.setPointCursor = this.setPointCursor.bind(this)
72 this.setTxnHashCursor = this.setTxnHashCursor.bind(this)
78 this.setTxnHashCursor = this.setTxnHashCursor.bind(this)
79+ this.setNetworkSeedCache = this.setNetworkSeedCache.bind(this)
73 this.addToPointCache = this.addToPointCache.bind(this)
80 this.addToPointCache = this.addToPointCache.bind(this)
@@ -82,7 +89,7 @@ class Bridge extends React.Component {
83 // if (process.env.NODE_ENV === 'development') {
90 // if (process.env.NODE_ENV === 'development') {
85− // const socket = 'wss://localhost:8545'
92+ // const socket = 'ws://localhost:8545'
86 // const provider = new Web3.providers.WebsocketProvider(socket)
93 // const provider = new Web3.providers.WebsocketProvider(socket)
87 // const web3 = new Web3(provider)
94 // const web3 = new Web3(provider)
88 // const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV)
95 // const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV)
@@ -92,7 +99,8 @@ class Bridge extends React.Component {
93 // this.setState({
100 // this.setState({
94 // routeCrumbs: Stack([
101 // routeCrumbs: Stack([
95− // ROUTE_NAMES.CREATE_GALAXY,
102+ // // ROUTE_NAMES.CREATE_GALAXY,
103+ // // ROUTE_NAMES.SHIP,
96 // ROUTE_NAMES.SHIPS,
104 // ROUTE_NAMES.SHIPS,
97 // // ROUTE_NAMES.MNEMONIC,
105 // // ROUTE_NAMES.MNEMONIC,
98 // ROUTE_NAMES.WALLET,
106 // ROUTE_NAMES.WALLET,
@@ -100,12 +108,13 @@ class Bridge extends React.Component {
100 // ROUTE_NAMES.LANDING
108 // ROUTE_NAMES.LANDING
102 // networkType: NETWORK_NAMES.LOCAL,
110 // networkType: NETWORK_NAMES.LOCAL,
111+ // pointCursor: Maybe.Just(0),
103 // web3: Maybe.Just(web3),
112 // web3: Maybe.Just(web3),
104 // contracts: Maybe.Just(contracts),
113 // contracts: Maybe.Just(contracts),
105 // walletType: WALLET_NAMES.MNEMONIC,
114 // walletType: WALLET_NAMES.MNEMONIC,
106 // wallet: walletFromMnemonic(mnemonic, hdpath),
115 // wallet: walletFromMnemonic(mnemonic, hdpath),
107 // urbitWallet: Maybe.Nothing(),
116 // urbitWallet: Maybe.Nothing(),
108− // authMnemonic: Maybe.Nothing()
117+ // authMnemonic: Maybe.Just('benefit crew supreme gesture quantum web media hazard theory mercy wing kitten')
@@ -146,6 +155,12 @@ class Bridge extends React.Component {
158+ setNetworkSeedCache(networkSeed) {
160+ networkSeedCache: networkSeed
149 setNetwork(web3, contracts) {
164 setNetwork(web3, contracts) {
150 this.setState({
165 this.setState({
151 web3: web3,
166 web3: web3,
@@ -202,6 +217,7 @@ class Bridge extends React.Component {
203 urbitWallet,
218 urbitWallet,
204 authMnemonic,
219 authMnemonic,
205 pointCursor,
221 pointCursor,
206 pointCache,
222 pointCache,
207 txnHashCursor,
223 txnHashCursor,
@@ -252,6 +268,8 @@ class Bridge extends React.Component {
252 addToPointCache={ this.addToPointCache }
268 addToPointCache={ this.addToPointCache }
253 pointCursor={ pointCursor }
269 pointCursor={ pointCursor }
254 pointCache={ pointCache }
270 pointCache={ pointCache }
271+ networkSeedCache= { networkSeedCache }
272+ setNetworkSeedCache= { this.setNetworkSeedCache }
256 setTxnHashCursor={ this.setTxnHashCursor }
274 setTxnHashCursor={ this.setTxnHashCursor }
257 txnHashCursor={ txnHashCursor } />
275 txnHashCursor={ txnHashCursor } />