-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove networkSeed input from setKeys / genKeyfile flows #85
Changes from all commits
223a2dd
36c1beb
5f71b99
23dbfee
42d9c64
d29b35b
05c1914
133c307
6952d2f
17b7424
bdd3bc2
d593175
b7de3ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ class Bridge extends React.Component { | |
this.state = { | ||
// routes | ||
routeCrumbs: Stack([ ROUTE_NAMES.LANDING ]), | ||
routeData: {}, | ||
// network | ||
networkType: networkType, | ||
web3: Maybe.Nothing(), | ||
|
@@ -51,6 +52,7 @@ class Bridge extends React.Component { | |
// urbit wallet-related | ||
urbitWallet: Maybe.Nothing(), | ||
authMnemonic: Maybe.Nothing(), | ||
networkSeedCache: null, | ||
// point | ||
pointCursor: Maybe.Nothing(), | ||
pointCache: {}, | ||
|
@@ -70,6 +72,7 @@ class Bridge extends React.Component { | |
this.setAuthMnemonic = this.setAuthMnemonic.bind(this) | ||
this.setPointCursor = this.setPointCursor.bind(this) | ||
this.setTxnHashCursor = this.setTxnHashCursor.bind(this) | ||
this.setNetworkSeedCache = this.setNetworkSeedCache.bind(this) | ||
this.addToPointCache = this.addToPointCache.bind(this) | ||
} | ||
|
||
|
@@ -88,7 +91,7 @@ class Bridge extends React.Component { | |
|
||
// if (process.env.NODE_ENV === 'development') { | ||
// | ||
// const socket = 'wss://localhost:8545' | ||
// const socket = 'ws://localhost:8545' | ||
// const provider = new Web3.providers.WebsocketProvider(socket) | ||
// const web3 = new Web3(provider) | ||
// const contracts = azimuth.initContracts(web3, CONTRACT_ADDRESSES.DEV) | ||
|
@@ -98,28 +101,31 @@ class Bridge extends React.Component { | |
// | ||
// this.setState({ | ||
// routeCrumbs: Stack([ | ||
// ROUTE_NAMES.CREATE_GALAXY, | ||
// // ROUTE_NAMES.CREATE_GALAXY, | ||
// // ROUTE_NAMES.SHIP, | ||
// ROUTE_NAMES.SHIPS, | ||
// // ROUTE_NAMES.MNEMONIC, | ||
// ROUTE_NAMES.WALLET, | ||
// ROUTE_NAMES.NETWORK, | ||
// ROUTE_NAMES.LANDING | ||
// ]), | ||
// networkType: NETWORK_NAMES.LOCAL, | ||
// pointCursor: Maybe.Just(0), | ||
// web3: Maybe.Just(web3), | ||
// contracts: Maybe.Just(contracts), | ||
// walletType: WALLET_NAMES.MNEMONIC, | ||
// wallet: walletFromMnemonic(mnemonic, hdpath), | ||
// urbitWallet: Maybe.Nothing(), | ||
// authMnemonic: Maybe.Nothing() | ||
// authMnemonic: Maybe.Just('benefit crew supreme gesture quantum web media hazard theory mercy wing kitten') | ||
// }) | ||
// } | ||
} | ||
|
||
pushRoute(symbol) { | ||
pushRoute(symbol, routeData) { | ||
if (lodash.includes(ROUTE_NAMES, symbol)) { | ||
this.setState((state, _) => ({ | ||
routeCrumbs: state.routeCrumbs.push(symbol), | ||
routeData: routeData | ||
})); | ||
|
||
// Scroll to top of page with each route transition. | ||
|
@@ -152,6 +158,12 @@ class Bridge extends React.Component { | |
} | ||
} | ||
|
||
setNetworkSeedCache(networkSeed) { | ||
this.setState({ | ||
networkSeedCache: networkSeed | ||
}) | ||
} | ||
|
||
setNetwork(web3, contracts) { | ||
this.setState({ | ||
web3: web3, | ||
|
@@ -202,12 +214,14 @@ class Bridge extends React.Component { | |
render() { | ||
const { | ||
routeCrumbs, | ||
routeData, | ||
networkType, | ||
walletType, | ||
walletHdPath, | ||
wallet, | ||
urbitWallet, | ||
authMnemonic, | ||
networkSeedCache, | ||
pointCursor, | ||
pointCache, | ||
txnHashCursor, | ||
|
@@ -235,6 +249,7 @@ class Bridge extends React.Component { | |
// router | ||
pushRoute={ this.pushRoute } | ||
popRoute={ this.popRoute } | ||
routeData={ routeData } | ||
// network | ||
setNetworkType={ this.setNetworkType } | ||
setNetwork={ this.setNetwork } | ||
|
@@ -258,6 +273,8 @@ class Bridge extends React.Component { | |
addToPointCache={ this.addToPointCache } | ||
pointCursor={ pointCursor } | ||
pointCache={ pointCache } | ||
networkSeedCache= { networkSeedCache } | ||
setNetworkSeedCache= { this.setNetworkSeedCache } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. React Q, to confirm my understanding: putting these as properties into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. If you have some component |
||
// txn | ||
setTxnHashCursor={ this.setTxnHashCursor } | ||
txnHashCursor={ txnHashCursor } /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything about this in your commit messages, but I think these (and the couple lines below) are just dev setup tweaks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep; hopefully that's okay. There were a couple issues with the flow so I just updated it.