Skip to content

Commit fcb1baa

Browse files
Merge pull request #1948 from Solid-Money/claude/fix-rain-card-currency-WwtwY
Remove Rain-specific amount normalization logic
2 parents 1ce5e42 + 97e52c0 commit fcb1baa

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

lib/utils/cardHelpers.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,15 @@ export const getColorForTransaction = (
4949
};
5050

5151
/**
52-
* Normalize amount for display: Rain returns cents, Bridge returns dollars.
52+
* Normalize amount for display.
53+
* Both Rain and Bridge amounts are returned as dollars from the backend.
5354
*/
5455
function normalizeCardAmount(amount: string, provider?: CardProvider | null): number {
55-
const num = parseFloat(amount);
56-
if (provider === CardProvider.RAIN) return num / 100;
57-
return num;
56+
return parseFloat(amount);
5857
}
5958

6059
/**
6160
* Format card transaction amount with proper sign and currency symbol.
62-
* Pass provider so Rain amounts (cents) are converted to dollars for display.
6361
*/
6462
export const formatCardAmount = (
6563
amount: string,
@@ -72,7 +70,6 @@ export const formatCardAmount = (
7270

7371
/**
7472
* Format card transaction amount with currency code and +/- sign.
75-
* Pass provider so Rain amounts (cents) are converted to dollars for display.
7673
*/
7774
export const formatCardAmountWithCurrency = (
7875
amount: string,

0 commit comments

Comments
 (0)