Repository navigation
be: find a token's account by its iban, so a caller with several accounts needs no moneta id - #72
Merged
Merged
Conversation
…unts needs no moneta id
landsman
force-pushed
the
be/account-by-iban
branch
from
November 12, 2026 07:51
9f9a7fe to
47c5fab
Compare
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
commented
Nov 12, 2026
landsman
left a comment
Owner
Author
There was a problem hiding this comment.
Second pass, on the code rather than the threads. The five findings from the first round are all addressed: the lookup is on MonetaClient with the holder delegating, a blank IBAN is refused before any request, a shared IBAN throws, the per-call regex is gone, and the doc caveat now matches the filter. Tests and spotlessCheck pass on the head.
What is left:
.docs/usage.mdnow has two sections on one topic. Fold the new one into the existing## More than one account.account(token, iban)has the shape oftransactions(token, accountId)but takes an IBAN. Passing an id returnsnull, which the docs say to read as revoked. Rename it.- "Spaces of any kind" still misses zero-width characters. Keeping letters and digits only fixes that and the dashes caveat together.
- A mistyped IBAN is still indistinguishable from a revoked one. The mod-97 check is the blank guard's argument applied to the common case.
- Two test nits.
None of this blocks the behaviour. 2 and 3 are worth settling before the method is published, since it is new and pre-1.0.
…ot read as revoked
…hes and dots match too
… as a revoked account
…ne topic has one place
11 tasks
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.
Closes #68. A token opening several accounts left every app to match the stored IBAN against
accounts()itself;moneta.accountByIban(token, iban)andme.accountByIban(iban)do it. Only an IBAN's letters and digits count, in either case, so one pasted from a PDF or a web page (no-break and zero-width spaces, dashes, dots) matches.IllegalArgumentExceptionbefore any request, so a caller's typo is not read as a revoked account.IllegalStateExceptionnaming their ids, not a guess.accountsrequest per call, so a revoked account shows on the next poll.transactions(iban)shortcut: it would hide the null case in an exception.Tests: a match as printed and with every separator; an IBAN the token does not see; blank and mistyped ones, which send no request; a shared IBAN; the accounts read again per call.
.docs/usage.mdhas it under "More than one account", in Java and Kotlin.