This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class ApiManager {
4848 public augmentedSubscribe < T extends TSocketSubscribableEndpointNames > (
4949 request ?: TSocketRequestProps < T > extends never ? undefined : TSocketRequestProps < T > ,
5050 ) : Observable < TSocketResponse < T > > {
51- return this . derivApi . subscribe ( { subscribe : 1 , request } ) as Observable < TSocketResponse < T > > ;
51+ return this . derivApi . subscribe ( request ) as Observable < TSocketResponse < T > > ;
5252 }
5353
5454 public authorize ( token : string ) {
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ const useSubscription = <T extends TSocketSubscribableEndpointNames>(name: T) =>
3939 ( data : Parameters < typeof apiManager . augmentedSubscribe < T > > [ ] ) => {
4040 let payload : any = data ;
4141 if ( name ) {
42- console . log ( ' name' , name ) ;
43-
44- payload = { [ name ] : 1 , ...payload } ;
42+ payload = { [ name ] : 1 , subscribe : 1 , ... payload } ;
43+ } else {
44+ payload = { subscribe : 1 , ...payload } ;
4545 }
4646 setIsLoading ( true ) ;
4747 setSubscribed ( true ) ;
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ const useWS = <T extends TSocketEndpointNames>(name?: T) => {
2121 const send = useCallback (
2222 async ( data ?: Parameters < typeof apiManager . augmentedSend < T > > [ ] ) => {
2323 let payload : any = data ;
24- console . log ( ) ;
24+ console . log ( payload ) ;
2525
2626 if ( name ) {
27- payload = { ... payload , name : { [ name ] : 1 } } ;
27+ payload = { [ name ] : 1 , ... payload } ;
2828 } else {
2929 payload = { ...payload } ;
3030 }
You can’t perform that action at this time.
0 commit comments