chore: upgrade @waku
This commit is contained in:
parent
b736e79501
commit
168761b85b
File diff suppressed because it is too large
Load Diff
|
@ -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": {
|
||||
|
|
|
@ -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],
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue