@@ -38,7 +38,6 @@ class Ticket extends React.Component {
38 ticket: '',
38 ticket: '',
39 ticketStatus: Nothing(),
39 ticketStatus: Nothing(),
40 passphrase: '',
40 passphrase: '',
44 this.handlePointNameInput = this.handlePointNameInput.bind(this);
43 this.handlePointNameInput = this.handlePointNameInput.bind(this);
@@ -72,7 +71,8 @@ class Ticket extends React.Component {
72 //TODO maybe want to do this only on-go, because wallet derivation is slow...
71 //TODO maybe want to do this only on-go, because wallet derivation is slow...
73 async verifyTicket(pointName, ticket, passphrase) {
72 async verifyTicket(pointName, ticket, passphrase) {
74 if (!ob.isValidPatq(ticket) || !ob.isValidPatp(pointName)) {
73 if (!ob.isValidPatq(ticket) || !ob.isValidPatp(pointName)) {
74+ this.props.setUrbitWallet(Nothing());
75− this.setState({ ticketStatus: Nothing(), wallet: Nothing() });
75+ this.setState({ ticketStatus: Nothing() });
78 this.setState({ ticketStatus: Just(INPUT_STATUS.SPIN) });
78 this.setState({ ticketStatus: Just(INPUT_STATUS.SPIN) });
@@ -89,23 +89,24 @@ class Ticket extends React.Component {
89 pointNumber,
89 pointNumber,
90 uhdw.ownership.keys.address
90 uhdw.ownership.keys.address
92− let newState = { wallet: Just(uhdw) };
92+ this.props.setUrbitWallet(Just(uhdw));
93− newState.ticketStatus =
93+ this.setState({
94− (await isOwner) || (await isTransferProxy)
95+ (await isOwner) || (await isTransferProxy)
95− ? Just(INPUT_STATUS.GOOD)
96+ ? Just(INPUT_STATUS.GOOD)
96− : Just(INPUT_STATUS.FAIL);
97+ : Just(INPUT_STATUS.FAIL),
97− this.setState(newState);
98+ });
100 canContinue() {
101 canContinue() {
101 // this is our only requirement, since we still want people with
102 // this is our only requirement, since we still want people with
102 // non-standard wallet setups to be able to log in
103 // non-standard wallet setups to be able to log in
103− return Just.hasInstance(this.state.wallet);
104+ return Just.hasInstance(this.props.wallet);
106 continue() {
107 continue() {
108+ //TODO maybe do on-mount?
107 this.props.setWalletType(WALLET_TYPES.TICKET);
109 this.props.setWalletType(WALLET_TYPES.TICKET);
108− this.props.setUrbitWallet(this.state.wallet.value); //TODO wrap
109 this.props.setPointCursor(Just(ob.patp2dec(this.state.pointName)));
110 this.props.setPointCursor(Just(ob.patp2dec(this.state.pointName)));
110 this.props.loginCompleted();
111 this.props.loginCompleted();