Skip to content

feat(frontend): show total effective fee % + >5% guardrail on confirm…#296

Merged
ericmt-98 merged 1 commit into
ericmt-98:mainfrom
adepoju2006:feat/confirmation-effective-fee-guardrail
Jun 30, 2026
Merged

feat(frontend): show total effective fee % + >5% guardrail on confirm…#296
ericmt-98 merged 1 commit into
ericmt-98:mainfrom
adepoju2006:feat/confirmation-effective-fee-guardrail

Conversation

@adepoju2006

Copy link
Copy Markdown
Contributor

Close #192

#192 · T-5 — confirmation-screen completion

The card-level part of T-5 (effective total fee + >5% guardrail on the provider
cards) is already in main. This PR finishes the remaining requirement from the
task: the confirmation screen (pages/TradeConfirmation.tsx).

Previously the confirmation screen broke fees down in MXN but never showed the
combined effective percentage the user actually pays, nor the abandonment
guardrail
— the ~5% ceiling identified by validations V-1/V-3/V-7/V-8.

Changes (single file: micopay/frontend/src/pages/TradeConfirmation.tsx)

  • "Costo total efectivo" row = provider commission + platform fee, computed
    with the shared effectiveFeePercent() helper (no duplicated math).
  • Warning before the Confirmar button when the total exceeds the threshold.
  • Threshold is a configurable prop (maxEffectiveFeePercent, defaulting to
    MAX_EFFECTIVE_FEE_PERCENT) — not hardcoded.

Acceptance criteria

  • User sees the total effective % (platform + provider), not just platform.
  • Warning shown before confirming when total > ~5%.
  • Threshold is a constant/prop, not hardcoded.
  • tsc --noEmit passes.

Reuses the constant/helper already merged for the card-level work, so it stays
consistent with ExploreMap/DepositMap.

…ation screen

T-5 (ericmt-98#192) asked for the combined effective cost and a >5% warning on the
provider card AND on the confirmation screen. The cards were covered; the
post-map confirmation screen still only broke fees down in MXN without the
combined effective percentage or the abandonment guardrail.

- Add "Costo total efectivo" row = provider commission + platform fee, via the
  shared effectiveFeePercent() helper (no duplicated math).
- Show a clear warning before the Confirmar button when the total exceeds the
  threshold (the ~5% ceiling from validations V-1/V-3/V-7/V-8).
- Threshold is a configurable prop (maxEffectiveFeePercent, default
  MAX_EFFECTIVE_FEE_PERCENT) — not hardcoded in the component.

tsc --noEmit passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ericmt-98 ericmt-98 merged commit 3a62c21 into ericmt-98:main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T-5 · Transparencia de fee efectivo total + guardrail mayor al 5 por ciento

2 participants