mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 12:58:13 +00:00
refactor: ( waafi ) use USD for demo
This commit is contained in:
@@ -10,10 +10,10 @@ export default registerAs("app", () => ({
|
|||||||
serviceAuthToken: process.env.SERVICE_AUTH_TOKEN ?? "",
|
serviceAuthToken: process.env.SERVICE_AUTH_TOKEN ?? "",
|
||||||
reconciliation: {
|
reconciliation: {
|
||||||
/** How often the stale-intent sweep runs. */
|
/** How often the stale-intent sweep runs. */
|
||||||
sweepIntervalMs: parseInt(
|
// TODO(demo): revert to the env-driven line below after the demo. Temporarily FORCED to 30s
|
||||||
process.env.RECONCILE_SWEEP_INTERVAL_MS ?? "60000",
|
// here so the .env (RECONCILE_SWEEP_INTERVAL_MS) cannot override it.
|
||||||
10,
|
// sweepIntervalMs: parseInt(process.env.RECONCILE_SWEEP_INTERVAL_MS ?? "60000", 10),
|
||||||
),
|
sweepIntervalMs: 30_000,
|
||||||
/** An intent is "stale" when non-terminal and untouched for this long. */
|
/** An intent is "stale" when non-terminal and untouched for this long. */
|
||||||
staleAfterMs: parseInt(process.env.RECONCILE_STALE_AFTER_MS ?? "60000", 10),
|
staleAfterMs: parseInt(process.env.RECONCILE_STALE_AFTER_MS ?? "60000", 10),
|
||||||
batchSize: parseInt(process.env.RECONCILE_BATCH_SIZE ?? "20", 10),
|
batchSize: parseInt(process.env.RECONCILE_BATCH_SIZE ?? "20", 10),
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ export default registerAs("waafi", () => ({
|
|||||||
// Wallet payment method (EVC/ZAAD/Sahal) — MWALLET_ACCOUNT requires the payer phone up front.
|
// Wallet payment method (EVC/ZAAD/Sahal) — MWALLET_ACCOUNT requires the payer phone up front.
|
||||||
paymentMethod: process.env.WAAFI_PAYMENT_METHOD ?? "MWALLET_ACCOUNT",
|
paymentMethod: process.env.WAAFI_PAYMENT_METHOD ?? "MWALLET_ACCOUNT",
|
||||||
// Waafi has no ETB; when set this overrides the asserted currency (USD/DJF/SLSH).
|
// Waafi has no ETB; when set this overrides the asserted currency (USD/DJF/SLSH).
|
||||||
currency: process.env.WAAFI_CURRENCY ?? "DJF",
|
// TODO(demo): revert to the env-driven line below after the demo. Temporarily FORCED to USD
|
||||||
|
// here so the .env (WAAFI_CURRENCY) cannot override it.
|
||||||
|
// currency: process.env.WAAFI_CURRENCY ?? "DJF",
|
||||||
|
currency: "USD",
|
||||||
// Browser redirect targets after the hosted page completes/fails (UX only; webhook is source of truth).
|
// Browser redirect targets after the hosted page completes/fails (UX only; webhook is source of truth).
|
||||||
successUrl: process.env.WAAFI_HPP_SUCCESS_URL ?? "",
|
successUrl: process.env.WAAFI_HPP_SUCCESS_URL ?? "",
|
||||||
failureUrl: process.env.WAAFI_HPP_FAILURE_URL ?? "",
|
failureUrl: process.env.WAAFI_HPP_FAILURE_URL ?? "",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export class ReconciliationService implements OnModuleInit, OnModuleDestroy {
|
|||||||
private readonly providers: PaymentProviderMap,
|
private readonly providers: PaymentProviderMap,
|
||||||
) {
|
) {
|
||||||
this.intervalMs =
|
this.intervalMs =
|
||||||
config.get<number>("app.reconciliation.sweepIntervalMs") ?? 60_000;
|
config.get<number>("app.reconciliation.sweepIntervalMs") ?? 30_000;
|
||||||
this.staleAfterMs =
|
this.staleAfterMs =
|
||||||
config.get<number>("app.reconciliation.staleAfterMs") ?? 60_000;
|
config.get<number>("app.reconciliation.staleAfterMs") ?? 60_000;
|
||||||
this.batchSize = config.get<number>("app.reconciliation.batchSize") ?? 20;
|
this.batchSize = config.get<number>("app.reconciliation.batchSize") ?? 20;
|
||||||
|
|||||||
Reference in New Issue
Block a user