fix: use check_user_exists for LNbits 1.4 compatibility #6

Merged
padreug merged 1 commit from fix/lnbits-1.4-check-super-user into main 2026-01-05 11:15:58 +00:00
Owner

Summary

  • LNbits 1.4 changed check_super_user to return Account (no wallets) instead of User (with wallets)
  • This broke the template rendering because LNbits.map.user() requires the wallets property
  • Switch to check_user_exists + manual super_user check, following the pattern used by LNbits core admin pages

Root Cause

In LNbits v1.3:

async def check_super_user(...) -> User  # Has wallets

In LNbits v1.4:

async def check_super_user(...) -> Account  # No wallets

Test plan

  • Open satmachineadmin extension in LNbits 1.4
  • Verify no console errors about Cannot read properties of undefined (reading 'map')
  • Verify config status displays correctly (not "Not configured" when it is configured)
  • Verify non-superusers still get 403 Forbidden

🤖 Generated with Claude Code

## Summary - LNbits 1.4 changed `check_super_user` to return `Account` (no wallets) instead of `User` (with wallets) - This broke the template rendering because `LNbits.map.user()` requires the `wallets` property - Switch to `check_user_exists` + manual `super_user` check, following the pattern used by LNbits core admin pages ## Root Cause In LNbits v1.3: ```python async def check_super_user(...) -> User # Has wallets ``` In LNbits v1.4: ```python async def check_super_user(...) -> Account # No wallets ``` ## Test plan - [ ] Open satmachineadmin extension in LNbits 1.4 - [ ] Verify no console errors about `Cannot read properties of undefined (reading 'map')` - [ ] Verify config status displays correctly (not "Not configured" when it is configured) - [ ] Verify non-superusers still get 403 Forbidden 🤖 Generated with [Claude Code](https://claude.com/claude-code)
padreug added 1 commit 2026-01-05 11:15:20 +00:00
fix: use check_user_exists for LNbits 1.4 compatibility
Some checks failed
CI / lint (push) Waiting to run
CI / tests (3.10) (push) Blocked by required conditions
CI / tests (3.9) (push) Blocked by required conditions
CI / lint (pull_request) Has been cancelled
/ release (push) Has been cancelled
CI / tests (3.10) (pull_request) Has been cancelled
CI / tests (3.9) (pull_request) Has been cancelled
/ pullrequest (push) Has been cancelled
ab4e3d6b12
LNbits 1.4 changed check_super_user to return Account (no wallets)
instead of User (with wallets). This broke the template rendering
because LNbits.map.user() requires the wallets property.

Switch to check_user_exists (returns User with wallets) and manually
check user.super_user for access control. This follows the same
pattern used by LNbits core admin pages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
padreug merged commit ab4e3d6b12 into main 2026-01-05 11:15:58 +00:00
padreug deleted branch fix/lnbits-1.4-check-super-user 2026-01-05 11:15:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aiolabs/satmachineadmin#6
No description provided.