Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

@TaprootFreak TaprootFreak commented Jan 13, 2026

Summary

Fix IBAN search in Compliance page not finding results when IBAN contains spaces.

Problem

When searching for an IBAN with spaces (e.g., DE81 3701 9000 1011 3760 35), the search returned "No user or bankTx found" because the API expects IBANs without spaces.

Solution

Use ibantools library to validate and normalize IBAN input:

  • electronicFormatIBAN() removes spaces and converts to uppercase
  • isValidIBAN() verifies the IBAN checksum

Only valid IBANs are transformed. All other search terms (names, emails, blockchain addresses, etc.) remain unchanged.

function normalizeSearchKey(key: string): string {
  const normalized = electronicFormatIBAN(key);
  if (normalized && isValidIBAN(normalized)) {
    return normalized;
  }
  return key;
}

Test plan

  • Search for IBAN with spaces: DE81 3701 9000 1011 3760 35 → normalized
  • Search for IBAN without spaces: DE81370190001011376035 → unchanged
  • Names with spaces: Max Mustermann → unchanged
  • Company names: DE12 Technologies GmbH → unchanged (invalid checksum)
  • Emails: test@example.com → unchanged
  • Blockchain addresses: bc1q..., 0x... → unchanged

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

🤖 PR Review Bot

⚠️ Security: 0 critical, 30 high vulnerabilities


This is an automated review. Please address the issues above.

@TaprootFreak TaprootFreak force-pushed the fix/compliance-iban-search-spaces branch 2 times, most recently from b684f66 to 4403fe8 Compare January 13, 2026 23:14
Use ibantools to validate and normalize IBAN input. Only transforms
strings that pass IBAN checksum validation, ensuring names, emails,
and other search terms remain unchanged.
@TaprootFreak TaprootFreak force-pushed the fix/compliance-iban-search-spaces branch from 4403fe8 to 43f77d9 Compare January 13, 2026 23:17
@TaprootFreak TaprootFreak merged commit bd20af0 into develop Jan 14, 2026
6 checks passed
@TaprootFreak TaprootFreak deleted the fix/compliance-iban-search-spaces branch January 14, 2026 10:00
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.

3 participants