mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-18 04:38:55 +00:00
fix(send): show the proof-notify target on the review screen
With proof mode on, a notify= npub on the scanned URI makes the wallet gift-wrap the full signed payment proof (buyer sender address + kernel) to that key at finalize, but the review screen never showed the target, a hidden watcher the payer never saw or consented to. The proof row now renders a second line, Proof shared with: npub1abc...xyz, whenever a notify target is present, so the recipient is seen and chosen: if you scanned it, you asked for it. Display only; nothing about what gets sent changes. Adds the goblin.send.row_proof_shared key in all six locales.
This commit is contained in:
@@ -1231,6 +1231,23 @@ impl SendFlow {
|
||||
&t!("goblin.send.row_proof"),
|
||||
&t!("goblin.send.row_proof_val"),
|
||||
);
|
||||
// Make the proof's hidden delivery target visible and consented: when
|
||||
// a `notify` npub rode in on the scanned URI, the wallet gift-wraps
|
||||
// the full signed proof (with the buyer's sender address + kernel) to
|
||||
// that key at finalize. Show exactly where it goes so it is a seen,
|
||||
// chosen recipient rather than a silent watcher: if you scanned it,
|
||||
// you asked for it. Display only; nothing here changes what is sent.
|
||||
if let Some(notify) = self.notify.as_deref() {
|
||||
// Truncate the bech32 npub for a single-line row (npub1abc…wxyz).
|
||||
// `notify` is a validated npub (ASCII, well over 18 chars), so the
|
||||
// byte slices land on char boundaries.
|
||||
let short = if notify.len() > 18 {
|
||||
format!("{}…{}", ¬ify[..12], ¬ify[notify.len() - 6..])
|
||||
} else {
|
||||
notify.to_string()
|
||||
};
|
||||
w::info_row(ui, &t!("goblin.send.row_proof_shared"), &short);
|
||||
}
|
||||
}
|
||||
if self.request {
|
||||
w::info_row(
|
||||
|
||||
Reference in New Issue
Block a user