@binance/margin-trading 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5,12 +5,15 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/margin-trading.ts
8
- import { platform, arch } from "os";
9
- import { ConfigurationRestAPI as ConfigurationRestAPI9, MARGIN_TRADING_REST_API_PROD_URL } from "@binance/common";
8
+ import {
9
+ buildUserAgent,
10
+ ConfigurationRestAPI as ConfigurationRestAPI9,
11
+ MARGIN_TRADING_REST_API_PROD_URL
12
+ } from "@binance/common";
10
13
 
11
14
  // package.json
12
15
  var name = "@binance/margin-trading";
13
- var version = "5.0.0";
16
+ var version = "5.0.1";
14
17
 
15
18
  // src/rest-api/index.ts
16
19
  var rest_api_exports = {};
@@ -5563,13 +5566,16 @@ var RestAPI = class {
5563
5566
  // src/margin-trading.ts
5564
5567
  var MarginTrading = class {
5565
5568
  constructor(config) {
5569
+ const userAgent = buildUserAgent(name, version);
5566
5570
  if (config?.configurationRestAPI) {
5567
- const configRestAPI = new ConfigurationRestAPI9(config.configurationRestAPI);
5571
+ const configRestAPI = new ConfigurationRestAPI9(
5572
+ config.configurationRestAPI
5573
+ );
5568
5574
  configRestAPI.basePath = configRestAPI.basePath || MARGIN_TRADING_REST_API_PROD_URL;
5569
5575
  configRestAPI.baseOptions = configRestAPI.baseOptions || {};
5570
5576
  configRestAPI.baseOptions.headers = {
5571
5577
  ...configRestAPI.baseOptions.headers || {},
5572
- "User-Agent": `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`
5578
+ "User-Agent": userAgent
5573
5579
  };
5574
5580
  this.restAPI = new RestAPI(configRestAPI);
5575
5581
  }