Skip to content

Commit

Permalink
spelling corrections, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Feb 28, 2024
1 parent 8a6e582 commit 17cfcff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/api/controllers/token.controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const memcached = require("../../config/memcached");
const { executeApiCall } = require("../services/rpc.service");
const {ACCOUNTS_TO_SUBSTRACT_AMPLITUDE, ACCOUNTS_TO_SUBSTRACT_PENDULUM} = require("../utils/circulating_accounts_to_ignore");
const {ACCOUNTS_TO_SUBTRACT_AMPLITUDE, ACCOUNTS_TO_SUBTRACT_PENDULUM} = require("../utils/constants");

async function fetchTokenStats(network) {
console.log(`Fetching token stats for network ${network}`);
Expand All @@ -23,21 +23,21 @@ async function fetchTokenStats(network) {
const free = BigInt(balances.free.replace(/,/g, ""));
const reserved = BigInt(balances.reserved.replace(/,/g, ""));

// We maintain the supplyToIgnore to substract it from the total transferable
let accountsToSubstract = [];
// We mantain the supplyToIgnore to subtract it from the total transferable
let accountsToSubtract = [];
if (network === "amplitude") {
accountsToSubstract = ACCOUNTS_TO_SUBSTRACT_AMPLITUDE;
accountsToSubtract = ACCOUNTS_TO_SUBTRACT_AMPLITUDE;
} else if (network === "pendulum") {
accountsToSubstract = ACCOUNTS_TO_SUBSTRACT_PENDULUM;
accountsToSubtract = ACCOUNTS_TO_SUBTRACT_PENDULUM;
} else {
console.error("Invalid network");
}

// We define the circulating supply as the total transferable (free - frozen) minus
// the total transferable of a set of predefined multisig accounts (https://github.com/pendulum-chain/tasks/issues/242)
// We keep track of the transferable of these accounts
// which will then will be substratect to the total transferable
if (accountsToSubstract.includes(String(account))) {
// which will then be subtracted from the total transferable
if (accountsToSubtract.includes(String(account))) {
supplyToIgnore += free - frozen;
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/routes/v1/stats.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ router
.route("/circulatingsupply")
/**
* @api {get} token/stats/circulatingsupply Token circulating supply
* @apiDescription Get the current token adjusted circulating supply
* @apiDescription Get the current token stats for adjusted circulating supply
* @apiVersion 1.0.0
* @apiName ListTokenStatsCirculatingSupply
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ACCOUNTS_TO_SUBSTRACT_PENDULUM = [
const ACCOUNTS_TO_SUBTRACT_PENDULUM = [
"6cY3Zrb2gr1xt3BczzJ3xoMpF7UyrcGNfR3cjkjcF7auq2Y9",
"6gfLdZvfW2w6fDaPpVfUs53W8Aay17s1bjwcFaqDaBVt7Muo",
"6biLQnLREwRd9aSPiN9xxR2UDCPa1XL3ZSwqNUxNEr3QvGDk",
Expand All @@ -12,10 +12,10 @@ const ACCOUNTS_TO_SUBSTRACT_PENDULUM = [
"6cE1nHQu9XRH6pUSjMejCUzF39XqFx3HwgZNTMHNTZZw2c7M",
]

const ACCOUNTS_TO_SUBSTRACT_AMPLITUDE = [
const ACCOUNTS_TO_SUBTRACT_AMPLITUDE = [
]

module.exports = {
ACCOUNTS_TO_SUBSTRACT_PENDULUM,
ACCOUNTS_TO_SUBSTRACT_AMPLITUDE,
ACCOUNTS_TO_SUBTRACT_PENDULUM,
ACCOUNTS_TO_SUBTRACT_AMPLITUDE,
}

0 comments on commit 17cfcff

Please sign in to comment.