Make unlock work, even when disablepinrequirement is active
This commit is contained in:
parent
ac556d593e
commit
12dce1e9f8
|
@ -69,10 +69,6 @@ func sync(ctx context.Context, vault *vault.Vault, cfg *config.Config) bool {
|
||||||
|
|
||||||
func ensureIsNotLocked(action Action) Action {
|
func ensureIsNotLocked(action Action) Action {
|
||||||
return func(request ipc.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx sockets.CallingContext) (interface{}, error) {
|
return func(request ipc.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx sockets.CallingContext) (interface{}, error) {
|
||||||
if cfg.ConfigFile.RuntimeConfig.DisablePinRequirement {
|
|
||||||
return action(request, cfg, vault, ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.IsLocked() {
|
if cfg.IsLocked() {
|
||||||
err := cfg.TryUnlock(vault)
|
err := cfg.TryUnlock(vault)
|
||||||
ctx1 := context.Background()
|
ctx1 := context.Background()
|
||||||
|
|
Loading…
Reference in New Issue