@glowlabs-org/utils 0.2.144 → 0.2.146

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var farmsRouter = require('./farms-router-Bvy7r2pJ.js');
3
+ var farmsRouter = require('./farms-router-BEm3R82J.js');
4
4
  var viem = require('viem');
5
5
  require('ethers');
6
6
 
@@ -274,8 +274,8 @@ const sepoliaAddresses = {
274
274
  USDC: "0x93c898be98cd2618ba84a6dccf5003d3bbe40356",
275
275
  USDG_UNISWAP: "0x2a085A3aEA8982396533327c854753Ce521B666d",
276
276
  GLW_UNISWAP: "0x8e27016D0B866a56CE74A1a280c749dD679bb0Fa",
277
- FORWARDER: "0xDaC24F18171224eeaf6a9B38f5C5081aDbDff969",
278
- OFFCHAIN_FRACTIONS: "0x7D97528eeF8B8D17AA1Ba3307Ed39b07b3A1b69B",
277
+ FORWARDER: "0xe7A366482899e2Ed29c9504F4792B8D1c67066ff",
278
+ OFFCHAIN_FRACTIONS: "0x5Ad30F90AFEf1279157A5055AAd2d8c1529a05D2",
279
279
  COUNTERFACTUAL_HOLDER_FACTORY: "0x2c3AB887746F6f4a8a4b9Db6aC800eb71945509A",
280
280
  FOUNDATION_WALLET: "0x5e230FED487c86B90f6508104149F087d9B1B0A7",
281
281
  FOUNDATION_HUB_MANAGER_WALLET: "0x5252FdA14A149c01EA5A1D6514a9c1369E4C70b4",
@@ -397,7 +397,7 @@ async function waitForViemTransactionWithRetry(publicClient, hash, options = {})
397
397
  throw new Error(`Transaction failed after ${attempt} attempts: ${errorMessage}`);
398
398
  }
399
399
  // Wait before retrying (exponential backoff)
400
- const delay = Math.min(2000 * Math.pow(2, attempt - 1), 10000);
400
+ const delay = Math.min(2000 * Math.pow(2, attempt - 1), 2000);
401
401
  if (enableLogging) {
402
402
  console.warn(`Transaction receipt not found (attempt ${attempt}/${maxRetries}), retrying in ${delay}ms...`);
403
403
  }
@@ -478,7 +478,7 @@ async function waitForEthersTransactionWithRetry(signer, txHash, options = {}) {
478
478
  throw new Error(`Transaction failed after ${attempt} attempts: ${errorMessage}`);
479
479
  }
480
480
  // Wait before retrying (exponential backoff)
481
- const delay = Math.min(2000 * Math.pow(2, attempt - 1), 10000);
481
+ const delay = Math.min(2000 * Math.pow(2, attempt - 1), 2000);
482
482
  if (enableLogging) {
483
483
  console.warn(`Transaction receipt not found (attempt ${attempt}/${maxRetries}), retrying in ${delay}ms...`);
484
484
  }
@@ -526,6 +526,29 @@ function configureSentry(config) {
526
526
  if (config.defaultContext)
527
527
  defaultExtra = { ...config.defaultContext };
528
528
  }
529
+ function shouldSkipSentry(error) {
530
+ try {
531
+ const possible = error;
532
+ const code = possible?.code || possible?.cause?.code;
533
+ const name = possible?.name || possible?.cause?.name;
534
+ const message = String(possible?.message || possible?.cause?.message || "");
535
+ // User rejected wallet request (ethers/viem/common providers)
536
+ if (code === "ACTION_REJECTED")
537
+ return true;
538
+ if (name === "UserRejectedRequestError")
539
+ return true;
540
+ if (/user rejected/i.test(message))
541
+ return true;
542
+ // Terminal waitForViemTransactionWithRetry error (retries exhausted)
543
+ if (/Transaction failed after\s+\d+\s+attempts:/i.test(message)) {
544
+ return true;
545
+ }
546
+ return false;
547
+ }
548
+ catch {
549
+ return false;
550
+ }
551
+ }
529
552
  function sentryAddBreadcrumb(breadcrumb) {
530
553
  try {
531
554
  if (!isEnabled)
@@ -538,6 +561,8 @@ function sentryCaptureException(error, extra) {
538
561
  try {
539
562
  if (!isEnabled)
540
563
  return;
564
+ if (shouldSkipSentry(error))
565
+ return;
541
566
  const client = getSentry();
542
567
  if (!client)
543
568
  return;
@@ -4258,4 +4283,4 @@ exports.useForwarder = useForwarder;
4258
4283
  exports.useOffchainFractions = useOffchainFractions;
4259
4284
  exports.waitForEthersTransactionWithRetry = waitForEthersTransactionWithRetry;
4260
4285
  exports.waitForViemTransactionWithRetry = waitForViemTransactionWithRetry;
4261
- //# sourceMappingURL=farms-router-Bvy7r2pJ.js.map
4286
+ //# sourceMappingURL=farms-router-BEm3R82J.js.map