Skip to content

Commit 2f32697

Browse files
authored
[ffin-kz] Fix account ID regex to match 18-digit format (#950)
1 parent e6a85f8 commit 2f32697

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/ffin-kz/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function getRegexpMatch (regExps: RegExp[], text: string, flags?: string): RegEx
1515
}
1616

1717
function parseAccountIdAndBalance (text: string): { accountId: string, balance: number } {
18-
// Валюта счета:KZT, USD, EUR, RUB, CNY, TRY, AED Дата:01.01.2025 Номер счётаВалютаОстаток KZ123456789012345KZTKZT19,455.00 ₸
18+
// Валюта счета:KZT, USD, EUR, RUB, CNY, TRY, AED Дата:01.01.2025 Номер счётаВалютаОстаток KZ123456789012345678 KZT 19,455.00 ₸
1919
const match = getRegexpMatch([
20-
/([A-Z]{2}\d{2}[A-Z0-9]{13})KZT\s+KZT\s+([0-9,.\s]+)/
20+
/([A-Z]{2}\d{2}[A-Z0-9]{16})\s+KZT\s+([0-9,.\s]+)/
2121
], text)
2222
assert(typeof match?.[1] === 'string', 'Can\'t parse accountId from account statement')
2323
assert(typeof match?.[2] === 'string', 'Can\'t parse balance from account statement')

0 commit comments

Comments
 (0)