Merge pull request #24 from waku-org/chore/upgrade-waku-dep

chore: upgrade @waku/*
This commit is contained in:
Danish Arora 2023-09-12 00:04:04 +08:00 committed by GitHub
commit effaf55f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 971 additions and 1860 deletions

2827
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@waku/react",
"version": "0.0.4",
"version": "0.0.5",
"description": "React hooks and components to use js-waku",
"type": "module",
"main": "dist/index.cjs.js",
@ -66,7 +66,7 @@
"@types/react": "^18.0.28",
"@types/testing-library__jest-dom": "^5.14.5",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@waku/interfaces": "^0.0.17",
"@waku/interfaces": "^0.0.18",
"bundlewatch": "^0.3.3",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
@ -87,7 +87,7 @@
"typescript": "^4.9.5"
},
"peerDependencies": {
"@waku/sdk": "^0.0.18",
"@waku/sdk": "^0.0.19",
"react": "^16.8.0 || ^17 || ^18"
},
"bundlewatch": {

View File

@ -3,7 +3,6 @@ import type {
IEncoder,
ILightPush,
IMessage,
ProtocolOptions,
SendResult,
Waku,
} from "@waku/interfaces";
@ -17,10 +16,7 @@ type UseLightPushParams = {
node: undefined | AbstractLightPushNode;
};
type PushFn = (
message: IMessage,
opts?: ProtocolOptions,
) => Promise<SendResult>;
type PushFn = (message: IMessage) => Promise<SendResult>;
type UseLightPushResult = {
push?: undefined | PushFn;
@ -38,8 +34,8 @@ export const useLightPush = (
const { node, encoder } = params;
const push = React.useCallback<PushFn>(
(message, opts = undefined) => {
return node!.lightPush.send(encoder as IEncoder, message, opts);
(message) => {
return node!.lightPush.send(encoder as IEncoder, message);
},
[node, encoder],
);