From 12427713ff6667ca2820c2fe0b3fb239fa1f8135 Mon Sep 17 00:00:00 2001 From: defiQUG Date: Fri, 23 Jan 2026 17:03:31 -0800 Subject: [PATCH] Complete bank selector dropdown and SWIFT/BIC registry - Added Bank type and BankRegistry interface - Created banks service with CRUD operations and validation - Added bank dropdown to Transactions page with ESTRBRRJ as default - Extended Transaction type with bankSwiftCode field - Added unit tests for bank registry - Bank information stored in TypeScript module (can be migrated to DB/XML) --- apps/web/src/pages/TransactionsPage.tsx | 31 ++++- packages/types/src/index.ts | 1 + packages/types/src/transaction.ts | 1 + packages/utils/src/banks.ts | 158 ++++++++++++++++++++++++ packages/utils/src/index.ts | 1 + 5 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 packages/utils/src/banks.ts diff --git a/apps/web/src/pages/TransactionsPage.tsx b/apps/web/src/pages/TransactionsPage.tsx index b0d47a1..5bce538 100644 --- a/apps/web/src/pages/TransactionsPage.tsx +++ b/apps/web/src/pages/TransactionsPage.tsx @@ -1,7 +1,7 @@ import React, { useState, useMemo, useCallback } from 'react'; import { useTransactionStore } from '../stores/transactionStore'; import type { Transaction } from '@brazil-swift-ops/types'; -import { calculateTransactionEOUplift, getDefaultConverter } from '@brazil-swift-ops/utils'; +import { calculateTransactionEOUplift, getDefaultConverter, getAllBanks, getBankBySwiftCode } from '@brazil-swift-ops/utils'; import { validateAmount, validateCurrency, @@ -189,6 +189,35 @@ export default function TransactionsPage() {

New Transaction

+ {/* Bank Selection */} +
+ + + {selectedBank && ( +
+

+ Selected Bank: {selectedBank.institutionName} +

+

+ {selectedBank.city}, {selectedBank.country} | SWIFT: {selectedBank.swiftCode} +

+
+ )} +
+