File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/keeper-bots/src/converter-bot/queries Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,17 @@ const getVTokensFromUnderlying = async (
11
11
isolatedVTokens : IsolatedVTokensFromUnderlyingQuery [ "markets" ] ;
12
12
} > => {
13
13
const isolatedPoolSubgraphClient = new SubgraphClient ( getConfig ( ) . isolatedPoolsSubgraphUrl ) ;
14
- const corePoolSubgraphClient = new SubgraphClient ( getConfig ( ) . corePoolSubgraphUrl ) ;
15
14
const { data : { markets : isolatedVTokens = [ ] } = { isolatedVTokens : [ ] } } =
16
15
await isolatedPoolSubgraphClient . getIsolatedVTokensFromUnderlying ( underlyingAddress ) ;
17
- const { data : { markets : coreVTokens = [ ] } = { coreVTokens : [ ] } } =
18
- await corePoolSubgraphClient . getCoreVTokensFromUnderlying ( underlyingAddress ) ;
16
+ const corePoolSubgraphUrl = getConfig ( ) . corePoolSubgraphUrl ;
17
+ let coreVTokens : CoreVTokensFromUnderlyingQuery [ "markets" ] = [ ] ;
18
+ if ( corePoolSubgraphUrl ) {
19
+ const corePoolSubgraphClient = new SubgraphClient ( getConfig ( ) . corePoolSubgraphUrl ) ;
20
+ const { data : { markets } = { markets : [ ] } } = await corePoolSubgraphClient . getCoreVTokensFromUnderlying (
21
+ underlyingAddress ,
22
+ ) ;
23
+ coreVTokens = markets ;
24
+ }
19
25
20
26
return { coreVTokens, isolatedVTokens } ;
21
27
} ;
You can’t perform that action at this time.
0 commit comments