| interface Web3ProviderValue { | ||
| web3: Web3 | ||
| web3Provider: any | ||
|
Check warning on line 28 in src/@context/Web3.tsx
|
||
| web3Modal: Web3Modal | ||
| web3ProviderInfo: IProviderInfo | ||
| accountId: string | ||
| const { appConfig } = useMarketMetadata() | ||
| const [web3, setWeb3] = useState<Web3>() | ||
| const [web3Provider, setWeb3Provider] = useState<any>() | ||
|
Check warning on line 96 in src/@context/Web3.tsx
|
||
| const [web3Modal, setWeb3Modal] = useState<Web3Modal>() | ||
| const [web3ProviderInfo, setWeb3ProviderInfo] = useState<IProviderInfo>() | ||
| const [networkId, setNetworkId] = useState<number>() | ||
| // Logout helper | ||
| // ----------------------------------- | ||
| async function logout() { | ||
| if (web3 && web3.currentProvider && (web3.currentProvider as any).close) { | ||
|
Check warning on line 306 in src/@context/Web3.tsx
|
||
| await (web3.currentProvider as any).close() | ||
|
Check warning on line 307 in src/@context/Web3.tsx
|
||
| } | ||
| await web3Modal.clearCachedProvider() | ||
| } | ||
| web3Provider.removeListener('networkChanged', handleNetworkChanged) | ||
| web3Provider.removeListener('accountsChanged', handleAccountsChanged) | ||
| } | ||
| }, [web3Provider, web3]) | ||
|
Check warning on line 357 in src/@context/Web3.tsx
|
||
| return ( | ||
| <Web3Context.Provider | ||
| if (!config) return | ||
| // for ETH main, get block from graph fetch | ||
| if (config.network === 'mainnet') { | ||
| const response: any = await fetchGraph(ethGraphUrl, ethGraphQueryBody) | ||
|
Check warning on line 37 in src/@hooks/useGraphSyncStatus.ts
|
||
| return Number(response?.data?.blocks[0]?.number) | ||
| } | ||
| } | ||
| async function getBlockSubgraph(subgraphUri: string) { | ||
| const response: any = await fetchGraph( | ||
|
Check warning on line 49 in src/@hooks/useGraphSyncStatus.ts
|
||
| `${subgraphUri}/subgraphs/name/oceanprotocol/ocean-subgraph`, | ||
| graphQueryBody | ||
| ) | ||
| id: string | ||
| serviceId: number | ||
| datatokenId: OrdersDatatoken | ||
| tx: any | ||
|
Check warning on line 27 in src/@types/Compute.d.ts
|
||
| timestamp: number | ||
| } | ||
| didList: string[], | ||
| chainIds: number[], | ||
| cancelToken: CancelToken | ||
| ): Promise<any> { | ||
|
Check warning on line 155 in src/@utils/aquarius.ts
|
||
| try { | ||
| if (!(didList.length > 0)) return | ||
| generateBaseQuery, | ||
| retrieveDDOListByDIDs | ||
| } from './aquarius' | ||
| import { fetchDataForMultipleChains } from './subgraph' | ||
|
Check warning on line 26 in src/@utils/compute.ts
|
||
| const getComputeOrders = gql` | ||
| query ComputeOrders($user: String!) { | ||