@pioneer-platform/chainflip-client 0.0.7 → 0.0.9

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.
Files changed (2) hide show
  1. package/lib/index.js +10 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -27,6 +27,10 @@ let networkSupport = [
27
27
  ChainToNetworkId["BTC"],
28
28
  ChainToNetworkId["ETH"],
29
29
  ];
30
+ let assetSupport = [
31
+ shortListSymbolToCaip["BTC"],
32
+ shortListSymbolToCaip["ETH"],
33
+ ];
30
34
  module.exports = {
31
35
  init: function (settings) {
32
36
  return true;
@@ -34,6 +38,9 @@ module.exports = {
34
38
  networkSupport: function () {
35
39
  return networkSupport;
36
40
  },
41
+ assetSupport: function () {
42
+ return assetSupport;
43
+ },
37
44
  getQuote: function (quote) {
38
45
  return get_quote(quote);
39
46
  },
@@ -138,12 +145,13 @@ const get_quote = function (quote) {
138
145
  "destChain": longNameBuy,
139
146
  "srcAsset": chainSell,
140
147
  "destAsset": chainBuy,
141
- "amount": responseQuote.data.egressAmount,
148
+ "amount": amountToQuote.toString(),
142
149
  "quote": responseQuote.data,
143
150
  "destAddress": quote.recipientAddress,
144
151
  }
145
152
  }
146
153
  };
154
+ log.info("data good: ", data);
147
155
  const headers = {
148
156
  'Accept': '*/*',
149
157
  'Accept-Encoding': 'gzip, deflate, br, zstd',
@@ -183,6 +191,7 @@ const get_quote = function (quote) {
183
191
  }
184
192
  catch (e) {
185
193
  console.error(tag, "e: ", e);
194
+ console.error(tag, "e: ", JSON.stringify(e));
186
195
  throw e;
187
196
  }
188
197
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/chainflip-client",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {