mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 14:18:43 +08:00
fix: fix microcents to USD conversion in AIChatService
This only affects a value sent to TrackSpendingService. Cost calculations related to user's quotas / billing remain unaffected.
This commit is contained in:
parent
913c1b7836
commit
dcd47bc4cf
@ -114,7 +114,8 @@ class AIChatService extends BaseService {
|
||||
await this.db.insert('ai_usage', values);
|
||||
|
||||
// USD cost from microcents
|
||||
const cost_usd = values.cost / 1000000;
|
||||
const cost_usc = values.cost / 1000000;
|
||||
const cost_usd = cost_usc / 100;
|
||||
|
||||
// Add to TrackSpendingService
|
||||
const svc_spending = this.services.get('spending');
|
||||
|
Loading…
Reference in New Issue
Block a user