@pioneer-platform/changelly-client 8.3.6 → 8.3.7

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/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@ declare const TAG = " | Changelly | ";
3
3
  declare const CHANGELLY_API_KEY: string | undefined;
4
4
  declare const CHANGELLY_API_SECRET: string | undefined;
5
5
  declare let changelly: any;
6
- declare let ChainToNetworkId: any;
6
+ declare let ChainToNetworkId: any, caipToNetworkId: any, shortListSymbolToCaip: any;
7
7
  declare let networkSupport: any[];
8
8
  declare function get_currencies(): Promise<any>;
9
9
  declare function create_transaction(from: string, to: string, address: string, amount: number, extraId?: string): Promise<any>;
package/lib/index.js CHANGED
@@ -44,7 +44,7 @@ if (!CHANGELLY_API_KEY)
44
44
  if (!CHANGELLY_API_SECRET)
45
45
  throw new Error('CHANGELLY_API_SECRET not set');
46
46
  var changelly;
47
- var ChainToNetworkId = require("@pioneer-platform/pioneer-caip").ChainToNetworkId;
47
+ var _a = require("@pioneer-platform/pioneer-caip"), ChainToNetworkId = _a.ChainToNetworkId, caipToNetworkId = _a.caipToNetworkId, shortListSymbolToCaip = _a.shortListSymbolToCaip;
48
48
  var networkSupport = [
49
49
  ChainToNetworkId["XRP"],
50
50
  ChainToNetworkId["DASH"],
@@ -151,6 +151,7 @@ function create_transaction(from, to, address, amount, extraId) {
151
151
  output.id = data.id;
152
152
  tx = {
153
153
  type: "transfer",
154
+ chain: caipToNetworkId(shortListSymbolToCaip[from]),
154
155
  txParams: {
155
156
  address: data.payinAddress,
156
157
  amount: amount,
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@pioneer-platform/changelly-client",
3
- "version": "8.3.6",
3
+ "version": "8.3.7",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {
7
7
  "@bithighlander/changelly": "^1.0.0",
8
8
  "@pioneer-platform/loggerdog": "^8.3.1",
9
+ "@pioneer-platform/pioneer-caip": "^9.2.13",
9
10
  "axios": "^1.3.4",
10
11
  "dotenv": "^8.2.0",
11
12
  "jayson": "^4.1.0",