Skip to content

Shadow forge x19 - #207

Closed
Dargon789 wants to merge 23 commits into
masterfrom
ShadowForge-X19
Closed

Shadow forge x19#207
Dargon789 wants to merge 23 commits into
masterfrom
ShadowForge-X19

Conversation

@Dargon789

Copy link
Copy Markdown
Owner

No description provided.

Dargon789 and others added 22 commits July 3, 2025 22:29
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
@codesandbox

codesandbox Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel

vercel Bot commented Jun 2, 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 Jun 2, 2026 12:04am

@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 2, 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 introduces several security and performance enhancements, including input validation via regex on proxy paths and transaction IDs, limits on batched requests, and Nginx configuration updates. It also refactors Liquid asset loading to dynamically fetch data from the asset registry API rather than loading a large static JSON file, adds mobile interactivity to the cluster diagram, and displays potential savings from using Mempool Accelerator. The code review feedback highlights three key areas for improvement: handling potential EmptyError exceptions when using RxJS first() in the transaction details component, ensuring individual asset loading failures do not reject the entire batch in Promise.all, and adding robust error handling to the assets page observable to prevent the UI from getting stuck in a loading state.

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 (81-84)

medium

Using first() without a default value can throw an EmptyError if the observable completes without emitting a matching value (for example, if the cache service completes the stream or during certain teardown scenarios). To prevent potential unhandled runtime exceptions, consider providing a default value to first() such as null (casted as any to satisfy TypeScript if needed).

        this.cacheService.loadedBlocks$.pipe(
          first(b => b.height === this.tx.status.block_height, null as any),
          timeout({ each: 30000, with: () => [] }),
        ).subscribe((block) => {

frontend/src/app/services/assets.service.ts (151-152)

medium

If any single asset fails to load (e.g., due to a network error or a 404 from the registry), Promise.all will reject immediately, failing the entire batch of assets. To make this more robust and ensure that other successfully loaded assets are still processed, consider catching errors on individual asset promises so they resolve gracefully.

    const missingAssetIds = Array.from(assetIds).filter((assetId) => !this.assetsMinimalCache[assetId]);
    await Promise.all(missingAssetIds.map((assetId) => this.getLiquidAssetMinimalData(assetId).catch(() => null)));

frontend/src/app/components/assets/assets.component.ts (43-54)

medium

The assets$ observable now fetches data from an external API via getLiquidAssetsPage$. If this API request fails, the observable will error out and terminate, which might leave the UI in a permanent loading state or blank. Consider adding error handling (e.g., using catchError) to gracefully capture the error, assign it to this.error, and return an empty state so the UI can display an appropriate error message.\n\nNote: You will need to import catchError from 'rxjs/operators' and of from 'rxjs' at the top of the file.

    this.assets$ = this.route.queryParams
      .pipe(
        switchMap((queryParams) => {
          this.page = queryParams.page ? parseInt(queryParams.page, 10) : 1;
          const start = (this.page - 1) * this.itemsPerPage;
          return this.assetsService.getLiquidAssetsPage$(start, this.itemsPerPage).pipe(
            catchError((err) => {
              this.error = err;
              return of({ assets: [], total: 0 });
            })
          );
        }),
        map((result) => {
          this.totalAssets = result.total;
          return result.assets;
        }),
      );

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.

2 participants