Skip to content

Commit

Permalink
fix: contract calls count (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
michele-franchi authored May 28, 2024
1 parent 43c35d5 commit 67779ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/contractDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const useContractDetailsStore = defineStore('contractDetails', () => {

async function fetchContractCallsCount() {
contractCallsCount.value = null
const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/transactions/count/${contractId.value}`)
contractCallsCount.value = Object.values(data?.contractCallTx ?? {}).reduce((sum, value) => sum + value, 0)
const { data } = await axios.get(`${MIDDLEWARE_URL}/v3/transactions/count?id=${contractId.value}`)
contractCallsCount.value = data
}

async function fetchContractCreationTx() {
Expand Down

0 comments on commit 67779ab

Please sign in to comment.