Skip to content

fix(withdrawal): prevent currency mismatch when entryRate is null#683

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/withdrawal-currency-mismatch
May 11, 2026
Merged

fix(withdrawal): prevent currency mismatch when entryRate is null#683
bmc08gt merged 1 commit into
code/cashfrom
fix/withdrawal-currency-mismatch

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 11, 2026

When entryRate is null, feeInEntryCurrency returned the raw USD fee instead of null, causing a ClassCastException when subtracted from a non-USD nativeAmount. Return null so callers use their currency-safe fallbacks.

@bmc08gt bmc08gt self-assigned this May 11, 2026
@github-actions github-actions Bot added type: fix Bug fix area: payments Payments, transfers, intents, billing and removed type: fix Bug fix labels May 11, 2026
When entryRate is null, feeInEntryCurrency returned the raw USD fee
instead of null, causing an IllegalArgumentException when subtracted
from a non-USD nativeAmount. Return null so callers use their
currency-safe fallbacks, and seed entryRate eagerly in init to shrink
the null window.
@bmc08gt bmc08gt force-pushed the fix/withdrawal-currency-mismatch branch from fbc9381 to bfcb388 Compare May 11, 2026 13:56
@github-actions github-actions Bot added the type: fix Bug fix label May 11, 2026
@bmc08gt bmc08gt merged commit f1caa3d into code/cash May 11, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/withdrawal-currency-mismatch branch May 13, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: payments Payments, transfers, intents, billing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant