mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
feat(frontend): fix admin add dollars (#9898)
Fixes the admin add dollars, in the ``add-money-button.tsx`` file, in
the handleApproveSubmit action it was trying to use formatCredits for
the value which is wrong, this fix changes it
```diff
<form action={handleApproveSubmit}>
<input type="hidden" name="id" value={userId} />
<input
type="hidden"
name="amount"
- value={formatCredits(Number(dollarAmount))}
+ value={Math.round(parseFloat(dollarAmount) * 100)}
/>
```
i was able to add $1, $0.10 and $0.01

This commit is contained in:
@@ -85,7 +85,7 @@ export function AdminAddMoneyButton({
|
||||
<input
|
||||
type="hidden"
|
||||
name="amount"
|
||||
value={formatCredits(Number(dollarAmount))}
|
||||
value={Math.round(parseFloat(dollarAmount) * 100)}
|
||||
/>
|
||||
|
||||
<div className="grid gap-4 py-4">
|
||||
|
||||
Reference in New Issue
Block a user