@volr/react 0.1.24 → 0.1.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.
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18184,6 +18184,17 @@ function extractFailureReason(response) {
|
|
|
18184
18184
|
}
|
|
18185
18185
|
const diag = meta.developerDiagnostics;
|
|
18186
18186
|
if (diag) {
|
|
18187
|
+
const topLevel = diag.topLevel;
|
|
18188
|
+
if (topLevel) {
|
|
18189
|
+
if (typeof topLevel.reason === "string" && topLevel.reason) {
|
|
18190
|
+
reasons.push(topLevel.reason);
|
|
18191
|
+
}
|
|
18192
|
+
if (topLevel.oogSuspected) {
|
|
18193
|
+
reasons.push(
|
|
18194
|
+
"Likely Out-of-gas via VolrInvoker. The transaction consumed almost all provided gas without a clear revert reason."
|
|
18195
|
+
);
|
|
18196
|
+
}
|
|
18197
|
+
}
|
|
18187
18198
|
if (typeof diag.revertReason === "string" && diag.revertReason) {
|
|
18188
18199
|
reasons.push(diag.revertReason);
|
|
18189
18200
|
}
|
|
@@ -18228,12 +18239,13 @@ async function pollTransactionStatus(txId, client, maxAttempts = 60, intervalMs
|
|
|
18228
18239
|
if (meta) {
|
|
18229
18240
|
console.error("[pollTransactionStatus] Full meta:", JSON.stringify(meta, null, 2));
|
|
18230
18241
|
}
|
|
18231
|
-
|
|
18242
|
+
const failedResult = {
|
|
18232
18243
|
txId,
|
|
18233
18244
|
status: "FAILED",
|
|
18234
18245
|
txHash,
|
|
18235
18246
|
reason: failureReason
|
|
18236
18247
|
};
|
|
18248
|
+
return failedResult;
|
|
18237
18249
|
}
|
|
18238
18250
|
console.log(`[pollTransactionStatus] Transaction ${txId} is ${status}, attempt ${attempt + 1}/${maxAttempts}`);
|
|
18239
18251
|
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|