feat: lock the wallet 300 seconds after the last action

This commit is contained in:
Adrien Waksberg 2019-10-21 21:42:24 +02:00
parent d6e7bbba2b
commit b5189c1762

View file

@ -364,6 +364,8 @@ func (c *Cli) ListEntries(ch chan<- bool) {
clipboard.WriteAll(code)
}
}
ch <- false
}
}
@ -452,11 +454,16 @@ func Run() {
} else {
c1 := make(chan bool)
go c.ListEntries(c1)
for {
select {
case <-c1:
case res := <-c1:
if res {
return
}
case <-time.After(300 * time.Second):
return
}
}
}
}