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