@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.
- package/dist/cjs/browser.js +1 -1
- package/dist/cjs/{farms-router-Bvy7r2pJ.js → farms-router-BEm3R82J.js} +30 -5
- package/dist/cjs/farms-router-BEm3R82J.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/browser.js +2 -2
- package/dist/esm/{farms-router-DBnVa7Ts.js → farms-router-CrYkNv7Z.js} +30 -5
- package/dist/esm/farms-router-CrYkNv7Z.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
- package/src/constants/addresses.ts +2 -2
- package/src/utils/sentry.ts +26 -0
- package/src/utils/transaction-utils.ts +2 -2
- package/dist/cjs/farms-router-Bvy7r2pJ.js.map +0 -1
- package/dist/esm/farms-router-DBnVa7Ts.js.map +0 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -274,8 +274,8 @@ const sepoliaAddresses = {
|
|
|
274
274
|
USDC: "0x93c898be98cd2618ba84a6dccf5003d3bbe40356",
|
|
275
275
|
USDG_UNISWAP: "0x2a085A3aEA8982396533327c854753Ce521B666d",
|
|
276
276
|
GLW_UNISWAP: "0x8e27016D0B866a56CE74A1a280c749dD679bb0Fa",
|
|
277
|
-
FORWARDER: "
|
|
278
|
-
OFFCHAIN_FRACTIONS: "
|
|
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),
|
|
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),
|
|
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-
|
|
4286
|
+
//# sourceMappingURL=farms-router-BEm3R82J.js.map
|