@solana/kit 6.3.0 → 6.3.1
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.development.js +14 -3
- package/dist/index.development.js.map +1 -1
- package/dist/index.production.min.js +467 -461
- package/package.json +25 -25
|
@@ -6179,7 +6179,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6179
6179
|
preflightData = unwrapped.preflightData;
|
|
6180
6180
|
cause = unwrapped.unwrappedError;
|
|
6181
6181
|
const indicator = getFailedIndicator(!!preflightData, result.context.signature);
|
|
6182
|
-
causeMessage = `${indicator}: ${cause.message}`;
|
|
6182
|
+
causeMessage = `${indicator}: ${cause.message}${formatLogSnippet(logs)}`;
|
|
6183
6183
|
} else {
|
|
6184
6184
|
cause = abortReason;
|
|
6185
6185
|
causeMessage = abortReason != null ? `. Canceled with abort reason: ${String(abortReason)}` : ": Canceled";
|
|
@@ -6221,7 +6221,8 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6221
6221
|
return `
|
|
6222
6222
|
[Tx #${index + 1}${indicator}] ${error.message}`;
|
|
6223
6223
|
});
|
|
6224
|
-
|
|
6224
|
+
const logSnippet = failedTransactions.length === 1 ? formatLogSnippet(failedTransactions[0].logs) : "";
|
|
6225
|
+
causeMessages = `.${failureLines.join("")}${logSnippet}`;
|
|
6225
6226
|
} else {
|
|
6226
6227
|
cause = abortReason;
|
|
6227
6228
|
causeMessages = abortReason != null ? `. Canceled with abort reason: ${String(abortReason)}` : ": Canceled";
|
|
@@ -6281,6 +6282,16 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6281
6282
|
}
|
|
6282
6283
|
}
|
|
6283
6284
|
}
|
|
6285
|
+
function formatLogSnippet(logs) {
|
|
6286
|
+
if (!logs || logs.length === 0) return "";
|
|
6287
|
+
const maxLines = 8;
|
|
6288
|
+
const lastLines = logs.slice(-maxLines);
|
|
6289
|
+
const header = logs.length > maxLines ? `
|
|
6290
|
+
|
|
6291
|
+
Logs (last ${maxLines} of ${logs.length}):` : "\n\nLogs:";
|
|
6292
|
+
return `${header}
|
|
6293
|
+
${lastLines.map((line) => ` > ${line}`).join("\n")}`;
|
|
6294
|
+
}
|
|
6284
6295
|
function getFailedIndicator(isPreflight, signature2) {
|
|
6285
6296
|
if (isPreflight) return " (preflight)";
|
|
6286
6297
|
if (signature2) return ` (${signature2})`;
|
|
@@ -8386,7 +8397,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
8386
8397
|
...config.headers ? normalizeHeaders2(config.headers) : void 0,
|
|
8387
8398
|
...{
|
|
8388
8399
|
// Keep these headers lowercase so they will override any user-supplied headers above.
|
|
8389
|
-
"solana-client": `js/${"6.3.
|
|
8400
|
+
"solana-client": `js/${"6.3.1"}`
|
|
8390
8401
|
}
|
|
8391
8402
|
}
|
|
8392
8403
|
}),
|