Description
The fiat withdrawal service uses a hardcoded exchange rate instead of the live FX service:
File: internal/fiat/service.go (line 100)
rate := decimal.NewFromInt(1500) // 1 USDC = 1500 NGN
Impact
- Withdrawals use an outdated/inaccurate exchange rate
- Users may receive incorrect fiat amounts
- The FX service exists but is not used in this flow
Proposed Fix
Replace the hardcoded rate with a call to the FX service:
quote, err := fxService.GetQuote(ctx, "USDC", "NGN", amount)
rate := quote.Rate
Acceptance Criteria
Labels
bug backend
Description
The fiat withdrawal service uses a hardcoded exchange rate instead of the live FX service:
File:
internal/fiat/service.go(line 100)Impact
Proposed Fix
Replace the hardcoded rate with a call to the FX service:
Acceptance Criteria
Labels
bugbackend