@pioneer-platform/pioneer-router 8.4.74 → 8.4.75

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
@@ -10,7 +10,9 @@ declare let osmosis: any;
10
10
  declare let mayachain: any;
11
11
  declare let uniswap: any;
12
12
  declare let across: any;
13
+ declare let MEMOLESS_SUPPORT: any;
13
14
  interface Swap {
15
+ memoless?: boolean;
14
16
  sellAsset: {
15
17
  context: string;
16
18
  caip: string;
package/lib/index.js CHANGED
@@ -94,6 +94,10 @@ var uniswap = require("@pioneer-platform/uniswap-client");
94
94
  //1inch/0x
95
95
  //bridge
96
96
  var across = require("@pioneer-platform/across-client");
97
+ var MEMOLESS_SUPPORT = {
98
+ "changelly": true,
99
+ "chainflip": true,
100
+ };
97
101
  var NetworksByIntegration = {};
98
102
  module.exports = {
99
103
  init: function () {
@@ -224,8 +228,8 @@ function get_quote_from_integration(integration, quote) {
224
228
  quoteOsmosis = _c.sent();
225
229
  return [2 /*return*/, [quoteOsmosis]];
226
230
  case 8:
227
- from = quote.sellAsset.ticker;
228
- to = quote.buyAsset.ticker;
231
+ from = quote.sellAsset.ticker || quote.sellAsset.symbol;
232
+ to = quote.buyAsset.ticker || quote.buyAsset.symbol;
229
233
  address = quote.buyAsset.address;
230
234
  amount = quote.sellAmount;
231
235
  log.info({
@@ -337,6 +341,10 @@ function get_quote(quote) {
337
341
  quotes = [];
338
342
  log.info("sellChain: ", sellChain);
339
343
  log.info("buyChain: ", buyChain);
344
+ //if memoless filter
345
+ if (quote.memoless) {
346
+ integrations = integrations.filter(function (integration) { return MEMOLESS_SUPPORT[integration]; });
347
+ }
340
348
  _i = 0, integrations_1 = integrations;
341
349
  _c.label = 2;
342
350
  case 2:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-router",
3
- "version": "8.4.74",
3
+ "version": "8.4.75",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {