@pioneer-platform/mayachain-client 0.0.23 → 0.0.25

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 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -118,7 +118,7 @@ function quoteFromPool(sellAmount, assetPoolAmount, runePoolAmount, maxSlippage)
118
118
  }
119
119
  var get_quote = function (quote) {
120
120
  return __awaiter(this, void 0, void 0, function () {
121
- var tag, output, pools, poolIn, poolOut, BaseDecimal_1, asset, DECIMALS, BASE_UNIT, sellAmountInBaseUnits, quoteFromNode, URL_1, amountOutMin, inboundAddress, amountOutEstimated, memoInput, memo, tx, e_1;
121
+ var tag, output, pools, poolIn, poolOut, BaseDecimal_1, asset, DECIMALS, BASE_UNIT, sellAmountInBaseUnits, quoteFromNode, URL_1, amountOutMin, inboundAddress, amountOutEstimated, memoInput, memo, type, chain, tx, e_1;
122
122
  return __generator(this, function (_a) {
123
123
  switch (_a.label) {
124
124
  case 0:
@@ -212,8 +212,16 @@ var get_quote = function (quote) {
212
212
  };
213
213
  memo = createMemo(memoInput);
214
214
  log.info(tag, "memo: ", memo);
215
+ type = void 0;
216
+ chain = quote.sellAsset.split(".")[0];
217
+ if (chain == "MAYA") {
218
+ type = 'deposit';
219
+ }
220
+ else {
221
+ type = 'transfer';
222
+ }
215
223
  tx = {
216
- type: "transfer",
224
+ type: type,
217
225
  chain: ChainToNetworkId[quote.sellAsset.split(".")[0]],
218
226
  txParams: {
219
227
  senderAddress: quote.senderAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/mayachain-client",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {