threefoldtech / tfgrid-sdk-ts

Apache License 2.0
4 stars 8 forks source link

🐞 [Bug]: Billing isn't reflected on the dashboard contracts #3406

Open A-Harby opened 1 month ago

A-Harby commented 1 month ago

Is there an existing issue for this?

which package/s did you face the problem with?

Dashboard

What happened?

I noticed that some of my contracts get delayed showing the billing value after a full billing cycle if it didn't show it at all.

Its billed on the TFChain and its showing the on chain and graphql.

Steps To Reproduce

No response

which network/s did you face the problem on?

Dev

version

a948bfa

Twin ID/s

9090

Node ID/s

250

Farm ID/s

1

Contract ID/s

151438

Relevant screenshots/screen records

image

dashboard (2).log

Relevant log output

{
  "contract_id": 151438,
  "twin_id": 9090,
  "type": "rent",
  "state": "Created",
  "created_at": 1726144326,
  "details": {
    "nodeId": 250,
    "farm_id": 1
  },
  "solutionName": "-",
  "solutionType": "-",
  "expiration": "-",
  "consumption": 0
}

{
  standardReserve: 17,937,800
  additionalReserve: 0
  standardOverdraft: 0
  additionalOverdraft: 0
  lastUpdatedSeconds: 1,726,147,368
  cycles: 1
}

with amount 17,937,800
zaelgohary commented 1 month ago

The issue is with the created_at interface. Once fixed, the billing will be fixed.

amiraabouhadid commented 1 month ago

problem in first time created billing report because billing rate is calculated by subtracting current from previous report

zaelgohary commented 1 month ago

The issue happens in the first billing cycle only.

0oM4R commented 3 weeks ago

I couldn't find the created_at interface issue but found that the issue is with accessing the contract field in the gql response image

so we need to update the GqlConsumption interface