Skip to content

Main - #206

Closed
Dargon789 wants to merge 0 commit into
masterfrom
main
Closed

Main#206
Dargon789 wants to merge 0 commit into
masterfrom
main

Conversation

@Dargon789

Copy link
Copy Markdown
Owner

No description provided.

@codesandbox

codesandbox Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mempool Ready Ready Preview, Comment Jul 21, 2026 1:50pm

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@snyk-io

snyk-io Bot commented Jun 1, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances backend security and validation by introducing strict regex checks on route parameters, returning appropriate 400 Bad Request errors, and limiting batched transaction queries. On the frontend, Angular dependencies are updated, the About page alliances section is redesigned, and Liquid asset handling is optimized to fetch data dynamically from the registry API rather than loading large static JSON files. Additionally, mobile responsiveness is improved for the CPFP cluster diagram, and a Mempool Accelerator savings message is added to transaction details. The code review feedback identifies several critical areas where missing null/undefined checks or type mismatches (such as mixing BigInt with other types) could lead to runtime TypeErrors, and provides actionable suggestions to resolve these issues.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

frontend/src/app/components/transaction/transaction-details/transaction-details.component.ts (67)

high

If this.tx?.flags is parsed as a number or string at runtime (which is common for JSON-parsed API responses), performing a bitwise AND operation with BigInt TransactionFlags will throw a TypeError: Cannot mix BigInt and other types. Converting the flags safely using BigInt(this.tx?.flags ?? 0) avoids this potential runtime crash.

    const hasIneligibleFlags = (BigInt(this.tx?.flags ?? 0) & (TransactionFlags.inscription | TransactionFlags.sighash_none | TransactionFlags.sighash_single | TransactionFlags.sighash_acp)) > 0n;

frontend/src/app/components/transaction/transaction-details/transaction-details.component.ts (73)

medium

If this.tx.vout is undefined or missing (e.g., in mock data or incomplete transaction objects), calling .map() on it will throw a TypeError. Using a fallback empty array (this.tx.vout || []) prevents this potential crash.

      && Math.min(...(this.tx.vout || []).map(o => o.value)) <= 1000000

frontend/src/app/services/assets.service.ts (95-96)

medium

If apiAsset is null or undefined (e.g., if the API returns an empty response), accessing apiAsset.name will throw a TypeError. Adding a null check for apiAsset before accessing its properties prevents potential crashes.

        const apiAsset = await firstValueFrom(this.electrsApiService.getLiquidAssetRegistry$(assetId));
        if (apiAsset && (apiAsset.name || apiAsset.ticker || apiAsset.precision != null)) {

frontend/src/app/components/assets/asset-group/asset-group.component.ts (29-37)

medium

If group or group.assets is null or undefined (e.g., if the asset group is not found or the API returns an unexpected response), accessing group.assets will throw a TypeError. Using optional chaining and a fallback empty array ensures the component handles these cases gracefully.

        switchMap((group) => {
          const assetsPromises = (group?.assets || []).map((assetId) =>
            this.assetsService.getLiquidAssetData(assetId).catch(() => ({ asset_id: assetId }))
          );
          return from(Promise.all(assetsPromises))
            .pipe(
              map((assets) => ({
                group: group,
                assets: assets,
              }))
            );
        }),

frontend/src/app/components/transaction/transaction.component.ts (1138-1139)

medium

If toggleCpfp() or other methods call formatFragment before this.fragmentParams is initialized, fragmentParams will be undefined, causing fragmentParams.toString() to throw a TypeError. Adding optional chaining and a fallback empty string prevents this potential crash.

  private formatFragment(fragmentParams: URLSearchParams | null | undefined, anchor: string | null = null): string | null {
    const params = new URLSearchParams(fragmentParams?.toString() || '');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant