Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 4bf6839

Browse files
committed
fix: user gives payload and it does not match name
1 parent 17f58a8 commit 4bf6839

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/hooks/useWs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const useWS = <T extends TSocketEndpointNames>(name?: T) => {
2323
let payload = data;
2424

2525
if (name) {
26-
payload = { [name]: 1, ...payload };
26+
if (payload === undefined) payload = { [name]: 1, ...payload };
2727
} else {
2828
payload = { ...payload };
2929
}

src/utils/playground_requests.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ export const playground_requests = [
214214
trader_id: 'CR1234',
215215
},
216216
},
217+
{
218+
name: 'crypto_config',
219+
title: 'Cryptocurrency configuration',
220+
body: {
221+
crypto_config: 1,
222+
},
223+
},
217224
{
218225
name: 'document_upload',
219226
title: 'Document Upload',

0 commit comments

Comments
 (0)