bump to @waku/core 0.0.10
This commit is contained in:
parent
362e307594
commit
22ec6ae33b
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@
|
|||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@waku/byte-utils": "^0.0.2",
|
||||
"@waku/core": "^0.0.6",
|
||||
"@waku/core": "^0.0.10",
|
||||
"@waku/create": "^0.0.4",
|
||||
"protobufjs": "^7.1.2",
|
||||
"react": "^18.2.0",
|
||||
|
@ -17,7 +17,7 @@
|
|||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "PORT=3002 react-scripts start",
|
||||
"start": "GENERATE_SOURCEMAP=false PORT=3002 react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "exit 0",
|
||||
"eject": "react-scripts eject"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import * as React from "react";
|
||||
import protobuf from "protobufjs";
|
||||
import { createLightNode } from "@waku/create";
|
||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
||||
import { DecoderV0 } from "@waku/core/lib/waku_message/version_0";
|
||||
import { waitForRemotePeer } from "@waku/core";
|
||||
import { Decoder } from "@waku/core/lib/message/version_0";
|
||||
import { bytesToUtf8 } from "@waku/byte-utils";
|
||||
|
||||
const ContentTopic = "/toy-chat/2/huilong/proto";
|
||||
const Decoder = new DecoderV0(ContentTopic);
|
||||
const decoder = new Decoder(ContentTopic);
|
||||
|
||||
const ProtoChatMessage = new protobuf.Type("ChatMessage")
|
||||
.add(new protobuf.Field("timestamp", 1, "uint64"))
|
||||
|
@ -56,7 +56,7 @@ function App() {
|
|||
|
||||
try {
|
||||
for await (const messagesPromises of waku.store.queryGenerator(
|
||||
[Decoder],
|
||||
[decoder],
|
||||
{
|
||||
timeFilter: { startTime, endTime: new Date() },
|
||||
pageDirection: "forward",
|
||||
|
|
Loading…
Reference in New Issue