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

Commit

Permalink
fix: user gives payload and it does not match name
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjam-deriv committed Dec 7, 2023
1 parent 17f58a8 commit 4bf6839
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useWs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const useWS = <T extends TSocketEndpointNames>(name?: T) => {
let payload = data;

if (name) {
payload = { [name]: 1, ...payload };
if (payload === undefined) payload = { [name]: 1, ...payload };
} else {
payload = { ...payload };
}
Expand Down
7 changes: 7 additions & 0 deletions src/utils/playground_requests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ export const playground_requests = [
trader_id: 'CR1234',
},
},
{
name: 'crypto_config',
title: 'Cryptocurrency configuration',
body: {
crypto_config: 1,
},
},
{
name: 'document_upload',
title: 'Document Upload',
Expand Down

0 comments on commit 4bf6839

Please sign in to comment.