@@ -3,7 +3,14 @@ import { chains, envs } from '../config/index.js';
3
3
import type { networkCodes } from '../constants/index.js' ;
4
4
import Unit from '../Unit/index.js' ;
5
5
import { ReferralSystem } from '../services/ReferralSystem/index.js' ;
6
- import type { SupportedChainId , DeepPartial , VerboseUnitConfig , KnownEnv , EnvConfig , AggregatedAssets } from '../types.js' ;
6
+ import type {
7
+ SupportedChainId ,
8
+ DeepPartial ,
9
+ VerboseUnitConfig ,
10
+ KnownEnv ,
11
+ EnvConfig ,
12
+ AggregatedAssets
13
+ } from '../types.js' ;
7
14
import { isValidChainId } from '../utils/index.js' ;
8
15
import { simpleFetch } from 'simple-typed-fetch' ;
9
16
import Bridge from './bridge/index.js' ;
@@ -60,6 +67,9 @@ export default class Orion {
60
67
} ,
61
68
indexer : {
62
69
api : networkConfig . api + networkConfig . services . indexer ?. http ,
70
+ } ,
71
+ frontage : {
72
+ api : networkConfig . api + networkConfig . services . frontage . http ,
63
73
}
64
74
} ,
65
75
} ;
@@ -118,7 +128,7 @@ export default class Orion {
118
128
if ( ! unit ) {
119
129
throw new Error (
120
130
`Invalid network code: ${ networkCodeOrChainId } . ` +
121
- `Available network codes: ${ this . unitsArray . map ( ( u ) => u . networkCode ) . join ( ', ' ) } ` ) ;
131
+ `Available network codes: ${ this . unitsArray . map ( ( u ) => u . networkCode ) . join ( ', ' ) } ` ) ;
122
132
}
123
133
return unit ;
124
134
}
@@ -156,7 +166,7 @@ export default class Orion {
156
166
const networks = chainIds . map ( ( chainId ) => chains [ chainId ] ?. label ) . join ( ', ' ) ;
157
167
console . error (
158
168
`Asset found in Aggregator, but not in BlockchainService (base): ${ baseAsset } (${ pair } ).` +
159
- ` Networks: ${ networks } `
169
+ ` Networks: ${ networks } `
160
170
) ;
161
171
} else {
162
172
tradableAggregatedAssets [ baseAsset ] = aggregatedBaseAsset ;
@@ -166,7 +176,7 @@ export default class Orion {
166
176
const networks = chainIds . map ( ( chainId ) => chains [ chainId ] ?. label ) . join ( ', ' ) ;
167
177
console . error (
168
178
`Asset found in Aggregator, but not in BlockchainService (quote): ${ quoteAsset } (${ pair } ).` +
169
- ` Networks: ${ networks } `
179
+ ` Networks: ${ networks } `
170
180
) ;
171
181
} else {
172
182
tradableAggregatedAssets [ quoteAsset ] = aggregatedQuoteAsset ;
@@ -178,11 +188,11 @@ export default class Orion {
178
188
179
189
async getPairs ( ...params : Parameters < Unit [ 'aggregator' ] [ 'getPairsList' ] > ) {
180
190
const result : Partial <
181
- Record <
182
- string ,
183
- SupportedChainId [ ]
184
- >
185
- > = { } ;
191
+ Record <
192
+ string ,
193
+ SupportedChainId [ ]
194
+ >
195
+ > = { } ;
186
196
187
197
await Promise . all ( this . unitsArray . map ( async ( unit ) => {
188
198
const pairs = await simpleFetch ( unit . aggregator . getPairsList ) ( ...params ) ;
0 commit comments