feat: lock the wallet 300 seconds after the last action
This commit is contained in:
parent
d6e7bbba2b
commit
b5189c1762
1 changed files with 12 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue