File tree Expand file tree Collapse file tree 4 files changed +248
-215
lines changed Expand file tree Collapse file tree 4 files changed +248
-215
lines changed Original file line number Diff line number Diff line change 76
76
"dependencies" : {
77
77
"@ethersproject/abi" : " ^5.7.0" ,
78
78
"@ethersproject/contracts" : " ^5.7.0" ,
79
- "@lifi/types" : " ^1.10 .1" ,
79
+ "@lifi/types" : " ^1.11 .1" ,
80
80
"axios" : " ^1.1.3" ,
81
81
"bignumber.js" : " ^9.1.0" ,
82
82
"eth-rpc-errors" : " ^4.0.3" ,
89
89
"@types/hdkey" : " ^2.0.0" ,
90
90
"@types/jest" : " ^29.2.0" ,
91
91
"@types/websocket" : " ^1.0.4" ,
92
- "@typescript-eslint/eslint-plugin" : " ^5.40.1 " ,
93
- "@typescript-eslint/parser" : " ^5.40.1 " ,
92
+ "@typescript-eslint/eslint-plugin" : " ^5.41.0 " ,
93
+ "@typescript-eslint/parser" : " ^5.41.0 " ,
94
94
"eslint" : " ^8.26.0" ,
95
95
"eslint-config-prettier" : " ^8.3.0" ,
96
96
"eslint-plugin-prettier" : " ^4.2.1" ,
97
97
"husky" : " ^8.0.1" ,
98
- "jest" : " ^29.2.1 " ,
98
+ "jest" : " ^29.2.2 " ,
99
99
"lint-staged" : " ^13.0.3" ,
100
100
"npm-run-all" : " ^4.1.5" ,
101
101
"pinst" : " ^3.0.0" ,
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ import {
9
9
import axios from 'axios'
10
10
import { isRoutesRequest , isStep } from '../typeguards'
11
11
import {
12
- Chain ,
13
12
ChainId ,
14
13
ChainKey ,
15
14
ChainsResponse ,
15
+ ExtendedChain ,
16
16
PossibilitiesRequest ,
17
17
PossibilitiesResponse ,
18
18
RoutesRequest ,
@@ -245,7 +245,9 @@ const getStatus = async (
245
245
}
246
246
}
247
247
248
- const getChains = async ( options ?: RequestOptions ) : Promise < Chain [ ] > => {
248
+ const getChains = async (
249
+ options ?: RequestOptions
250
+ ) : Promise < ExtendedChain [ ] > => {
249
251
const configService = ConfigService . getInstance ( )
250
252
const config = configService . getConfig ( )
251
253
Original file line number Diff line number Diff line change 1
1
import {
2
2
AddEthereumChainParameter ,
3
- Chain ,
4
3
ChainKey ,
5
4
ChainType ,
6
5
CoinKey ,
6
+ ExtendedChain ,
7
+ Token ,
7
8
} from '../types'
8
9
import { ValidationError } from '../utils/errors'
9
10
import ApiService from './ApiService'
@@ -14,24 +15,26 @@ const mockedApiService = ApiService as jest.Mocked<typeof ApiService>
14
15
15
16
let chainsService : ChainsService
16
17
17
- const chain1 : Chain = {
18
+ const chain1 : ExtendedChain = {
18
19
chainType : ChainType . EVM ,
19
20
key : ChainKey . ETH ,
20
21
name : 'Ethereum' ,
21
22
coin : CoinKey . ETH ,
22
23
id : 1 ,
23
24
mainnet : true ,
24
25
metamask : { } as AddEthereumChainParameter ,
26
+ nativeToken : { } as Token ,
25
27
}
26
28
27
- const chain2 : Chain = {
29
+ const chain2 : ExtendedChain = {
28
30
chainType : ChainType . EVM ,
29
31
key : ChainKey . POL ,
30
32
name : 'Polygon' ,
31
33
coin : CoinKey . MATIC ,
32
34
id : 137 ,
33
35
mainnet : true ,
34
36
metamask : { } as AddEthereumChainParameter ,
37
+ nativeToken : { } as Token ,
35
38
}
36
39
37
40
describe ( 'ChainsService' , ( ) => {
You can’t perform that action at this time.
0 commit comments