@@ -2,6 +2,7 @@ import { Just, Nothing } from 'folktale/maybe';
2import React, { useCallback, useState, useEffect } from 'react';
2import React, { useCallback, useState, useEffect } from 'react';
3import * as azimuth from 'azimuth-js';
3import * as azimuth from 'azimuth-js';
4import * as ob from 'urbit-ob';
4import * as ob from 'urbit-ob';
5+import { Input } from 'indigo-react';
6import View from 'components/View';
7import View from 'components/View';
@@ -11,13 +12,13 @@ import {
11} from 'components/Inputs';
12} from 'components/Inputs';
12import { ForwardButton } from 'components/Buttons';
13import { ForwardButton } from 'components/Buttons';
14−import * as need from 'lib/need';
15−import { WALLET_TYPES, urbitWalletFromTicket } from 'lib/wallet';
17import { useNetwork } from 'store/network';
15import { useNetwork } from 'store/network';
18import { useWallet } from 'store/wallet';
16import { useWallet } from 'store/wallet';
19import { usePointCursor } from 'store/pointCursor';
17import { usePointCursor } from 'store/pointCursor';
20−import { Input } from 'indigo-react';
18+
19+import * as need from 'lib/need';
20+import { WALLET_TYPES, urbitWalletFromTicket } from 'lib/wallet';
21+import useWalletType from 'lib/useWalletType';
22//TODO should be part of InputWithStatus component
23//TODO should be part of InputWithStatus component
23const INPUT_STATUS = {
24const INPUT_STATUS = {
@@ -27,9 +28,10 @@ const INPUT_STATUS = {
29export default function Ticket({ advanced, loginCompleted }) {
30export default function Ticket({ advanced, loginCompleted }) {
31+ useWalletType(WALLET_TYPES.TICKET);
30 // globals
32 // globals
31 const { contracts } = useNetwork();
33 const { contracts } = useNetwork();
32− const { wallet, setWalletType, setUrbitWallet } = useWallet();
34+ const { wallet, setUrbitWallet } = useWallet();
33 const { setPointCursor } = usePointCursor();
35 const { setPointCursor } = usePointCursor();
@@ -100,7 +102,6 @@ export default function Ticket({ advanced, loginCompleted }) {
102 const doContinue = () => {
104 const doContinue = () => {
103− setWalletType(WALLET_TYPES.TICKET);
104 setPointCursor(Just(ob.patp2dec(pointName)));
105 setPointCursor(Just(ob.patp2dec(pointName)));
105 loginCompleted();
106 loginCompleted();