update dependencies (#112)

* update dependencies

* f
This commit is contained in:
Felicio Mununga 2024-03-26 15:42:44 +09:00 committed by GitHub
parent b3c2c6a768
commit 0b25379bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 7 deletions

View File

@ -22,7 +22,7 @@
},
"dependencies": {
"@libp2p/bootstrap": "^9.0.10",
"@status-im/js": "0.5.1",
"@status-im/js": "0.6.1",
"@usedapp/core": "^1.2.8",
"@waku/core": "^0.0.27",
"@waku/sdk": "^0.0.22",

View File

@ -4,9 +4,10 @@ import { useEffect } from 'react'
import { useContractCalls } from '@usedapp/core'
import { useContracts } from './useContracts'
import { useWaku } from '../providers/waku/provider'
import { deserializePublicKey, RequestClient } from '@status-im/js'
import { deserializePublicKey } from '@status-im/js'
import { BigNumber } from 'ethers'
import { useFeaturedVotes } from './useFeaturedVotes'
import { getRequestClient } from '../lib/request-client'
export function useCommunities(publicKeys: string[]): CommunityDetail[] {
const { communitiesDetails, dispatch } = useCommunitiesProvider()
@ -39,7 +40,7 @@ export function useCommunities(publicKeys: string[]): CommunityDetail[] {
return
}
const requestClient = new RequestClient(waku)
const requestClient = getRequestClient(waku)
const community = await requestClient.fetchCommunityDescription(deserializedPublicKey)
if (!community) {

View File

@ -0,0 +1,14 @@
import { RequestClient } from '@status-im/js'
import { LightNode } from '@waku/interfaces'
let client: RequestClient
export function getRequestClient(waku: LightNode): RequestClient {
if (!client) {
client = new RequestClient(waku, { environment: process.env.ENV, ethProviderApiKey: process.env.INFURA_API_KEY! })
return client
}
return client
}

View File

@ -2570,10 +2570,10 @@
dependencies:
antlr4ts "^0.5.0-alpha.4"
"@status-im/js@0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@status-im/js/-/js-0.5.1.tgz#cca1c2637a21ec23094cde965f864e8204818af1"
integrity sha512-a8/EsuMY+aTExSuVN7DGZXaSQaUeY20z44iJC4oR20l1GRlBXTt1H6BDVPULZSi4agmPuoVwcAKbIorzTg3iIw==
"@status-im/js@0.6.1":
version "0.6.1"
resolved "https://registry.yarnpkg.com/@status-im/js/-/js-0.6.1.tgz#0e6ad504b79d661e1b5f93b3f7b68d9487ad8bad"
integrity sha512-VTWu/vv8Rp3N/j7Q66EAnxMz1dg3e1XFu/9DaFbM/5t+rT818Fu/0etqu46UlPv0XAyvodxPrM0RxvPfSUb0Vw==
dependencies:
"@bufbuild/protobuf" "1.4.2"
"@libp2p/bootstrap" "^9.0.10"