@volr/react 0.1.22 → 0.1.24
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 +7 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -18085,15 +18085,11 @@ function validateCalls2(calls) {
|
|
|
18085
18085
|
}
|
|
18086
18086
|
|
|
18087
18087
|
// src/wallet/normalize.ts
|
|
18088
|
-
function defaultGasLimit(data) {
|
|
18089
|
-
const normalized = normalizeHex(data);
|
|
18090
|
-
return normalized === "0x" || normalized === "0x0" ? 21000n : 100000n;
|
|
18091
|
-
}
|
|
18092
18088
|
function normalizeCall(call2) {
|
|
18093
18089
|
const normalizedTarget = getAddress(call2.target);
|
|
18094
18090
|
const normalizedData = normalizeHex(call2.data);
|
|
18095
18091
|
const value = call2.value ?? 0n;
|
|
18096
|
-
const gasLimit = call2.gasLimit
|
|
18092
|
+
const gasLimit = call2.gasLimit ?? 0n;
|
|
18097
18093
|
return {
|
|
18098
18094
|
target: normalizedTarget,
|
|
18099
18095
|
data: normalizedData,
|
|
@@ -18336,18 +18332,18 @@ async function sendCalls(args) {
|
|
|
18336
18332
|
}
|
|
18337
18333
|
if (precheckQuote.simulationSuccess === false && precheckQuote.simulationErrors?.length) {
|
|
18338
18334
|
const errors = precheckQuote.simulationErrors;
|
|
18339
|
-
console.
|
|
18340
|
-
const
|
|
18341
|
-
(
|
|
18342
|
-
|
|
18343
|
-
|
|
18335
|
+
console.warn("[sendCalls] Backend simulation failed (this may be expected for EIP-7702 transactions):", errors);
|
|
18336
|
+
for (const err of errors) {
|
|
18337
|
+
console.warn(`[sendCalls] Call #${err.index}: ${err.error}${err.revertData ? ` (revert data: ${err.revertData})` : ""}`);
|
|
18338
|
+
}
|
|
18339
|
+
console.warn("[sendCalls] Proceeding despite simulation failure - EIP-7702 execution context may differ");
|
|
18344
18340
|
}
|
|
18345
18341
|
if (precheckQuote.estimatedGasPerCall?.length) {
|
|
18346
18342
|
console.log("[sendCalls] Applying estimated gas limits from backend...");
|
|
18347
18343
|
for (let i = 0; i < normalizedCalls.length && i < precheckQuote.estimatedGasPerCall.length; i++) {
|
|
18348
18344
|
const estimatedGas = BigInt(precheckQuote.estimatedGasPerCall[i] ?? "0");
|
|
18349
18345
|
const currentGas = normalizedCalls[i]?.gasLimit ?? 0n;
|
|
18350
|
-
if (estimatedGas >
|
|
18346
|
+
if (estimatedGas > 0n) {
|
|
18351
18347
|
console.log(`[sendCalls] Call #${i}: updating gasLimit from ${currentGas} to ${estimatedGas}`);
|
|
18352
18348
|
normalizedCalls[i].gasLimit = estimatedGas;
|
|
18353
18349
|
}
|