File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
governance/xc_admin/packages/xc_admin_frontend/hooks Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { ClusterContext } from '../contexts/ClusterContext'
1010import { deriveWsUrl , pythClusterApiUrls } from '../utils/pythClusterApiUrl'
1111import {
1212 ProgramType ,
13- getConfigFromRawAccounts ,
13+ getConfig ,
1414 RawConfig ,
1515 MappingRawConfig ,
1616 ProductRawConfig ,
@@ -57,10 +57,11 @@ export const usePyth = (): PythHookData => {
5757 if ( cancelled ) return
5858
5959 // Use the functional approach to parse the accounts
60- const parsedConfig = getConfigFromRawAccounts [ ProgramType . PYTH_CORE ] (
61- allPythAccounts ,
62- cluster as PythCluster
63- )
60+ const parsedConfig = getConfig [ ProgramType . PYTH_CORE ] ( {
61+ programType : ProgramType . PYTH_CORE ,
62+ accounts : allPythAccounts ,
63+ cluster : cluster as PythCluster ,
64+ } )
6465
6566 // Verify all accounts were processed
6667 const remainingAccounts = allPythAccounts . filter ( ( account ) => {
@@ -74,7 +75,7 @@ export const usePyth = (): PythHookData => {
7475 )
7576 }
7677
77- setRawConfig ( parsedConfig )
78+ setRawConfig ( parsedConfig as RawConfig )
7879 setIsLoading ( false )
7980 } catch ( e ) {
8081 if ( cancelled ) return
You can’t perform that action at this time.
0 commit comments