Fix all placeholders and hardcoded values

- Make transactionId and batchId required parameters in E&O uplift functions
- Move BIC code to configurable institution-config in utils package
- Update effective dates to use current date instead of hardcoded 2024-01-01
- Add placeholder review documentation
- Comment out console.log in retention policy (production TODO)
- All critical placeholders resolved
This commit is contained in:
defiQUG
2026-01-23 16:15:48 -08:00
parent d4b73ae127
commit ecb1bb148e
48 changed files with 970 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ export const DEFAULT_EO_UPLIFT_RATE = 0.10; // 10%
* Calculate E&O uplift for a single transaction
*/
export function calculateTransactionEOUplift(
transactionId: string,
baseAmount: number,
currency: string,
upliftRate: number = DEFAULT_EO_UPLIFT_RATE,
@@ -39,7 +40,7 @@ export function calculateTransactionEOUplift(
}
return {
transactionId: '', // Will be set by caller
transactionId,
baseAmount,
currency,
upliftRate,
@@ -54,6 +55,7 @@ export function calculateTransactionEOUplift(
* Calculate E&O uplift for a batch of transactions
*/
export function calculateBatchEOUplift(
batchId: string,
baseAmount: number,
currency: string,
transactionCount: number,
@@ -77,7 +79,7 @@ export function calculateBatchEOUplift(
}
return {
batchId: '', // Will be set by caller
batchId,
baseAmount,
currency,
transactionCount,

View File

@@ -8,3 +8,4 @@ export * from './currency';
export * from './dates';
export * from './validation';
export * from './eo-uplift';
export * from './institution-config';

View File

@@ -0,0 +1,14 @@
/**
* Institution-specific configuration
* BIC: ESTRBRRJ (Strategy Investimentos S/A CVC, Rio de Janeiro, Brazil)
*/
export interface InstitutionConfig {
bic: string;
name: string;
country: string;
city?: string;
}
export declare const INSTITUTION_CONFIG: InstitutionConfig;
export declare function getInstitutionBIC(): string;
export declare function getInstitutionName(): string;
//# sourceMappingURL=institution-config.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"institution-config.d.ts","sourceRoot":"","sources":["institution-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB,EAAE,iBAKhC,CAAC;AAEF,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}

View File

@@ -0,0 +1,17 @@
/**
* Institution-specific configuration
* BIC: ESTRBRRJ (Strategy Investimentos S/A CVC, Rio de Janeiro, Brazil)
*/
export const INSTITUTION_CONFIG = {
bic: 'ESTRBRRJ',
name: 'Strategy Investimentos S/A CVC',
country: 'BR',
city: 'Rio de Janeiro',
};
export function getInstitutionBIC() {
return INSTITUTION_CONFIG.bic;
}
export function getInstitutionName() {
return INSTITUTION_CONFIG.name;
}
//# sourceMappingURL=institution-config.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"institution-config.js","sourceRoot":"","sources":["institution-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,gCAAgC;IACtC,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF,MAAM,UAAU,iBAAiB;IAC/B,OAAO,kBAAkB,CAAC,GAAG,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,kBAAkB,CAAC,IAAI,CAAC;AACjC,CAAC"}

View File

@@ -0,0 +1,26 @@
/**
* Institution-specific configuration
* BIC: ESTRBRRJ (Strategy Investimentos S/A CVC, Rio de Janeiro, Brazil)
*/
export interface InstitutionConfig {
bic: string;
name: string;
country: string;
city?: string;
}
export const INSTITUTION_CONFIG: InstitutionConfig = {
bic: 'ESTRBRRJ',
name: 'Strategy Investimentos S/A CVC',
country: 'BR',
city: 'Rio de Janeiro',
};
export function getInstitutionBIC(): string {
return INSTITUTION_CONFIG.bic;
}
export function getInstitutionName(): string {
return INSTITUTION_CONFIG.name;
}