@@ -38,7 +38,6 @@ class Ticket extends React.Component {
3838 ticket: '',
3939 ticketStatus: Nothing(),
4040 passphrase: '',
41− wallet: Nothing(),
4241 };
4342
4443 this.handlePointNameInput = this.handlePointNameInput.bind(this);
@@ -72,7 +71,8 @@ class Ticket extends React.Component {
7271 //TODO maybe want to do this only on-go, because wallet derivation is slow...
7372 async verifyTicket(pointName, ticket, passphrase) {
7473 if (!ob.isValidPatq(ticket) || !ob.isValidPatp(pointName)) {
75− this.setState({ ticketStatus: Nothing(), wallet: Nothing() });
74+ this.props.setUrbitWallet(Nothing());
75+ this.setState({ ticketStatus: Nothing() });
7676 return;
7777 }
7878 this.setState({ ticketStatus: Just(INPUT_STATUS.SPIN) });
@@ -89,23 +89,24 @@ class Ticket extends React.Component {
8989 pointNumber,
9090 uhdw.ownership.keys.address
9191 );
92− let newState = { wallet: Just(uhdw) };
93− newState.ticketStatus =
94− (await isOwner) || (await isTransferProxy)
95− ? Just(INPUT_STATUS.GOOD)
96− : Just(INPUT_STATUS.FAIL);
97− this.setState(newState);
92+ this.props.setUrbitWallet(Just(uhdw));
93+ this.setState({
94+ ticketStatus:
95+ (await isOwner) || (await isTransferProxy)
96+ ? Just(INPUT_STATUS.GOOD)
97+ : Just(INPUT_STATUS.FAIL),
98+ });
9899 }
99100
100101 canContinue() {
101102 // this is our only requirement, since we still want people with
102103 // non-standard wallet setups to be able to log in
103− return Just.hasInstance(this.state.wallet);
104+ return Just.hasInstance(this.props.wallet);
104105 }
105106
106107 continue() {
108+ //TODO maybe do on-mount?
107109 this.props.setWalletType(WALLET_TYPES.TICKET);
108− this.props.setUrbitWallet(this.state.wallet.value); //TODO wrap
109110 this.props.setPointCursor(Just(ob.patp2dec(this.state.pointName)));
110111 this.props.loginCompleted();
111112 }