@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.js CHANGED
@@ -18061,15 +18061,11 @@ function validateCalls2(calls) {
18061
18061
  }
18062
18062
 
18063
18063
  // src/wallet/normalize.ts
18064
- function defaultGasLimit(data) {
18065
- const normalized = normalizeHex(data);
18066
- return normalized === "0x" || normalized === "0x0" ? 21000n : 100000n;
18067
- }
18068
18064
  function normalizeCall(call2) {
18069
18065
  const normalizedTarget = getAddress(call2.target);
18070
18066
  const normalizedData = normalizeHex(call2.data);
18071
18067
  const value = call2.value ?? 0n;
18072
- const gasLimit = call2.gasLimit && call2.gasLimit > 0n ? call2.gasLimit : defaultGasLimit(normalizedData);
18068
+ const gasLimit = call2.gasLimit ?? 0n;
18073
18069
  return {
18074
18070
  target: normalizedTarget,
18075
18071
  data: normalizedData,
@@ -18312,18 +18308,18 @@ async function sendCalls(args) {
18312
18308
  }
18313
18309
  if (precheckQuote.simulationSuccess === false && precheckQuote.simulationErrors?.length) {
18314
18310
  const errors = precheckQuote.simulationErrors;
18315
- console.error("[sendCalls] Backend simulation failed:", errors);
18316
- const errorMessages = errors.map(
18317
- (e) => `Call #${e.index}: ${e.error}${e.revertData ? ` (data: ${e.revertData})` : ""}`
18318
- ).join("; ");
18319
- throw new Error(`Transaction simulation failed: ${errorMessages}`);
18311
+ console.warn("[sendCalls] Backend simulation failed (this may be expected for EIP-7702 transactions):", errors);
18312
+ for (const err of errors) {
18313
+ console.warn(`[sendCalls] Call #${err.index}: ${err.error}${err.revertData ? ` (revert data: ${err.revertData})` : ""}`);
18314
+ }
18315
+ console.warn("[sendCalls] Proceeding despite simulation failure - EIP-7702 execution context may differ");
18320
18316
  }
18321
18317
  if (precheckQuote.estimatedGasPerCall?.length) {
18322
18318
  console.log("[sendCalls] Applying estimated gas limits from backend...");
18323
18319
  for (let i = 0; i < normalizedCalls.length && i < precheckQuote.estimatedGasPerCall.length; i++) {
18324
18320
  const estimatedGas = BigInt(precheckQuote.estimatedGasPerCall[i] ?? "0");
18325
18321
  const currentGas = normalizedCalls[i]?.gasLimit ?? 0n;
18326
- if (estimatedGas > currentGas) {
18322
+ if (estimatedGas > 0n) {
18327
18323
  console.log(`[sendCalls] Call #${i}: updating gasLimit from ${currentGas} to ${estimatedGas}`);
18328
18324
  normalizedCalls[i].gasLimit = estimatedGas;
18329
18325
  }