Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions mobile/app/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ function ModeChoice({
* Lending the viewing key needs a yes first, and the person picks how alerts
* arrive at the same moment (spec §6.3, zspace#442). Private is chosen to start with.
*/
function ConsentSheet({ onDone }: { onDone: ((c: Consent) => void) | null }) {
function ConsentSheet({
onDone,
viewOnly,
}: {
onDone: ((c: Consent) => void) | null;
viewOnly: boolean;
}) {
const c = useTheme();
const s = useStyles();
const [instant, setInstant] = useState(false);
Expand All @@ -139,6 +145,14 @@ function ConsentSheet({ onDone }: { onDone: ((c: Consent) => void) | null }) {
While it’s lent, the server can see payments you receive. So could someone who broke into
it, or a court order.
</T>
{/* A viewing key someone imported often watches the wallet that holds
their savings (wizard#61), so say what lending it covers. */}
{viewOnly ? (
<T kind="dust">
This wallet only watches. If its key came from your main wallet, lending it shows the
server payments coming to that wallet.
</T>
) : null}
<T kind="label" style={s.group}>
When should alerts come?
</T>
Expand Down Expand Up @@ -507,7 +521,7 @@ export default function Notifications() {
</Notice>
)}
</ScrollView>
<ConsentSheet onDone={consent} />
<ConsentSheet onDone={consent} viewOnly={w.viewOnly} />
</Screen>
);
}
Expand Down
Loading