File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,17 @@ export class BitGoAPI implements BitGoBase {
258258 }
259259 } ) ;
260260
261+ if ( params . evm ) {
262+ const evmConfig = common . Environments [ env ] [ 'evm' ] || { } ;
263+ Object . keys ( params . evm ) . forEach ( ( key ) => {
264+ if ( params . evm ?. [ key ] && params . evm [ key ] [ 'apiToken' ] ) {
265+ evmConfig [ key ] = evmConfig [ key ] || { } ;
266+ evmConfig [ key ] [ 'apiToken' ] = params . evm [ key ] [ 'apiToken' ] ;
267+ }
268+ } ) ;
269+ common . Environments [ env ] [ 'evm' ] = evmConfig ;
270+ }
271+
261272 common . setNetwork ( common . Environments [ env ] . network ) ;
262273
263274 this . _baseApiUrl = this . _baseUrl + '/api/v1' ;
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ export interface BitGoAPIOptions {
4646 validate ?: boolean ;
4747 cookiesPropagationEnabled ?: boolean ;
4848 getAdditionalHeadersCb ?: AdditionalHeadersCallback ;
49+ evm ?: {
50+ [ key : string ] : {
51+ baseUrl : string ;
52+ apiToken ?: string ;
53+ } ;
54+ } ;
4955}
5056
5157export interface AccessTokenOptions {
You can’t perform that action at this time.
0 commit comments