@clonegod/ttd-sol-common 2.0.27 → 2.0.28
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/trade/send/jito.js
CHANGED
|
@@ -78,7 +78,7 @@ const getJitoTipAccount = () => {
|
|
|
78
78
|
exports.getJitoTipAccount = getJitoTipAccount;
|
|
79
79
|
JitoUtils.init();
|
|
80
80
|
const sendBundleWithJito = async (mainTx, tipTx) => {
|
|
81
|
-
var _a, _b
|
|
81
|
+
var _a, _b;
|
|
82
82
|
let url = process.env.JITO_SEND_BUNDLE_URL || 'https://tokyo.mainnet.block-engine.jito.wtf/api/v1/bundles';
|
|
83
83
|
const client = (0, http_client_1.getHttpClient)(url);
|
|
84
84
|
const requestData = {
|
|
@@ -98,12 +98,9 @@ const sendBundleWithJito = async (mainTx, tipTx) => {
|
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
100
|
if (error instanceof axios_1.AxiosError) {
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
const status = (_e = error.response) === null || _e === void 0 ? void 0 : _e.status;
|
|
105
|
-
const statusText = (_f = error.response) === null || _f === void 0 ? void 0 : _f.statusText;
|
|
106
|
-
(0, dist_1.log_warn)(`[sendBundleWithJito] Request failed - method: ${method}, url: ${errorUrl}, status: ${status}, statusText: ${statusText}, data: ${errorData}`);
|
|
101
|
+
const status = (_a = error.response) === null || _a === void 0 ? void 0 : _a.status;
|
|
102
|
+
const statusText = (_b = error.response) === null || _b === void 0 ? void 0 : _b.statusText;
|
|
103
|
+
(0, dist_1.log_warn)(`[sendBundleWithJito] Request failed: ${status} - ${statusText}`);
|
|
107
104
|
}
|
|
108
105
|
else {
|
|
109
106
|
(0, dist_1.log_warn)(`[sendBundleWithJito] Unexpected error: ${url} - ${error.message}`);
|
package/package.json
CHANGED
package/src/trade/send/jito.ts
CHANGED
|
@@ -80,13 +80,10 @@ export const sendBundleWithJito = async (mainTx: Transaction, tipTx: Transaction
|
|
|
80
80
|
} catch (error) {
|
|
81
81
|
if(error instanceof AxiosError) {
|
|
82
82
|
// 提取关键错误信息
|
|
83
|
-
const method = error.config?.method?.toUpperCase() || '';
|
|
84
|
-
const errorUrl = error.config?.url || url;
|
|
85
|
-
const errorData = error.config?.data;
|
|
86
83
|
const status = error.response?.status;
|
|
87
84
|
const statusText = error.response?.statusText;
|
|
88
85
|
|
|
89
|
-
log_warn(`[sendBundleWithJito] Request failed
|
|
86
|
+
log_warn(`[sendBundleWithJito] Request failed: ${status} - ${statusText}`);
|
|
90
87
|
} else {
|
|
91
88
|
log_warn(`[sendBundleWithJito] Unexpected error: ${url} - ${error.message}`);
|
|
92
89
|
}
|