Add TPIN creation, TPIN-authorised transfers, MPIN reset and transfer history

- Create TPIN: current MPIN -> OTP -> encrypted TPIN via /tpin/create/*,
  from Services and from the transfer screen on TPIN_NOT_SET
- IMPS initiate now sends encryptedTpin instead of encryptedMpin; handles
  INVALID_TPIN and TPIN_NOT_SET
- Share one RSA-OAEP encryption and key-retry path for MPIN and TPIN
- Forgot MPIN on sign-in and Reset MPIN in the Security Center
- Fund transfer history list and detail, reachable from Home
- Brand logo on sign-in and palette updates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Abin Toppo
2026-09-29 17:54:43 +05:30
co-authored by Claude Opus 5.5
parent abb14d5768
commit f1def81eb7
50 changed files with 3039 additions and 385 deletions
+20 -3
View File
@@ -9,9 +9,26 @@ import {
} from './cbsErrors';
describe('error code catalogue', () => {
it('covers all 48 documented codes, with no duplicates', () => {
expect(CBS_ERROR_CODES).toHaveLength(48);
expect(new Set(CBS_ERROR_CODES).size).toBe(48);
it('covers all 52 documented codes, with no duplicates', () => {
expect(CBS_ERROR_CODES).toHaveLength(52);
expect(new Set(CBS_ERROR_CODES).size).toBe(52);
});
it('knows the TPIN codes, so none of them collapses into UNKNOWN_ERROR', () => {
// The transfer and create-TPIN screens branch on each of these: a wrong
// TPIN keeps the sheet up, a missing one sends the customer to create it,
// and an existing one ends the create flow.
expect(isCbsErrorCode('INVALID_TPIN')).toBe(true);
expect(isCbsErrorCode('TPIN_NOT_SET')).toBe(true);
expect(isCbsErrorCode('TPIN_ALREADY_SET')).toBe(true);
});
it('does not invite a retry on a TPIN refusal', () => {
// A wrong TPIN is the customer's to re-enter, not the identical request's
// to repeat; the other two are states a retry cannot change.
expect(isRetryableError('INVALID_TPIN')).toBe(false);
expect(isRetryableError('TPIN_NOT_SET')).toBe(false);
expect(isRetryableError('TPIN_ALREADY_SET')).toBe(false);
});
it('does not invite a retry when the bank withholds a balance', () => {