@leofcoin/endpoints 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
- export declare const networkStats: (chain: any, networkVersion: any) => Promise<{
2
- version: any;
1
+ import Chain from '@leofcoin/chain/chain';
2
+ export declare const networkStats: (chain: Chain, networkVersion: string) => Promise<{
3
+ version: string;
3
4
  peers: any;
4
5
  accounts: any;
5
6
  accountsHolding: number;
@@ -7,8 +8,8 @@ export declare const networkStats: (chain: any, networkVersion: any) => Promise<
7
8
  topHolders: any[];
8
9
  }>;
9
10
  declare const _default: {
10
- networkStats: (chain: any, networkVersion: any) => Promise<{
11
- version: any;
11
+ networkStats: (chain: Chain, networkVersion: string) => Promise<{
12
+ version: string;
12
13
  peers: any;
13
14
  accounts: any;
14
15
  accountsHolding: number;
package/exports/shared.js CHANGED
@@ -8,15 +8,11 @@ export const networkStats = async (chain, networkVersion) => {
8
8
  // amount = BigNumber.from(amount)
9
9
  return { holder, amount };
10
10
  })
11
- // @ts-ignore
12
- .sort((a, b) => formatUnits(b.amount.sub(a.amount)));
11
+ .sort((a, b) => formatUnits(b.amount - a.amount));
13
12
  for (let { holder, amount } of balances) {
14
- // @ts-ignore
15
13
  if (amount > 0) {
16
- // @ts-ignore
17
14
  accountsHoldingAmount += amount;
18
15
  accountsHolding += 1;
19
- // @ts-ignore
20
16
  topHolders.length < 100 && topHolders.push({ holder, amount: formatUnits(amount) });
21
17
  }
22
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoints",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {