Shadow forge x19 - #207
Conversation
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>
…into ShadowForge-X19
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
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)
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)
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)
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;
}),
);
No description provided.