chore(store-reactjs-chat): bump js-waku to 0.29.0

This commit is contained in:
fryorcraken.eth 2022-09-21 15:35:56 +10:00
parent 6d2a3017b0
commit 8dac380050
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 8 additions and 6 deletions

View File

@ -7,7 +7,7 @@
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0", "@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^14.1.1", "@testing-library/user-event": "^14.1.1",
"js-waku": "0.28.1", "js-waku": "0.29.0",
"protobufjs": "^7.1.0", "protobufjs": "^7.1.0",
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "^18.1.0", "react-dom": "^18.1.0",

View File

@ -5,7 +5,7 @@ specifiers:
'@testing-library/jest-dom': ^5.16.4 '@testing-library/jest-dom': ^5.16.4
'@testing-library/react': ^13.2.0 '@testing-library/react': ^13.2.0
'@testing-library/user-event': ^14.1.1 '@testing-library/user-event': ^14.1.1
js-waku: 0.28.1 js-waku: 0.29.0
protobufjs: ^7.1.0 protobufjs: ^7.1.0
react: ^18.1.0 react: ^18.1.0
react-dom: ^18.1.0 react-dom: ^18.1.0
@ -17,7 +17,7 @@ dependencies:
'@testing-library/jest-dom': 5.16.5 '@testing-library/jest-dom': 5.16.5
'@testing-library/react': 13.3.0_biqbaboplfbrettd7655fr4n2y '@testing-library/react': 13.3.0_biqbaboplfbrettd7655fr4n2y
'@testing-library/user-event': 14.4.2_znfriv3ismgf3ybh2woqwlpfea '@testing-library/user-event': 14.4.2_znfriv3ismgf3ybh2woqwlpfea
js-waku: 0.28.1 js-waku: 0.29.0
protobufjs: 7.1.0 protobufjs: 7.1.0
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0_react@18.2.0 react-dom: 18.2.0_react@18.2.0
@ -7375,8 +7375,8 @@ packages:
/js-tokens/4.0.0: /js-tokens/4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
/js-waku/0.28.1: /js-waku/0.29.0:
resolution: {integrity: sha512-0h9TpV6jywyjdes8hr9tFV/5iJh3LQN3sQFYHcXyi4cK+4htNiMrCRjBSqRBtfhs/j+4tOkrht8gRJRLHdA5RA==} resolution: {integrity: sha512-44GOpNbkFt/1/bDZ3tcaeemehaZaxw404QmTvHw7FUwY6dtvGsDEERLEw1TERUljDESFjvEOcJjYnLcNDY1MHg==}
engines: {node: '>=16'} engines: {node: '>=16'}
dependencies: dependencies:
'@chainsafe/libp2p-gossipsub': 4.1.1 '@chainsafe/libp2p-gossipsub': 4.1.1

View File

@ -8,8 +8,10 @@ import {
} from "js-waku/lib/predefined_bootstrap_nodes"; } from "js-waku/lib/predefined_bootstrap_nodes";
import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list";
import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer"; import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer";
import { DecoderV0 } from "js-waku/lib/waku_message/version_0";
const ContentTopic = "/toy-chat/2/huilong/proto"; const ContentTopic = "/toy-chat/2/huilong/proto";
const Decoder = new DecoderV0(ContentTopic);
const ProtoChatMessage = new protobuf.Type("ChatMessage") const ProtoChatMessage = new protobuf.Type("ChatMessage")
.add(new protobuf.Field("timestamp", 1, "uint64")) .add(new protobuf.Field("timestamp", 1, "uint64"))
@ -65,7 +67,7 @@ function App() {
try { try {
for await (const messagesPromises of waku.store.queryGenerator( for await (const messagesPromises of waku.store.queryGenerator(
[ContentTopic], [Decoder],
{ {
timeFilter: { startTime, endTime: new Date() }, timeFilter: { startTime, endTime: new Date() },
pageDirection: "forward", pageDirection: "forward",