File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export default tseslint.config(
1717 "**/rollup.config.js" ,
1818 "**/node_modules/" ,
1919 "**/*.test.ts" ,
20+ "apps/playground/**" ,
2021 ] ,
2122 } ,
2223 eslint . configs . recommended ,
@@ -29,7 +30,7 @@ export default tseslint.config(
2930 } ,
3031 languageOptions : {
3132 parserOptions : {
32- project : [ "./packages/*/tsconfig*.json" , "./examples/*/tsconfig.json" ] ,
33+ project : [ "./packages/*/tsconfig*.json" , ] ,
3334 tsconfigRootDir : import . meta. dirname ,
3435 } ,
3536 } ,
Original file line number Diff line number Diff line change @@ -16,6 +16,21 @@ export interface PoolInfo {
1616 }
1717}
1818
19+ type PoolEntry = {
20+ keyArgs : [ number ]
21+ value : {
22+ state : { type : string }
23+ points : bigint
24+ member_counter : number
25+ roles : {
26+ depositor : string
27+ root ?: string
28+ nominator ?: string
29+ bouncer ?: string
30+ }
31+ }
32+ }
33+
1934const getAllPoolsInfo = async ( api : Api < ChainIdAssetHub > ) : Promise < PoolInfo [ ] > => {
2035 try {
2136 const allPoolEntries = await api . query . NominationPools . BondedPools . getEntries ( )
@@ -24,21 +39,6 @@ const getAllPoolsInfo = async (api: Api<ChainIdAssetHub>): Promise<PoolInfo[]> =
2439 return [ ]
2540 }
2641
27- type PoolEntry = {
28- keyArgs : [ number ]
29- value : {
30- state : { type : string }
31- points : bigint
32- member_counter : number
33- roles : {
34- depositor : string
35- root ?: string
36- nominator ?: string
37- bouncer ?: string
38- }
39- }
40- }
41-
4242 return ( allPoolEntries as PoolEntry [ ] ) . map ( entry => {
4343 const poolId = entry . keyArgs [ 0 ]
4444 const poolInfo = entry . value
@@ -94,7 +94,7 @@ export const findBestPoolId = async (api: Api<ChainIdAssetHub>): Promise<number
9494
9595export const getMaxPoolMembersPerPool = async ( api : Api < ChainIdAssetHub > ) : Promise < number > => {
9696 try {
97- // eslint-disable-next-line @typescript-eslint/no-explicit-any
97+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
9898 const getMaxPoolMembersPerPool : number =
9999 await api . query . NominationPools . MaxPoolMembersPerPool . getValue ( )
100100 return getMaxPoolMembersPerPool
You can’t perform that action at this time.
0 commit comments