fix: linting
This commit is contained in:
@@ -15,7 +15,6 @@ module.exports = {
|
|||||||
indent: ['warn', 2],
|
indent: ['warn', 2],
|
||||||
'linebreak-style': ['error', 'unix'],
|
'linebreak-style': ['error', 'unix'],
|
||||||
'lines-between-class-members': ['warn', 'always'],
|
'lines-between-class-members': ['warn', 'always'],
|
||||||
quotes: ['error', 'single'],
|
|
||||||
semi: ['error', 'always'],
|
semi: ['error', 'always'],
|
||||||
'new-cap': 'off',
|
'new-cap': 'off',
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = class RequestUtil {
|
|||||||
|
|
||||||
this.baseUrl = baseUrls[livenet === true ? 'livenet' : 'testnet'];
|
this.baseUrl = baseUrls[livenet === true ? 'livenet' : 'testnet'];
|
||||||
if (options.baseUrl) {
|
if (options.baseUrl) {
|
||||||
this.baseUrl = options.baseUrl
|
this.baseUrl = options.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.globalRequestOptions = {
|
this.globalRequestOptions = {
|
||||||
@@ -35,7 +35,7 @@ module.exports = class RequestUtil {
|
|||||||
headers: {
|
headers: {
|
||||||
Referer: 'bybitapinode'
|
Referer: 'bybitapinode'
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
if (key) {
|
if (key) {
|
||||||
assert(secret, 'Secret is required for private enpoints');
|
assert(secret, 'Secret is required for private enpoints');
|
||||||
@@ -156,14 +156,9 @@ module.exports = class RequestUtil {
|
|||||||
return this._syncTimePromise;
|
return this._syncTimePromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._syncTimePromise = new Promise(async (resolve, reject) => {
|
this._syncTimePromise = this.getTimeOffset().then(offset => {
|
||||||
try {
|
this._timeOffset = offset;
|
||||||
this._timeOffset = await this.getTimeOffset();
|
|
||||||
this._syncTimePromise = null;
|
this._syncTimePromise = null;
|
||||||
resolve();
|
|
||||||
} catch (err) {
|
|
||||||
reject(err);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return this._syncTimePromise;
|
return this._syncTimePromise;
|
||||||
|
|||||||
Reference in New Issue
Block a user