From 8dac380050ddb3ccdf5bc389812fb46f581f929f Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Wed, 21 Sep 2022 15:35:56 +1000 Subject: [PATCH] chore(store-reactjs-chat): bump js-waku to 0.29.0 --- store-reactjs-chat/package.json | 2 +- store-reactjs-chat/pnpm-lock.yaml | 8 ++++---- store-reactjs-chat/src/App.js | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/store-reactjs-chat/package.json b/store-reactjs-chat/package.json index 2b40c4b..13797aa 100644 --- a/store-reactjs-chat/package.json +++ b/store-reactjs-chat/package.json @@ -7,7 +7,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.2.0", "@testing-library/user-event": "^14.1.1", - "js-waku": "0.28.1", + "js-waku": "0.29.0", "protobufjs": "^7.1.0", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/store-reactjs-chat/pnpm-lock.yaml b/store-reactjs-chat/pnpm-lock.yaml index bb4b5df..634d173 100644 --- a/store-reactjs-chat/pnpm-lock.yaml +++ b/store-reactjs-chat/pnpm-lock.yaml @@ -5,7 +5,7 @@ specifiers: '@testing-library/jest-dom': ^5.16.4 '@testing-library/react': ^13.2.0 '@testing-library/user-event': ^14.1.1 - js-waku: 0.28.1 + js-waku: 0.29.0 protobufjs: ^7.1.0 react: ^18.1.0 react-dom: ^18.1.0 @@ -17,7 +17,7 @@ dependencies: '@testing-library/jest-dom': 5.16.5 '@testing-library/react': 13.3.0_biqbaboplfbrettd7655fr4n2y '@testing-library/user-event': 14.4.2_znfriv3ismgf3ybh2woqwlpfea - js-waku: 0.28.1 + js-waku: 0.29.0 protobufjs: 7.1.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -7375,8 +7375,8 @@ packages: /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - /js-waku/0.28.1: - resolution: {integrity: sha512-0h9TpV6jywyjdes8hr9tFV/5iJh3LQN3sQFYHcXyi4cK+4htNiMrCRjBSqRBtfhs/j+4tOkrht8gRJRLHdA5RA==} + /js-waku/0.29.0: + resolution: {integrity: sha512-44GOpNbkFt/1/bDZ3tcaeemehaZaxw404QmTvHw7FUwY6dtvGsDEERLEw1TERUljDESFjvEOcJjYnLcNDY1MHg==} engines: {node: '>=16'} dependencies: '@chainsafe/libp2p-gossipsub': 4.1.1 diff --git a/store-reactjs-chat/src/App.js b/store-reactjs-chat/src/App.js index 7004e87..95a2e7b 100644 --- a/store-reactjs-chat/src/App.js +++ b/store-reactjs-chat/src/App.js @@ -8,8 +8,10 @@ import { } from "js-waku/lib/predefined_bootstrap_nodes"; import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; 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 Decoder = new DecoderV0(ContentTopic); const ProtoChatMessage = new protobuf.Type("ChatMessage") .add(new protobuf.Field("timestamp", 1, "uint64")) @@ -65,7 +67,7 @@ function App() { try { for await (const messagesPromises of waku.store.queryGenerator( - [ContentTopic], + [Decoder], { timeFilter: { startTime, endTime: new Date() }, pageDirection: "forward",