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)
|
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)
|
||||||
|
|
||||||
|
for {
|
||||||
select {
|
select {
|
||||||
case <-c1:
|
case res := <-c1:
|
||||||
|
if res {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
case <-time.After(300 * time.Second):
|
case <-time.After(300 * time.Second):
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue