@volr/react 0.1.47 → 0.1.49
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 +1 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -23
- package/dist/index.d.ts +20 -23
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -18402,14 +18402,11 @@ function useVolrWallet() {
|
|
|
18402
18402
|
let extendedRpcClient = null;
|
|
18403
18403
|
const ensureRpcClient = async () => {
|
|
18404
18404
|
if (!publicClient) {
|
|
18405
|
-
console.log("[ensureRpcClient] Getting RPC URL for chainId:", chainId);
|
|
18406
18405
|
const rpcUrl = await getRpcUrl(chainId);
|
|
18407
|
-
console.log("[ensureRpcClient] Got RPC URL:", rpcUrl);
|
|
18408
18406
|
publicClient = createPublicClient({
|
|
18409
18407
|
transport: http(rpcUrl)
|
|
18410
18408
|
});
|
|
18411
18409
|
extendedRpcClient = createExtendedRPCClient(publicClient);
|
|
18412
|
-
console.log("[ensureRpcClient] Public client created");
|
|
18413
18410
|
}
|
|
18414
18411
|
return { publicClient, extendedRpcClient };
|
|
18415
18412
|
};
|
|
@@ -18449,13 +18446,9 @@ function useVolrWallet() {
|
|
|
18449
18446
|
}
|
|
18450
18447
|
});
|
|
18451
18448
|
},
|
|
18452
|
-
sendBatch: (async (calls, opts) => {
|
|
18453
|
-
console.log("[sendBatch] Starting sendBatch...", { chainId, callsCount: calls.length });
|
|
18454
|
-
console.log("[sendBatch] Ensuring RPC client...");
|
|
18449
|
+
sendBatch: (async (calls, opts = {}) => {
|
|
18455
18450
|
const { publicClient: publicClient2, extendedRpcClient: rpcClient } = await ensureRpcClient();
|
|
18456
|
-
console.log("[sendBatch] RPC client ready");
|
|
18457
18451
|
const from14 = opts.from ?? user?.evmAddress;
|
|
18458
|
-
console.log("[sendBatch] From address:", from14);
|
|
18459
18452
|
if (!from14) {
|
|
18460
18453
|
throw new Error(
|
|
18461
18454
|
"from address is required. Provide it in opts.from or set user.evmAddress in VolrProvider. If you haven't set up a wallet provider yet, please complete the onboarding flow."
|
|
@@ -18464,10 +18457,7 @@ function useVolrWallet() {
|
|
|
18464
18457
|
const isCallArray = (calls2) => {
|
|
18465
18458
|
return Array.isArray(calls2) && calls2.length > 0 && "data" in calls2[0] && !("abi" in calls2[0]);
|
|
18466
18459
|
};
|
|
18467
|
-
console.log("[sendBatch] Building calls...");
|
|
18468
18460
|
const builtCalls = isCallArray(calls) ? calls : buildCalls(calls);
|
|
18469
|
-
console.log("[sendBatch] Calls built:", builtCalls.length);
|
|
18470
|
-
console.log("[sendBatch] Calling sendCalls...");
|
|
18471
18461
|
return sendCalls({
|
|
18472
18462
|
chainId,
|
|
18473
18463
|
from: getAddress(from14),
|