Skip to content

Commit

Permalink
chore: use pay_invoice permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Dec 13, 2023
1 parent 0accfeb commit c64f527
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions handle_pay_keysend_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ func (svc *Service) HandlePayKeysendEvent(ctx context.Context, request *Nip47Req
return nil, err
}

hasPermission, code, message := svc.hasPermission(&app, event, request.Method, 0)
if hasPermission {
// We use pay_invoice permissions for budget and max amount
hasPermission, code, message = svc.hasPermission(&app, event, NIP_47_PAY_INVOICE_METHOD, payParams.Amount)
}
// We use pay_invoice permissions for budget and max amount
hasPermission, code, message := svc.hasPermission(&app, event, NIP_47_PAY_INVOICE_METHOD, payParams.Amount)

if !hasPermission {
svc.Logger.WithFields(logrus.Fields{
Expand Down

0 comments on commit c64f527

Please sign in to comment.