File tree Expand file tree Collapse file tree 4 files changed +27
-5
lines changed Expand file tree Collapse file tree 4 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,27 @@ function getLiNearSDKConfig(): LiNearSDKConfig {
23
23
}
24
24
25
25
/**
26
- * custom configauation for LiNear SDK
26
+ * custom configuration for LiNear SDK
27
27
* @param config custom config
28
28
*/
29
29
function setLiNearSDKConfig ( config : LiNearSDKConfig ) {
30
30
SDK_CUSTOM_CONFIG = config ;
31
31
}
32
32
33
- export { changeSDKEnvironment , getLiNearSDKConfig , setLiNearSDKConfig } ;
33
+ /**
34
+ * change subgraph API URL
35
+ */
36
+ function changeSubgraphApiUrl ( apiUrl : string ) {
37
+ const config = getLiNearSDKConfig ( ) ;
38
+ setLiNearSDKConfig ( {
39
+ ...config ,
40
+ apiUrl,
41
+ } ) ;
42
+ }
43
+
44
+ export {
45
+ changeSDKEnvironment ,
46
+ getLiNearSDKConfig ,
47
+ setLiNearSDKConfig ,
48
+ changeSubgraphApiUrl ,
49
+ } ;
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ const connectConfig: ConnectConfig = {
11
11
headers : { } ,
12
12
} ;
13
13
14
- const apiUrl = 'https://api.thegraph.com/subgraphs/name/linear-protocol/linear' ;
14
+ const apiUrl =
15
+ 'https://api.studio.thegraph.com/query/76854/linear/version/latest' ;
15
16
16
17
const contractId = 'linear-protocol.near' ;
17
18
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const connectConfig: ConnectConfig = {
12
12
} ;
13
13
14
14
const apiUrl =
15
- 'https://api.thegraph.com/subgraphs/name /linear-protocol/linear- testnet' ;
15
+ 'https://api.studio. thegraph.com/query/76854 /linear-testnet/version/latest ' ;
16
16
17
17
const contractId = 'linear-protocol.testnet' ;
18
18
Original file line number Diff line number Diff line change 1
1
// env
2
- export { changeSDKEnvironment , setLiNearSDKConfig } from './config' ;
2
+ export {
3
+ changeSDKEnvironment ,
4
+ setLiNearSDKConfig ,
5
+ getLiNearSDKConfig ,
6
+ changeSubgraphApiUrl ,
7
+ } from './config' ;
3
8
4
9
export { SDK_ENV , LiNearSDKConfig } from './config/type' ;
5
10
You can’t perform that action at this time.
0 commit comments