Skip to content

Commit

Permalink
fix for signing msg with empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
wyaeld committed Apr 21, 2018
1 parent 7d0c839 commit 1a45b7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion v2/rest/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ func (c *Client) NewAuthenticatedRequestWithData(refURL string, data map[string]
if err != nil {
return Request{}, err
}
msg := "/api/v2/" + authURL + nonce + string(b)
msg := "/api/v2/" + authURL + nonce
if data != nil {
msg += string(b)
} else {
msg += "{}"
}
req.Headers["Content-Type"] = "application/json"
req.Headers["Accept"] = "application/json"
req.Headers["bfx-nonce"] = nonce
Expand Down

0 comments on commit 1a45b7f

Please sign in to comment.