@volr/react 0.1.23 → 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 +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
|
18068
|
+
const gasLimit = call2.gasLimit ?? 0n;
|
|
18073
18069
|
return {
|
|
18074
18070
|
target: normalizedTarget,
|
|
18075
18071
|
data: normalizedData,
|
|
@@ -18323,7 +18319,7 @@ async function sendCalls(args) {
|
|
|
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 >
|
|
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
|
}
|