@leofcoin/endpoints 0.2.7 → 0.2.9
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.
- package/exports/http.js +1 -1
- package/exports/shared.js +5 -1
- package/exports/ws.js +1 -1
- package/package.json +1 -1
package/exports/http.js
CHANGED
|
@@ -4,7 +4,7 @@ import Router from '@koa/router'
|
|
|
4
4
|
import {formatUnits} from '@leofcoin/utils'
|
|
5
5
|
import {readFile} from 'fs/promises'
|
|
6
6
|
import Showdown from 'showdown'
|
|
7
|
-
import shared from './shared'
|
|
7
|
+
import shared from './shared.js'
|
|
8
8
|
import { dirname, join} from 'path'
|
|
9
9
|
import { fileURLToPath } from 'url'
|
|
10
10
|
|
package/exports/shared.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {formatUnits, BigNumber} from '@leofcoin/utils'
|
|
2
2
|
|
|
3
|
-
export const networkStats = async () => {
|
|
3
|
+
export const networkStats = async (chain) => {
|
|
4
4
|
let accountsHolding = 0
|
|
5
5
|
let accountsHoldingAmount = BigNumber.from(0)
|
|
6
6
|
let topHolders = []
|
|
@@ -27,4 +27,8 @@ export const networkStats = async () => {
|
|
|
27
27
|
accountsHoldingAmount: formatUnits(accountsHoldingAmount).toString(),
|
|
28
28
|
topHolders
|
|
29
29
|
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
networkStats
|
|
30
34
|
}
|
package/exports/ws.js
CHANGED