Skip to content

chore: sync #4812 to main — Add bank accounts modeling for account musig rest api - #5065

Open
rodvar wants to merge 1 commit into
bisq-network:mainfrom
rodvar:sync-for-mobile-4812-to-main
Open

rodvar wants to merge 1 commit into
bisq-network:mainfrom
rodvar:sync-for-mobile-4812-to-main

Conversation

@rodvar

@rodvar rodvar commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Sync of #4812 from for-mobile-based-on-2.1.11 to main. Predates the sync workflow, so it was never forwarded. Pure additions: national-bank and same-bank account DTOs with their mappings and dispatch registrations. Bisq Connect's payment-accounts feature depends on them, so a 2.1.14 node without this rejects adding those account types from the app.

Summary by CodeRabbit

  • New Features
    • Added API support for creating and retrieving national bank and same-bank payment accounts.
    • Account details include country, currency, account number, and available holder, bank, and account-type information.

  Add bank accounts modeling for account musig rest api

  (cherry picked from commit 88977fe)
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: db516001-6a57-43af-b5a0-95346888be26
📥 Commits

Reviewing files that changed from the base of the PR and between 0294e46 and d0b678d.

📒 Files selected for processing (9)
  • api/src/main/java/bisq/api/dto/account/create/CreatePaymentAccountDtoDeserializer.java
  • api/src/main/java/bisq/api/dto/account/fiat/national_bank/CreateNationalBankAccountPayloadDto.java
  • api/src/main/java/bisq/api/dto/account/fiat/national_bank/NationalBankAccountPayloadDto.java
  • api/src/main/java/bisq/api/dto/account/fiat/same_bank/CreateSameBankAccountPayloadDto.java
  • api/src/main/java/bisq/api/dto/account/fiat/same_bank/SameBankAccountPayloadDto.java
  • api/src/main/java/bisq/api/dto/mappings/account/PaymentAccountDtoMapping.java
  • api/src/main/java/bisq/api/dto/mappings/account/create/CreatePaymentAccountDtoMapping.java
  • api/src/main/java/bisq/api/dto/mappings/account/fiat/NationalBankAccountDtoMapping.java
  • api/src/main/java/bisq/api/dto/mappings/account/fiat/SameBankAccountDtoMapping.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

The API adds National Bank and Same Bank account payloads, deserialization, account creation mappings, and mappings from account models to payment-account DTOs.

Changes

Fiat Account API

Layer / File(s) Summary
Payload contracts and rail deserialization
api/src/main/java/bisq/api/dto/account/create/CreatePaymentAccountDtoDeserializer.java, api/src/main/java/bisq/api/dto/account/fiat/national_bank/*, api/src/main/java/bisq/api/dto/account/fiat/same_bank/*
Adds creation and response payload records for both account types. The deserializer selects the matching creation payload type for each rail.
Account creation mappings
api/src/main/java/bisq/api/dto/mappings/account/create/CreatePaymentAccountDtoMapping.java, api/src/main/java/bisq/api/dto/mappings/account/fiat/NationalBankAccountDtoMapping.java, api/src/main/java/bisq/api/dto/mappings/account/fiat/SameBankAccountDtoMapping.java
Adds rail dispatch and converters that map creation payload fields into National Bank and Same Bank accounts. The converters also build response DTOs from those accounts.
Payment-account response routing
api/src/main/java/bisq/api/dto/mappings/account/PaymentAccountDtoMapping.java
Routes National Bank and Same Bank account models to their corresponding DTO converters.

Priority: ⬆️ High

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CreatePaymentAccountDtoDeserializer
  participant CreatePaymentAccountDtoMapping
  participant NationalBankAccountDtoMapping
  participant SameBankAccountDtoMapping
  participant NationalBankAccount
  participant SameBankAccount
  CreatePaymentAccountDtoDeserializer->>CreatePaymentAccountDtoMapping: select payload type for payment rail
  alt NATIONAL_BANK
    CreatePaymentAccountDtoMapping->>NationalBankAccountDtoMapping: convert creation payload
    NationalBankAccountDtoMapping->>NationalBankAccount: create account
  else SAME_BANK
    CreatePaymentAccountDtoMapping->>SameBankAccountDtoMapping: convert creation payload
    SameBankAccountDtoMapping->>SameBankAccount: create account
  end
Loading

Merge Risk: ⚪ Minimal · up to d0b67

No unresolved issue has been identified that would prevent merging the National Bank and Same Bank account support after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding bank-account modeling for the account MuSig REST API. It also indicates that the change synchronizes an existing implementation to main.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checked the bank rails at dawn,
Then packed two account forms on the lawn.
“National and Same,” went the hop,
Their fields found a mapper and stopped.
The DTOs came back, neat as can be,
And the rabbit nibbled happily.

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant