mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
websocket/exchanges: populate context before multi connection upgrade (#1933)
* websocket/exchanges: populate context before multi connection upgrade * fix test * linter: fix * gk: dial * gk: nits rm param names --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -542,7 +542,7 @@ func (a *Alphapoint) GetOrderFee(ctx context.Context, symbol, side string, quant
|
||||
}
|
||||
|
||||
// SendHTTPRequest sends an unauthenticated HTTP request
|
||||
func (a *Alphapoint) SendHTTPRequest(_ context.Context, ep exchange.URL, method, path string, data map[string]any, result any) error {
|
||||
func (a *Alphapoint) SendHTTPRequest(ctx context.Context, ep exchange.URL, method, path string, data map[string]any, result any) error {
|
||||
endpoint, err := a.API.Endpoints.GetURL(ep)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -566,7 +566,7 @@ func (a *Alphapoint) SendHTTPRequest(_ context.Context, ep exchange.URL, method,
|
||||
HTTPRecording: a.HTTPRecording,
|
||||
}
|
||||
|
||||
return a.SendPayload(context.Background(), request.Unset, func() (*request.Item, error) {
|
||||
return a.SendPayload(ctx, request.Unset, func() (*request.Item, error) {
|
||||
item.Body = bytes.NewBuffer(PayloadJSON)
|
||||
return item, nil
|
||||
}, request.UnauthenticatedRequest)
|
||||
@@ -617,7 +617,7 @@ func (a *Alphapoint) SendAuthenticatedHTTPRequest(ctx context.Context, ep exchan
|
||||
HTTPRecording: a.HTTPRecording,
|
||||
}
|
||||
|
||||
return a.SendPayload(context.Background(), request.Unset, func() (*request.Item, error) {
|
||||
return a.SendPayload(ctx, request.Unset, func() (*request.Item, error) {
|
||||
item.Body = bytes.NewBuffer(PayloadJSON)
|
||||
return item, nil
|
||||
}, request.AuthenticatedRequest)
|
||||
|
||||
Reference in New Issue
Block a user