chore: fix type import

This commit is contained in:
Danish Arora 2024-10-25 13:50:57 +05:30
parent 46caf3e117
commit fc20680610
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E

View File

@ -1,5 +1,5 @@
import { peerIdFromString } from "@libp2p/peer-id"; import { peerIdFromString } from "@libp2p/peer-id";
import type { Waku } from "@waku/interfaces"; import type { IWaku } from "@waku/interfaces";
export const generateRandomNumber = (): number => { export const generateRandomNumber = (): number => {
return Math.floor(Math.random() * 1000000); return Math.floor(Math.random() * 1000000);
@ -17,7 +17,7 @@ export const sha256 = async (number: number | string): Promise<string> => {
const DEFAULT_EXTRA_DATA = { sdk: "0.0.28" }; const DEFAULT_EXTRA_DATA = { sdk: "0.0.28" };
export const DEFAULT_EXTRA_DATA_STR = JSON.stringify(DEFAULT_EXTRA_DATA); export const DEFAULT_EXTRA_DATA_STR = JSON.stringify(DEFAULT_EXTRA_DATA);
export const buildExtraData = async (node: Waku, peerId: string): Promise<string> => { export const buildExtraData = async (node: IWaku, peerId: string): Promise<string> => {
const peer = await node.libp2p.peerStore.get(peerIdFromString(peerId)); const peer = await node.libp2p.peerStore.get(peerIdFromString(peerId));
const hasWebsockes = peer const hasWebsockes = peer
.addresses .addresses