Add custom hook and context for the db encryption state
When we load the app we check wether the db is encrypted or not. This check is also performed after creating/setting/deleting password.
We also store the result of this check (currently using the async local storage).
I'd suggest to abstract this check method and the result value to custom hook.