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:
@@ -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,
|
||||
|
||||
@@ -8,3 +8,4 @@ export * from './currency';
|
||||
export * from './dates';
|
||||
export * from './validation';
|
||||
export * from './eo-uplift';
|
||||
export * from './institution-config';
|
||||
|
||||
14
packages/utils/src/institution-config.d.ts
vendored
Normal file
14
packages/utils/src/institution-config.d.ts
vendored
Normal 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
|
||||
1
packages/utils/src/institution-config.d.ts.map
Normal file
1
packages/utils/src/institution-config.d.ts.map
Normal 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"}
|
||||
17
packages/utils/src/institution-config.js
Normal file
17
packages/utils/src/institution-config.js
Normal 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
|
||||
1
packages/utils/src/institution-config.js.map
Normal file
1
packages/utils/src/institution-config.js.map
Normal 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"}
|
||||
26
packages/utils/src/institution-config.ts
Normal file
26
packages/utils/src/institution-config.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user