@@ -30,6 +30,7 @@ import {
3030import FormError from 'form/FormError';
3131
3232import ContinueButton from './ContinueButton';
33+import useSetState from 'lib/useSetState';
3334
3435export default function Ticket({ className, goHome }) {
3536 useLoginView(WALLET_TYPES.TICKET);
@@ -38,6 +39,7 @@ export default function Ticket({ className, goHome }) {
3839 const { setUrbitWallet } = useWallet();
3940 const { setPointCursor } = usePointCursor();
4041 const impliedPoint = useImpliedPoint();
42+ const [warnings, addWarning] = useSetState();
4143
4244 const cachedUrbitWallet = useRef(Nothing());
4345
@@ -88,11 +90,13 @@ export default function Ticket({ className, goHome }) {
8890 ),
8991 ]);
9092
91− if (!isOwner && !isTransferProxy) {
92− // notify the user, but allow login regardless
93− // TODO: warnings
94− // 'This ticket is not the owner of or transfer proxy for this point.'
95− }
93+ const noPermissions = !isOwner && !isTransferProxy;
94+ // notify the user, but allow login regardless
95+ addWarning({
96+ point: noPermissions
97+ ? 'This wallet is not the owner or transfer proxy for this point.'
98+ : null,
99+ });
96100 } catch (error) {
97101 console.error(error);
98102 return {
@@ -102,7 +106,7 @@ export default function Ticket({ className, goHome }) {
102106 };
103107 }
104108 },
105− [contracts]
109+ [addWarning, contracts]
106110 );
107111
108112 const validate = useMemo(
@@ -147,6 +151,7 @@ export default function Ticket({ className, goHome }) {
147151 return (
148152 <Grid className={cn('mt4', className)}>
149153 <BridgeForm
154+ warnings={warnings}
150155 validate={validate}
151156 onValues={onValues}
152157 afterSubmit={goHome}