@stableflow/bridges 3.1.2 → 3.1.3-rc-45fcf7f0b6-20260730
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/dist/index.js +14 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5578,55 +5578,24 @@ var CCTPOneClickService = class {
|
|
|
5578
5578
|
refundTo: evmAddress,
|
|
5579
5579
|
wallet: evmWallet
|
|
5580
5580
|
};
|
|
5581
|
-
|
|
5582
|
-
let
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
...oneClickParams,
|
|
5587
|
-
amountWei: Big(0.01).times(10 ** MIDDLE_TOKEN_CHAIN2.decimals).toFixed(0, 0)
|
|
5588
|
-
});
|
|
5589
|
-
execTime.log("CCTPOneClickService.quote", "oneClickService.quote: %o", oneClickResult);
|
|
5590
|
-
if (oneClickResult.errMsg) {
|
|
5591
|
-
return oneClickResult;
|
|
5592
|
-
}
|
|
5593
|
-
cctpParams.recipient = oneClickResult.quote.depositAddress;
|
|
5594
|
-
execTime.breakpoint();
|
|
5595
|
-
cctpResult = await cctp_default.quote(cctpParams);
|
|
5596
|
-
execTime.log("CCTPOneClickService.quote", "cctpService.quote: %o", cctpResult);
|
|
5597
|
-
execTime.breakpoint();
|
|
5598
|
-
try {
|
|
5599
|
-
const oneClickResult2 = await oneclick_default.quote({
|
|
5600
|
-
...oneClickParams,
|
|
5601
|
-
dry: true,
|
|
5602
|
-
amountWei: Big(cctpResult.outputAmount || 0).times(10 ** MIDDLE_TOKEN_CHAIN2.decimals).toFixed(0, 0)
|
|
5603
|
-
});
|
|
5604
|
-
oneClickResult.fees = oneClickResult2.fees;
|
|
5605
|
-
oneClickResult.outputAmount = oneClickResult2.outputAmount;
|
|
5606
|
-
oneClickResult.estimateTime = oneClickResult2.estimateTime;
|
|
5607
|
-
oneClickResult.priceImpact = oneClickResult2.priceImpact;
|
|
5608
|
-
oneClickResult.exchangeRate = oneClickResult2.exchangeRate;
|
|
5609
|
-
execTime.log("CCTPOneClickService.quote", "confirm get actual output amount result: %o", oneClickResult2);
|
|
5610
|
-
} catch (err) {
|
|
5611
|
-
execTime.log("CCTPOneClickService.quote", "confirm get actual output amount error: %o", err);
|
|
5612
|
-
}
|
|
5613
|
-
} else {
|
|
5614
|
-
execTime.breakpoint();
|
|
5615
|
-
cctpResult = await cctp_default.quote(cctpParams);
|
|
5616
|
-
execTime.log("CCTPOneClickService.quote", "cctpService.quote dry: %o", cctpResult);
|
|
5617
|
-
if (cctpResult.errMsg) {
|
|
5618
|
-
return cctpResult;
|
|
5619
|
-
}
|
|
5620
|
-
oneClickParams.amountWei = Big(cctpResult.outputAmount || 0).times(10 ** MIDDLE_TOKEN_CHAIN2.decimals).toFixed(0, 0);
|
|
5621
|
-
execTime.breakpoint();
|
|
5622
|
-
oneClickResult = await oneclick_default.quote(oneClickParams);
|
|
5623
|
-
execTime.log("CCTPOneClickService.quote", "oneClickService.quote: %o", oneClickResult);
|
|
5581
|
+
execTime.breakpoint();
|
|
5582
|
+
let cctpResult = await cctp_default.quote(cctpParams);
|
|
5583
|
+
execTime.log("cctpService.quote: %o", cctpResult);
|
|
5584
|
+
if (cctpResult.errMsg) {
|
|
5585
|
+
return cctpResult;
|
|
5624
5586
|
}
|
|
5587
|
+
oneClickParams.amountWei = Big(cctpResult.outputAmount || 0).times(10 ** MIDDLE_TOKEN_CHAIN2.decimals).toFixed(0, 0);
|
|
5588
|
+
execTime.breakpoint();
|
|
5589
|
+
const oneClickResult = await oneclick_default.quote(oneClickParams);
|
|
5590
|
+
execTime.log("oneClickService.quote: %o", oneClickResult);
|
|
5625
5591
|
if (oneClickResult.errMsg) {
|
|
5626
5592
|
return oneClickResult;
|
|
5627
5593
|
}
|
|
5628
|
-
if (
|
|
5629
|
-
|
|
5594
|
+
if (!dry) {
|
|
5595
|
+
cctpParams.recipient = oneClickResult.quote.depositAddress;
|
|
5596
|
+
execTime.breakpoint();
|
|
5597
|
+
cctpResult = await cctp_default.quote(cctpParams);
|
|
5598
|
+
execTime.log("cctpService.quote again: %o", cctpResult);
|
|
5630
5599
|
}
|
|
5631
5600
|
csl("CCTPOneClickService quote", "rose-600", "oneClickResult: %o", oneClickResult);
|
|
5632
5601
|
csl("CCTPOneClickService quote", "rose-600", "cctpResult: %o", cctpResult);
|