mirror of
https://github.com/fiatjaf/nak.git
synced 2026-09-11 21:22:07 +02:00
bunker: re-render the qr code when the bunker secret rotates, it was left on screen encoding the burnt secret.
This commit is contained in:
@@ -429,7 +429,14 @@ var bunker = &cli.Command{
|
||||
}
|
||||
|
||||
setBunkerInfo := func() {
|
||||
info, _ := bunkerInfo()
|
||||
info, bunkerURI := bunkerInfo()
|
||||
if c.Bool("qrcode") {
|
||||
// the secret embedded in the bunker uri may have rotated,
|
||||
// so the qr code on screen has to be rendered again
|
||||
qr := strings.Builder{}
|
||||
qrterminal.Generate(bunkerURI, qrterminal.L, &qr)
|
||||
terminal.Log("QR Code for bunker URI:\n%s\n", qr.String())
|
||||
}
|
||||
terminal.SetFooter(info)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user