Skip to content

Commit

Permalink
fix broken pallet balances types
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Apr 23, 2024
1 parent 17cfcff commit d6246f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/api/controllers/token.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ async function fetchTokenStats(network) {
accounts.forEach((entry) => {
const account = entry[0].toHuman()[0]
const balances = entry[1].toHuman().data;
const miscFrozen = BigInt(balances.miscFrozen.replace(/,/g, ""));
const feeFrozen = BigInt(balances.feeFrozen.replace(/,/g, ""));
const frozen = miscFrozen > feeFrozen ? miscFrozen : feeFrozen;
console.log(balances)
const frozen = BigInt(balances.frozen.replace(/,/g, ""));
const free = BigInt(balances.free.replace(/,/g, ""));
const reserved = BigInt(balances.reserved.replace(/,/g, ""));

Expand Down

0 comments on commit d6246f2

Please sign in to comment.