on master help sign in
- Finish styling up to transactions page
commitfe001e17b8852ebfcdd2f9603c467ad9649c7ec3 authorChris Johnson <chris@cjohnson.io> dateMon 22 Apr 2019, 05:12 (8 years ago) parent3014bf3
3 files changed+18−15
src/bridge/components/Passport.js+8−5 src/bridge/lib/invite.js+2−1 src/bridge/views/InviteLogin.js+8−9
src/bridge/components/Passport.js+8−5
@@ -26,7 +26,7 @@ class Passport extends React.Component {
2626
2727 download() {
2828 downloadWallet(this.state.paper)
29− this.props.confirmWalletDownload()
29+ this.props.pushWalletState(WALLET_STATES.DOWNLOADED)
3030 }
3131
3232 generateScreen() {
@@ -59,6 +59,9 @@ class Passport extends React.Component {
5959 }
6060
6161 getWalletStates() {
62+ let hideWalletStates = this.props.walletStates.includes(WALLET_STATES.TRANSACTIONS)
63+ if (hideWalletStates) return null
64+
6265 let stateElems = this.props.walletStates.map(state => {
6366 return (
6467 <div className="flex justify-between">
@@ -69,7 +72,7 @@ class Passport extends React.Component {
6972 })
7073
7174 return (
72− <div>
75+ <div className="mt-3">
7376 {stateElems}
7477 </div>
7578 )
@@ -159,9 +162,9 @@ class Passport extends React.Component {
159162 { 'Download' }
160163 </Button>
161164 </div>
162− <div className="passport-wallet-states mt-3">
163− {walletStates}
164− </div>
165+
166+ {walletStates}
167+
165168 </div>
166169 )
167170 }
src/bridge/lib/invite.js+2−1
@@ -26,7 +26,8 @@ const WALLET_STATES = {
2626 GENERATING: "Generating your wallet",
2727 GENERATED: "Wallet generation complete",
2828 PAPER_READY: "Paper collateral generated",
29− DOWNLOADED: "Wallet downloaded"
29+ DOWNLOADED: "Wallet downloaded",
30+ TRANSACTIONS: "Sending transactions"
3031}
3132
3233async function generateWallet(point) {
src/bridge/views/InviteLogin.js+8−9
@@ -33,7 +33,7 @@ class InviteLogin extends React.Component {
3333 realPoint: Nothing(),
3434 realWallet: Nothing(),
3535 walletReady: false,
36− stage: INVITE_STAGES.INVITE_TRANSACTIONS,
36+ stage: INVITE_STAGES.INVITE_LOGIN,
3737 walletStates: []
3838 }
3939
@@ -42,7 +42,6 @@ class InviteLogin extends React.Component {
4242
4343 this.handleInviteTicketInput = this.handleInviteTicketInput.bind(this)
4444 this.handleVerifyTicketInput = this.handleVerifyTicketInput.bind(this)
45− this.confirmWalletDownload = this.confirmWalletDownload.bind(this)
4645 this.pushWalletState = this.pushWalletState.bind(this)
4746 this.navigateLogin = this.navigateLogin.bind(this)
4847 }
@@ -66,12 +65,6 @@ class InviteLogin extends React.Component {
6665 this.setState({ verifyTicket })
6766 }
6867
69− confirmWalletDownload() {
70− this.setState({
71− walletStates: this.state.walletStates.concat(WALLET_STATES.DOWNLOADED),
72− })
73− }
74−
7568 async unlockInviteWallet(inviteTicket) {
7669 this.setState({
7770 walletStates: this.state.walletStates.concat(WALLET_STATES.UNLOCKING),
@@ -220,6 +213,13 @@ class InviteLogin extends React.Component {
220213 continueReady = this.state.walletStates.includes(WALLET_STATES.DOWNLOADED)
221214 break
222215 case INVITE_STAGES.INVITE_VERIFY:
216+ clickHandler = () => {
217+ this.setState({
218+ stage: INVITE_STAGES.INVITE_TRANSACTIONS,
219+ walletStates: this.state.walletStates.concat(WALLET_STATES.TRANSACTIONS)
220+ })
221+ }
222+ continueReady = true
223223 break
224224 }
225225
@@ -282,7 +282,6 @@ class InviteLogin extends React.Component {
282282 wallet={this.state.realWallet}
283283 walletStates={this.state.walletStates}
284284 pushWalletState={this.pushWalletState}
285− confirmWalletDownload={this.confirmWalletDownload}
286285 />
287286 </Col>
288287 </Row>