Commit 408874a
committed
fix(localfiat): cap entered amount for USDC value exchanges as well
With our switch to rounding formatted Fiat values using HALF_UP (closest), we introduced
an internal balance "capping" to the actual underlying transfer to allow bills to still render
at the entered amount (the "native amount"), while sending the min(balance, usdAmount) as the
underlying USDC value. However, this was only taken into account for custom tokens and was not applied
to straight USDC transfers as well.
Signed-off-by: Brandon McAnsh <[email protected]>1 parent ac0082b commit 408874a
File tree
1 file changed
+9
-9
lines changed- services/opencode/src/main/kotlin/com/getcode/opencode/model/financial
1 file changed
+9
-9
lines changedLines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
94 | | - | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments