Claude/scan screen from to edit x36qp0 - #19
Open
ponthief wants to merge 88 commits into
Open
Conversation
Finish the partial migration away from the network-agnostic get_blindbit_config() accessor. Every config read now goes through get_backend_config(network), threading the network through from wallet and swap-record context so per-network BlindBit / Fulcrum / mempool / Boltz indexers are honoured. - crud.py: get_effective_dust_threshold gains a network param; remove the get_blindbit_config and (unused) update_blindbit_config wrappers. - helpers/scan.py: thread wallet.network through scan_block, get_block_ts, mark_spent_utxos_batch and reconcile_unconfirmed_spent. - helpers/transactions.py, user.py, dust_check.py, fee_rates_backend.py: read config for the caller's network. - boltz_swap.py / boltz_refund_api.py: resolve Boltz/mempool URLs for the swap record's network (fund-critical broadcasts use rec.network). - views_api.py: pass wallet.network where available; genuinely cross-network/background callers (user prefs, payjoin list, health probes) fall back to DEFAULT_CONFIG_NETWORK, preserving prior behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1zKx1c5nQzL9WebyHmLQR
A deleted wallet left its approved bip353_requests and any admin_alerts behind. The approved rows kept surfacing in list_approved_bitmails(), so the background BitMail tamper sweep kept checking a wallet that no longer exists in silnt.wallets. - crud: add delete_bip353_requests_for_wallet, delete_admin_alerts_for_wallet and delete_admin_alerts_for_user. Admin alerts carry wallet_id/user_id only inside their meta JSON (no column), so the alert helpers parse meta rather than filter in SQL. - delete_all_silnt_data_for_user now also clears the user's admin alerts. - api_wallet_delete purges the wallet's BitMail requests and admin alerts after removing the wallet row (best-effort; failure is logged, not fatal). - The tamper sweep self-heals: a BitMail whose owning wallet is gone is purged and skipped, cleaning up any orphans created before this fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1zKx1c5nQzL9WebyHmLQR
…s://github.com/ponthief/siLNt into claude/refactor-blindbit-backend-config-howibj
max_wallets_per_user is read from the target network's backend config, but the enforcement counted the user's wallets across ALL networks — so a user at the cap on one network (e.g. signet) was blocked from creating a wallet on another (e.g. mainnet). count_silnt_wallets already supports a network filter; pass data.network so the count matches the per-network limit. - api_wallet_create: count only the user's wallets on data.network; error now names the network instead of "this server". - api_get_config: return the per-network wallet_count (endpoint is already network-scoped) so the UI's usage figure matches enforcement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1zKx1c5nQzL9WebyHmLQR
…config-howibj Claude/refactor blindbit backend config howibj
Lets clients check a BitMail username before submitting a request: applies the
same rules as request creation (format, reserved list, already-approved, and
existing DNS record) and returns {available, reason}. DNS/config errors are
non-fatal — the authoritative check still runs on submit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016vEyVv7XZGgXWcvC39jDCo
…e-sqfxw0 Add GET /bip353/available for live username availability checks
The WalletAccount model defaulted last_scan_height to 1 while the DB column (migrations.py) defaults to 0. Since create_silnt_wallet inserts the model, freshly-created wallets persisted 1, so the app reported "Scanned to: block 1" for a wallet that had never been scanned. Default to 0 (never scanned) to match the schema and the resume logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BizgTtdeH233srEaDHytBq
Both routes defaulted an absent `network` to "signet", so a mainnet client that omitted it was served signet's chain tip / min_scan_height / dust threshold. Reject a missing or empty network with 400 instead, so the mismatch fails loud rather than returning wrong-network data. Admin and fee endpoints keep their existing defaults. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BizgTtdeH233srEaDHytBq
…36qp0 Fix network scoping for chain tip/config and last_scan_height default
sp_contacts was keyed only by user_id, so a user with wallets on more than one network (e.g. a mainnet build reusing a signet test account) saw every network's contacts — mainnet listed signet recipients. Add a `network` column (migration m024, existing rows backfilled to signet since they predate mainnet), filter list/dedup/touch by it, and require an explicit `network` on GET/POST /contacts (400 when missing), matching the oracle/tip + config contract. The send path passes the wallet's network when bumping last_used_at. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BizgTtdeH233srEaDHytBq
…36qp0 Scope the SP contacts address book per network
Contacts were deduped only by SP address, so a user could save two contacts with the same name pointing at different addresses. Require the label to be unique per user+network (case-insensitive): reject a create or rename whose name is already used by a different contact, returning 400 with a clear message. The same address renaming itself is still fine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BizgTtdeH233srEaDHytBq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.