File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const { executeApiCall } = require("../services/rpc.service");
33const {
44 ACCOUNTS_TO_SUBTRACT_AMPLITUDE ,
55 ACCOUNTS_TO_SUBTRACT_PENDULUM ,
6+ TREASURY_ACCOUNT ,
67} = require ( "../utils/constants" ) ;
78const { Keyring } = require ( "@polkadot/api" ) ;
89
@@ -61,7 +62,15 @@ async function fetchTokenStats(network) {
6162 getAddressForFormat ( accountToSubtract , 0 ) ===
6263 getAddressForFormat ( account , 0 )
6364 ) {
64- supplyToIgnore += free - frozen ;
65+ if (
66+ getAddressForFormat ( accountToSubtract , 0 ) ===
67+ getAddressForFormat ( TREASURY_ACCOUNT , 0 )
68+ ) {
69+ // Exclude treasury balance from transferable tokens
70+ totalTransferable -= free ;
71+ } else {
72+ supplyToIgnore += free - frozen ;
73+ }
6574 }
6675 }
6776
Original file line number Diff line number Diff line change @@ -13,10 +13,13 @@ const ACCOUNTS_TO_SUBTRACT_PENDULUM = [
1313 "6dZRnXfN7nnrAUDWykWc7gpHpByVBj9HTRpFNNQyENh11xjq" ,
1414]
1515
16+ const TREASURY_ACCOUNT = "13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB"
17+
1618const ACCOUNTS_TO_SUBTRACT_AMPLITUDE = [
1719]
1820
1921module . exports = {
2022 ACCOUNTS_TO_SUBTRACT_PENDULUM ,
2123 ACCOUNTS_TO_SUBTRACT_AMPLITUDE ,
24+ TREASURY_ACCOUNT ,
2225}
You can’t perform that action at this time.
0 commit comments