Fix/issues 243 244 245 246 - #389
Merged
Mystery-CLI merged 5 commits intoApr 24, 2026
Merged
Conversation
…upBy and aggregate
|
@Lex-Studios Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses four critical issues in the Stellar Wave backend, focusing on configuration compatibility, error handling, performance optimization, and network-aware asset
management.
Changes Implemented
Issue #243: TypeScript Configuration in ESM Project
File:
backend/prisma.config.ts→backend/prisma.config.jsConverted Prisma configuration from TypeScript to ESM JavaScript. The project uses
"type": "module"without a TypeScript toolchain, making Prisma CLI unable to read.tsconfigfiles. The new
prisma.config.jsuses standard ESM syntax and is compatible with the project's module setup.Impact: Prisma CLI now works correctly without requiring
tsxorts-nodeas dev dependencies.Issue #244: CORS Error Handling Returns 500 Instead of 403
File:
backend/src/server.jsFixed CORS origin validation callback to properly return 403 Forbidden for disallowed origins instead of 500 Internal Server Error.
Changes:
cb(new Error(...))which Express-CORS converts to 500cb(null, false)with a dedicated CORS error handler middleware{ error: 'CORS: origin not allowed' }Impact: Clients receive correct HTTP status codes and clearer error messages for CORS violations.
Issue #245: Stream Analytics Loads All Records Into Memory
File:
backend/src/services/streaming.jsOptimized
getStreamAnalytics()function to use database-level aggregation instead of loading all payment stream records into application memory.Changes:
findMany()withgroupBy()to count streams by statusaggregate()query to compute total volume in databaseImpact: Significantly reduced memory usage and improved query performance, especially with large datasets. Database handles aggregation instead of application layer.
Issue #246: MultiSig Uses Direct Environment Variable for Asset Issuer
File:
backend/src/services/multiSig.jsReplaced hardcoded
process.env.ASSET_ISSUERwithgetIssuer(assetCode)function for proper per-network asset issuer lookup.Changes:
getIssuerfromconfig/assets.jsbuildMultiSigTransaction()to usegetIssuer(assetCode)instead of direct env varImpact: Multi-signature transactions now use correct asset issuers per network, preventing transactions from failing on testnet due to wrong issuer configuration.
Testing Recommendations
npx prisma migrate statusgetStreamAnalytics()performance with large datasetsCloses
Closes #243
Closes #244
Closes #245
Closes #246