Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-cheperis committed Jan 25, 2024
1 parent 6e7c5bc commit 1c41426
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/vastai_api_invoices.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"io/ioutil"
"os"
"strconv"

"github.com/prometheus/common/log"
)
Expand Down Expand Up @@ -36,7 +35,7 @@ func getPayouts() (*PayoutInfo, error) {
lastPayoutTime := 0.0
for _, invoice := range data.Invoices {
if invoice.Type == "payment" {
amount, _ := strconv.ParseFloat(invoice.Amount, 64)
amount := invoice.Amount
if amount > 0 {
paidOut += int64(amount * 100)
if invoice.Ts > lastPayoutTime {
Expand Down

0 comments on commit 1c41426

Please sign in to comment.