Add bank selector dropdown and SWIFT/BIC registry
- Added Bank type and BankRegistry interface - Created banks service with CRUD operations - Added bank dropdown to Transactions page - Integrated ESTRBRRJ (strategy INVESTIMENTOS S/A CVC) as default - Added SWIFT code validation - Added unit tests for bank registry - Extended Transaction type with bankSwiftCode field
This commit is contained in:
@@ -32,8 +32,11 @@ export default function TransactionsPage() {
|
||||
},
|
||||
});
|
||||
const [errors, setErrors] = useState<Record<string, string>>({});
|
||||
const [selectedBankSwiftCode, setSelectedBankSwiftCode] = useState<string>('ESTRBRRJ');
|
||||
|
||||
const converter = getDefaultConverter();
|
||||
const banks = getAllBanks();
|
||||
const selectedBank = getBankBySwiftCode(selectedBankSwiftCode);
|
||||
|
||||
const handleSubmit = useCallback(async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
@@ -137,6 +140,7 @@ export default function TransactionsPage() {
|
||||
},
|
||||
purposeOfPayment: sanitizeString(formData.purposeOfPayment || ''),
|
||||
fxContractId: formData.fxContractId,
|
||||
bankSwiftCode: selectedBankSwiftCode,
|
||||
status: 'pending',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
|
||||
Reference in New Issue
Block a user