@@ -30,6 +30,7 @@ import {
30import FormError from 'form/FormError';
30import FormError from 'form/FormError';
32import ContinueButton from './ContinueButton';
32import ContinueButton from './ContinueButton';
33+import useSetState from 'lib/useSetState';
34export default function Ticket({ className, goHome }) {
35export default function Ticket({ className, goHome }) {
35 useLoginView(WALLET_TYPES.TICKET);
36 useLoginView(WALLET_TYPES.TICKET);
@@ -38,6 +39,7 @@ export default function Ticket({ className, goHome }) {
38 const { setUrbitWallet } = useWallet();
39 const { setUrbitWallet } = useWallet();
39 const { setPointCursor } = usePointCursor();
40 const { setPointCursor } = usePointCursor();
40 const impliedPoint = useImpliedPoint();
41 const impliedPoint = useImpliedPoint();
42+ const [warnings, addWarning] = useSetState();
42 const cachedUrbitWallet = useRef(Nothing());
44 const cachedUrbitWallet = useRef(Nothing());
@@ -88,11 +90,13 @@ export default function Ticket({ className, goHome }) {
91− if (!isOwner && !isTransferProxy) {
93+ const noPermissions = !isOwner && !isTransferProxy;
92− // notify the user, but allow login regardless
94+ // notify the user, but allow login regardless
93− // TODO: warnings
95+ addWarning({
94− // 'This ticket is not the owner of or transfer proxy for this point.'
97+ ? 'This wallet is not the owner or transfer proxy for this point.'
96 } catch (error) {
100 } catch (error) {
97 console.error(error);
101 console.error(error);
@@ -102,7 +106,7 @@ export default function Ticket({ className, goHome }) {
105− [contracts]
109+ [addWarning, contracts]
108 const validate = useMemo(
112 const validate = useMemo(
@@ -147,6 +151,7 @@ export default function Ticket({ className, goHome }) {
148 <Grid className={cn('mt4', className)}>
152 <Grid className={cn('mt4', className)}>
149 <BridgeForm
153 <BridgeForm
150 validate={validate}
155 validate={validate}
151 onValues={onValues}
156 onValues={onValues}
152 afterSubmit={goHome}
157 afterSubmit={goHome}