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