@pioneer-platform/uniswap-client 0.0.24 → 0.0.26

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
@@ -143,6 +143,11 @@ var get_quote = function (quote) {
143
143
  output.txs = [];
144
144
  from = quote.senderAddress;
145
145
  recipient = quote.recipientAddress;
146
+ output.sellAsset = {};
147
+ output.sellAsset.caip = quote.sellAsset;
148
+ output.sellAmount = quote.sellAmount;
149
+ output.buyAsset = {};
150
+ output.buyAsset.caip = quote.buyAsset;
146
151
  inputChain = caipToNetworkId(quote.sellAsset);
147
152
  outputChain = caipToNetworkId(quote.buyAsset);
148
153
  if (inputChain != outputChain)
@@ -267,6 +272,11 @@ var get_quote = function (quote) {
267
272
  log.info(tag, 'response', response.data);
268
273
  uraQuoteResponse = response.data;
269
274
  log.info(tag, 'uraQuoteResponse', uraQuoteResponse);
275
+ output.amountOut = uraQuoteResponse.quote.quoteDecimals;
276
+ output.gas = uraQuoteResponse.quote.gasUseEstimate;
277
+ output.gasUsd = uraQuoteResponse.quote.gasUseEstimateUSD;
278
+ output.id = uraQuoteResponse.quote.requestId;
279
+ output.slippage = uraQuoteResponse.quote.slippage;
270
280
  calldata = uraQuoteResponse.quote.methodParameters.calldata;
271
281
  value = uraQuoteResponse.quote.methodParameters.value;
272
282
  log.info("calldata: ", calldata);
@@ -298,7 +308,6 @@ var get_quote = function (quote) {
298
308
  output.steps = 1;
299
309
  output.complete = true;
300
310
  output.type = 'EVM';
301
- output.id = uuid();
302
311
  return [2 /*return*/, output];
303
312
  case 14:
304
313
  e_1 = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/uniswap-client",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {