@@ -22,12 +22,14 @@ import { generateTemporaryOwnershipWallet } from 'lib/walletgen';
22import { useActivateFlow } from './ActivateFlow';
22import { useActivateFlow } from './ActivateFlow';
23import { useLocalRouter } from 'lib/LocalRouter';
23import { useLocalRouter } from 'lib/LocalRouter';
24import useImpliedTicket from 'lib/useImpliedTicket';
24import useImpliedTicket from 'lib/useImpliedTicket';
25+import useHasDisclaimed from 'lib/useHasDisclaimed';
26export default function ActivateCode() {
27export default function ActivateCode() {
27 const history = useHistory();
28 const history = useHistory();
28 const { names, push } = useLocalRouter();
29 const { names, push } = useLocalRouter();
29 const { contracts } = useNetwork();
30 const { contracts } = useNetwork();
30 const impliedTicket = useImpliedTicket();
31 const impliedTicket = useImpliedTicket();
32+ const [hasDisclaimed] = useHasDisclaimed();
31 const [generalError, setGeneralError] = useState();
33 const [generalError, setGeneralError] = useState();
32 const [deriving, setDeriving] = useState(false);
34 const [deriving, setDeriving] = useState(false);
@@ -48,7 +50,12 @@ export default function ActivateCode() {
48 const goToLogin = useCallback(() => history.popAndPush(ROUTE_NAMES.LOGIN), [
50 const goToLogin = useCallback(() => history.popAndPush(ROUTE_NAMES.LOGIN), [
51− const goToPassport = useCallback(() => push(names.PASSPORT), [names, push]);
53+ const goToPassport = useCallback(() => {
54+ push(names.PASSPORT);
55+ if (!hasDisclaimed) {
56+ push(names.DISCLAIMER);
58+ }, [names, push, hasDisclaimed]);
53 const pass = derivedWallet.matchWith({
60 const pass = derivedWallet.matchWith({
54 Nothing: () => false,
61 Nothing: () => false,