feat: Bank Account Update Request DocType + approval endpoints [ENG-509]#51
Merged
islandbitcoin merged 2 commits intoJul 13, 2026
Conversation
Admin side of the update-approved-bank-account flow. Adds the ERPNext DocType the flash backend writes to, plus the approve/reject endpoints. - New "Bank Account Update Request" DocType (party, bank_account, status, proposed bank/branch/type/number/currency, support_note) + controller. - approve_bank_account_update_request: patches the Bank Account IN PLACE, preserving the doc name and is_default (cashout offers reference the name); re-verifies ownership, rejects duplicate account numbers and incomplete requests, closes sibling Pending requests, and audit-logs the old->new diff. - reject_bank_account_update_request: marks Rejected with a support note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Part of ENG-509 — this change spans three repos:
Merge order: flash#444 first (it defines the GraphQL contract), then the other two — the mobile change depends on the backend field to work end-to-end. |
This was referenced Jul 13, 2026
…-509] The completeness guard checked only bank_name and account_number; approval then wrote bank_branch/account_type onto the live Bank Account, so a request with an empty branch or type (e.g. created directly in Frappe) could blank those on the account cashouts settle to. Guard all four proposed fields. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
Admin / ERPNext side of ENG-509 — the DocType the flash backend writes to, plus the approve/reject endpoints. (Companion PRs in
flashandflash-mobile.)Changes
Bank Account Update RequestDocType (party,bank_account,status, proposedbank_name/bank_branch/account_type/account_number/currency,support_note) + controller.approve_bank_account_update_request— patches the linked Bank Account in place, preserving the docnameandis_defaultso in-flight cashout offers / Cashout docs keep resolving. Re-verifies ownership (party), rejects duplicatebank_account_noand incomplete requests, closes sibling Pending requests, and audit-logs the old→new diff.reject_bank_account_update_request— marks Rejected with a support note.Invariants
nameandis_defaultare never changed (delete+recreate would orphan cashout offers that reference the account by name).Cashout.validate).Testing
ruff check✓ ·ruff format --check✓ · DocType JSON parses ✓ · contract testtest_bank_account_update_request_page_contract.py(incl. in-place-patch identity + incomplete-guard/supersede assertions) ✓.Note
The admin review surface is the standard Frappe DocType list/form plus these endpoints. A dedicated side-by-side old/new diff workspace page is a follow-up.
🤖 Generated with Claude Code