Skip to content

Commit b0e9e88

Browse files
authored
Merge pull request #203 from status-im/cli-chat-use-tcp
Use tcp protocol only for cli-chat
2 parents 0136720 + 2350ce5 commit b0e9e88

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Changed
11+
- **Breaking**: Websocket protocol is not automatically added anymore if the user specifies a protocol in `libp2p.modules`
12+
when using `Waku.create`.
1113
- **Breaking**: Options passed to `Waku.create` used to be passed to `Libp2p.create`;
12-
Now, only the `libp2p` property is passed to `Libp2p.create`, allowing for a cleaner interface.
14+
Now, only the `libp2p` property is passed to `Libp2p.create`, allowing for a cleaner interface.
15+
- Examples (cli chat): Use tcp protocol instead of websocket.
1316

1417
### Added
1518
- Enable access to `WakuMessage.timestamp`.

examples/cli-chat/src/chat.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Environment,
88
getStatusFleetNodes,
99
LightPushCodec,
10+
Protocol,
1011
StoreCodec,
1112
Waku,
1213
WakuMessage,
@@ -202,7 +203,8 @@ export function formatMessage(chatMsg: ChatMessage): string {
202203

203204
async function addFleetNodes(opts: Options): Promise<Options> {
204205
await getStatusFleetNodes(
205-
opts.prod ? Environment.Prod : Environment.Test
206+
opts.prod ? Environment.Prod : Environment.Test,
207+
Protocol.tcp
206208
).then((nodes) =>
207209
nodes.map((addr) => {
208210
opts.staticNodes.push(multiaddr(addr));

0 commit comments

Comments
 (0)