@volr/react 0.1.11 → 0.1.13

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 CHANGED
@@ -18201,7 +18201,9 @@ async function pollTransactionStatus(txId, client, maxAttempts = 60, intervalMs
18201
18201
  return {
18202
18202
  txId,
18203
18203
  status: "CONFIRMED",
18204
- txHash
18204
+ txHash,
18205
+ gasUsed: response.gasUsed ? BigInt(response.gasUsed) : 0n,
18206
+ blockNumber: response.blockNumber ? Number(response.blockNumber) : 0
18205
18207
  };
18206
18208
  }
18207
18209
  if (status === "FAILED") {
@@ -18236,8 +18238,6 @@ async function sendCalls(args) {
18236
18238
  if (chainId === 0) {
18237
18239
  throw new Error("chainId cannot be 0");
18238
18240
  }
18239
- const effectivePolicyId = opts.policyId?.toLowerCase() === sdkCore.ZERO_HASH.toLowerCase() ? void 0 : opts.policyId;
18240
- validatePolicyId2(effectivePolicyId);
18241
18241
  const normalizedFrom = from14;
18242
18242
  const normalizedCalls = normalizeCalls(calls);
18243
18243
  validateCalls2(normalizedCalls);
@@ -18267,32 +18267,28 @@ async function sendCalls(args) {
18267
18267
  { tolerateFundingErrors }
18268
18268
  );
18269
18269
  }
18270
- let projectPolicyId;
18271
- if (!effectivePolicyId) {
18272
- const tempAuthForPrecheck = buildTempAuth({
18273
- chainId,
18274
- from: normalizedFrom,
18275
- policyId: sdkCore.ZERO_HASH,
18276
- calls: normalizedCalls,
18277
- expiresInSec: opts.expiresInSec ?? DEFAULT_EXPIRES_IN_SEC
18270
+ const tempAuthForPrecheck = buildTempAuth({
18271
+ chainId,
18272
+ from: normalizedFrom,
18273
+ policyId: sdkCore.ZERO_HASH,
18274
+ calls: normalizedCalls,
18275
+ expiresInSec: opts.expiresInSec ?? DEFAULT_EXPIRES_IN_SEC
18276
+ });
18277
+ let precheckQuote;
18278
+ try {
18279
+ precheckQuote = await deps.precheck({
18280
+ auth: tempAuthForPrecheck,
18281
+ calls: normalizedCalls
18278
18282
  });
18279
- let precheckQuote;
18280
- try {
18281
- precheckQuote = await deps.precheck({
18282
- auth: tempAuthForPrecheck,
18283
- calls: normalizedCalls
18284
- });
18285
- } catch (err) {
18286
- throw err instanceof Error ? err : new Error(String(err));
18287
- }
18288
- const quotePolicyId = precheckQuote.policyId;
18289
- if (!quotePolicyId) {
18290
- throw new Error("Backend did not return policyId in precheck response");
18291
- }
18292
- projectPolicyId = quotePolicyId;
18293
- } else {
18294
- projectPolicyId = effectivePolicyId;
18283
+ } catch (err) {
18284
+ throw err instanceof Error ? err : new Error(String(err));
18295
18285
  }
18286
+ const quotePolicyId = precheckQuote.policyId;
18287
+ if (!quotePolicyId) {
18288
+ throw new Error("Backend did not return policyId in precheck response");
18289
+ }
18290
+ const projectPolicyId = quotePolicyId;
18291
+ validatePolicyId2(projectPolicyId);
18296
18292
  const tempAuth = buildTempAuth({
18297
18293
  chainId,
18298
18294
  from: normalizedFrom,
@@ -18312,7 +18308,8 @@ async function sendCalls(args) {
18312
18308
  let activeProvider = null;
18313
18309
  try {
18314
18310
  const resolved = await resolveSigner({
18315
- explicitSigner: opts.signer,
18311
+ explicitSigner: void 0,
18312
+ // Always resolve internally
18316
18313
  provider: deps.provider,
18317
18314
  chainId,
18318
18315
  client: deps.client,
@@ -18329,7 +18326,7 @@ async function sendCalls(args) {
18329
18326
  console.log(
18330
18327
  `[useVolrWallet] Transaction ${result.txId} is ${result.status}, starting polling...`
18331
18328
  );
18332
- return await pollTransactionStatus(result.txId, deps.client);
18329
+ return pollTransactionStatus(result.txId, deps.client);
18333
18330
  }
18334
18331
  return result;
18335
18332
  } finally {
@@ -18417,7 +18414,7 @@ function useVolrWallet() {
18417
18414
  return Array.isArray(calls2) && calls2.length > 0 && "data" in calls2[0] && !("abi" in calls2[0]);
18418
18415
  };
18419
18416
  const builtCalls = isCallArray(calls) ? calls : buildCalls(calls);
18420
- return await sendCalls({
18417
+ return sendCalls({
18421
18418
  chainId,
18422
18419
  from: getAddress(from14),
18423
18420
  calls: builtCalls.map((c) => ({