File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ const fetch = require('node-fetch');
3
3
4
4
const apy = async ( ) => {
5
5
const endpoint = 'https://v2.api.liqwid.finance/graphql' ;
6
- const registryEndpoint = 'https://public.liqwid.finance/registry.json' ;
7
6
8
7
const query = gql `
9
8
query {
@@ -23,6 +22,9 @@ const apy = async () => {
23
22
asset {
24
23
price
25
24
}
25
+ registry {
26
+ actionScriptHash
27
+ }
26
28
}
27
29
}
28
30
}
@@ -32,16 +34,6 @@ const apy = async () => {
32
34
33
35
const data = await request ( endpoint , query ) ;
34
36
35
- //NOTE: Action validator will be added to the API in the near future
36
- const registryData = await fetch ( registryEndpoint )
37
- . then ( ( res ) => res . json ( ) )
38
- . then ( ( data ) =>
39
- data . scriptInfos . filter (
40
- ( script ) =>
41
- script . type === 'Validator' && script . tag === 'liqwidMainnet'
42
- )
43
- ) ;
44
-
45
37
// These are the markets that are either disabled or not borrowable, so no yield can be generated
46
38
const disableMarkets = [ 'AGIX' , 'WMT' , 'POL' , 'LQ' ] ;
47
39
@@ -51,9 +43,7 @@ const apy = async () => {
51
43
52
44
const getPool = ( market ) => {
53
45
return {
54
- pool : registryData . find (
55
- ( script ) => script . name === `Liqwid${ market . id } Action`
56
- ) ?. scriptHash ,
46
+ pool : market . registry . actionScriptHash ,
57
47
chain : 'Cardano' ,
58
48
project : 'liqwid' ,
59
49
symbol : market . id ,
You can’t perform that action at this time.
0 commit comments