Преглед на файлове

Update app/requests.ts

fix: displaying the number of subscription beyond two decimal places.
Ma Yuke преди 1 година
родител
ревизия
64e78329ec
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      app/requests.ts

+ 4 - 0
app/requests.ts

@@ -113,6 +113,10 @@ export async function requestUsage() {
   if (response.total_usage) {
     response.total_usage = Math.round(response.total_usage) / 100;
   }
+  
+  if (total.hard_limit_usd) {
+    total.hard_limit_usd = Math.round(total.hard_limit_usd * 100) / 100;
+  }
 
   return {
     used: response.total_usage,