File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/rainbowkit/src/core/network Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { createHttpClient } from './internal/createHttpClient' ;
2
2
3
- export const ENHANCED_PROVIDER_ENABLED = Boolean (
4
- typeof process !== 'undefined' &&
3
+ const RAINBOW_PROVIDER_API_KEY =
4
+ ( typeof process !== 'undefined' &&
5
5
typeof process . env !== 'undefined' &&
6
- process . env . RAINBOW_PROVIDER_API_KEY ,
7
- ) ;
6
+ process . env . RAINBOW_PROVIDER_API_KEY ) ||
7
+ '__rainbowProviderApiKey' ;
8
8
9
9
export const enhancedProviderHttp = createHttpClient ( {
10
10
baseUrl : 'https://enhanced-provider.rainbow.me' ,
11
11
headers : {
12
- 'x-api-key' :
13
- ( typeof process !== 'undefined' &&
14
- typeof process . env !== 'undefined' &&
15
- process . env . RAINBOW_PROVIDER_API_KEY ) ||
16
- '__rainbowProviderApiKey' ,
12
+ 'x-api-key' : RAINBOW_PROVIDER_API_KEY ,
17
13
} ,
18
14
} ) ;
15
+
16
+ export const ENHANCED_PROVIDER_ENABLED = Boolean (
17
+ RAINBOW_PROVIDER_API_KEY && ! RAINBOW_PROVIDER_API_KEY . startsWith ( '__' ) ,
18
+ ) ;
You can’t perform that action at this time.
0 commit comments