You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read the diff against origin/hotfix/6.11.1 (the funding-error files, the bloc, the new copy/error widgets, and the .arb files). Overall this is a solid, well-structured hotfix — it does the right thing by propagating the backend error code + messageData all the way to presentation and centralizing the code→copy mapping. A few things are worth a look before merge.
What's good 👍
Clean layering.code / message / messageData now flow from the gateway → application error → FundExchangeApiError → FundExchangeApiErrorCopy. Making displayTitle/displayMessage abstract on the sealed FundExchangePresentationError forces every subclass to implement them — good compile-time safety.
Localization is consistent. All locales carry the same keys, and the parameterized strings ({missingFields}, {error}, {iban}) keep the placeholders intact in translations, so gen-l10n won't break.
Robustness improvements in bullbitcoin_api_funding_gateway.dart: null-safe element (?? {}), num→String coercion before fromJson, and rethrowing typed errors instead of leaking raw parse exceptions.
Things I'd flag
Redundant empty-list throw. The gateway now throws FetchInstitutionsFailed.emptyList() when the result is empty, and the bloc re-checks if (result.institutions.isEmpty) at fund_exchange_bloc.dart:86. Since the gateway already throws, the bloc branch is effectively dead for the API-empty case. Harmless defense-in-depth, but worth a comment so a future reader doesn't think the bloc check is load-bearing.
numTelefono key-guessing is fragile. The merged['numTelefono'] ??= merged['NUM TELEFONO'] ?? merged['NUM_TELEFONO'] ?? merged['PHONE NUMBER'] ?? ... fallback hard-codes several spellings. It works, but it's brittle against backend key changes — a short // backend sends this field under inconsistent keys comment would help, and ideally the backend contract gets pinned down later.
log.severe → log.warning downgrade. Since these are now user-handled errors, warning is defensible — but the generic parse-failure path now logs at warning and throws FetchFundingDetailsFailed(message: 'Could not parse details') with no code. If parse failures were something you wanted alerting on, you've lowered their visibility. Confirm that's intentional.
Dead-ish field.LoadInstitutionsFailed gained a message field, but the only producer (InvalidInstitution() mapping) never sets it — so message is always ''. Minor; either wire it up or drop it.
Scope creep (minor).backup_card.dart (Spacer→Expanded/Gap overflow fix) is unrelated to funding. Fine to ride along in a hotfix, but it's not described by the PR title/body — worth a one-line mention in the description.
Verdict
No blocking bugs that I can see — the error-mapping logic is correct and the localization is complete. Items 1–4 are polish/observability nits, not correctness issues. I'd be comfortable merging after a quick confirmation on the logging downgrade (#3) and a note about the unrelated backup_card change (#5).
One thing I could not do here: run flutter analyze / the test suite to confirm it compiles cleanly (no build env available in this run). I'd recommend CI green on analyze before merge given the new abstract methods + l10n additions.
· funding-fixes-6110
ethicnology
changed the title
hotfix: Funding fixes 6110
hotfix: Funding fixes 6.11.0
Jun 9, 2026
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
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.
Fixes pending issues in funding flow