Comparing version 1.0.6 to 1.0.7-beta.1
@@ -24,6 +24,3 @@ import { AxiosRequestConfig, Method } from 'axios'; | ||
parseException(e: any): unknown; | ||
getRequestSignature(method: Method, endpoint: string, secret: string | undefined, params?: string | object): { | ||
timestamp: number; | ||
sign: string; | ||
}; | ||
private getRequestSignature; | ||
/** | ||
@@ -30,0 +27,0 @@ * @private sign request and set recv window |
@@ -141,3 +141,3 @@ "use strict"; | ||
} | ||
getRequestSignature(method, endpoint, secret, params = '') { | ||
getRequestSignature(method, endpoint, secret, params) { | ||
const timestamp = Date.now() + (this.timeOffset || 0); | ||
@@ -150,3 +150,5 @@ if (!secret) { | ||
} | ||
const paramsPayload = method == 'GET' ? params : JSON.stringify(params); | ||
const paramsPayload = method === 'GET' | ||
? params | ||
: params ? JSON.stringify(params) : ''; | ||
const signature_payload = `${timestamp}${method}/api/${endpoint}${paramsPayload}`; | ||
@@ -153,0 +155,0 @@ return { |
{ | ||
"name": "ftx-api", | ||
"version": "1.0.6", | ||
"version": "1.0.7-beta.1", | ||
"description": "Node.js connector for FTX's REST APIs and WebSockets", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
115158
1907
2