@binance/wallet 6.0.0 → 6.0.2
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.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -5,12 +5,11 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/wallet.ts
|
|
8
|
-
import {
|
|
9
|
-
import { ConfigurationRestAPI as ConfigurationRestAPI7, WALLET_REST_API_PROD_URL } from "@binance/common";
|
|
8
|
+
import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI7, WALLET_REST_API_PROD_URL } from "@binance/common";
|
|
10
9
|
|
|
11
10
|
// package.json
|
|
12
11
|
var name = "@binance/wallet";
|
|
13
|
-
var version = "6.0.
|
|
12
|
+
var version = "6.0.2";
|
|
14
13
|
|
|
15
14
|
// src/rest-api/index.ts
|
|
16
15
|
var rest_api_exports = {};
|
|
@@ -3932,13 +3931,16 @@ var RestAPI = class {
|
|
|
3932
3931
|
// src/wallet.ts
|
|
3933
3932
|
var Wallet = class {
|
|
3934
3933
|
constructor(config) {
|
|
3934
|
+
const userAgent = buildUserAgent(name, version);
|
|
3935
3935
|
if (config?.configurationRestAPI) {
|
|
3936
|
-
const configRestAPI = new ConfigurationRestAPI7(
|
|
3936
|
+
const configRestAPI = new ConfigurationRestAPI7(
|
|
3937
|
+
config.configurationRestAPI
|
|
3938
|
+
);
|
|
3937
3939
|
configRestAPI.basePath = configRestAPI.basePath || WALLET_REST_API_PROD_URL;
|
|
3938
3940
|
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
3939
3941
|
configRestAPI.baseOptions.headers = {
|
|
3940
3942
|
...configRestAPI.baseOptions.headers || {},
|
|
3941
|
-
"User-Agent":
|
|
3943
|
+
"User-Agent": userAgent
|
|
3942
3944
|
};
|
|
3943
3945
|
this.restAPI = new RestAPI(configRestAPI);
|
|
3944
3946
|
}
|