IsInitialized > walletLoaded & panic recovery (#266)

* isInitialized update
update walletInitialized to return true is walled.db exist,
add walletLoaded that check if wallet property is nil

* panic handler
This commit is contained in:
Dusan Sekulic
2024-08-19 18:57:52 +02:00
committed by GitHub
parent 250dd7eea2
commit 07139786e6
4 changed files with 404 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ import (
// UnaryInterceptor returns the unary interceptor
func UnaryInterceptor(svc *macaroons.Service) grpc.ServerOption {
return grpc.UnaryInterceptor(middleware.ChainUnaryServer(
unaryPanicRecoveryInterceptor(),
unaryLogger,
unaryMacaroonAuthHandler(svc),
))
@@ -17,6 +18,7 @@ func UnaryInterceptor(svc *macaroons.Service) grpc.ServerOption {
// StreamInterceptor returns the stream interceptor with a logrus log
func StreamInterceptor(svc *macaroons.Service) grpc.ServerOption {
return grpc.StreamInterceptor(middleware.ChainStreamServer(
streamPanicRecoveryInterceptor(),
streamLogger,
streamMacaroonAuthHandler(svc),
))