mirror of
https://github.com/status-im/js-waku.git
synced 2025-02-22 09:58:10 +00:00
Merge pull request #203 from status-im/cli-chat-use-tcp
Use tcp protocol only for cli-chat
This commit is contained in:
commit
b0e9e88081
@ -8,8 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- **Breaking**: Websocket protocol is not automatically added anymore if the user specifies a protocol in `libp2p.modules`
|
||||||
|
when using `Waku.create`.
|
||||||
- **Breaking**: Options passed to `Waku.create` used to be passed to `Libp2p.create`;
|
- **Breaking**: Options passed to `Waku.create` used to be passed to `Libp2p.create`;
|
||||||
Now, only the `libp2p` property is passed to `Libp2p.create`, allowing for a cleaner interface.
|
Now, only the `libp2p` property is passed to `Libp2p.create`, allowing for a cleaner interface.
|
||||||
|
- Examples (cli chat): Use tcp protocol instead of websocket.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Enable access to `WakuMessage.timestamp`.
|
- Enable access to `WakuMessage.timestamp`.
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
Environment,
|
Environment,
|
||||||
getStatusFleetNodes,
|
getStatusFleetNodes,
|
||||||
LightPushCodec,
|
LightPushCodec,
|
||||||
|
Protocol,
|
||||||
StoreCodec,
|
StoreCodec,
|
||||||
Waku,
|
Waku,
|
||||||
WakuMessage,
|
WakuMessage,
|
||||||
@ -202,7 +203,8 @@ export function formatMessage(chatMsg: ChatMessage): string {
|
|||||||
|
|
||||||
async function addFleetNodes(opts: Options): Promise<Options> {
|
async function addFleetNodes(opts: Options): Promise<Options> {
|
||||||
await getStatusFleetNodes(
|
await getStatusFleetNodes(
|
||||||
opts.prod ? Environment.Prod : Environment.Test
|
opts.prod ? Environment.Prod : Environment.Test,
|
||||||
|
Protocol.tcp
|
||||||
).then((nodes) =>
|
).then((nodes) =>
|
||||||
nodes.map((addr) => {
|
nodes.map((addr) => {
|
||||||
opts.staticNodes.push(multiaddr(addr));
|
opts.staticNodes.push(multiaddr(addr));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user