fix: resolve four Stellar Wave issues (#1211, #1187, #1185, #1195)#1293
Open
goldandrew wants to merge 1 commit into
Open
fix: resolve four Stellar Wave issues (#1211, #1187, #1185, #1195)#1293goldandrew wants to merge 1 commit into
goldandrew wants to merge 1 commit into
Conversation
LabsCrypt#1211 - docs: fix STELLAR_NETWORK documented values (pubnet/sandbox -> mainnet) LabsCrypt#1187 - fix: reconcile eventIndexer queries with indexer_state migration (last_ledger + contract) LabsCrypt#1185 - test: add unit tests for jwtAuth RBAC/scope middleware (requireScopes, requireJwtAuth cookie path, requireWalletParamMatchesJwt) LabsCrypt#1195 - test: add migration up/down schema integration test with smoke queries
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
#1211 - [Docs] ENVIRONMENT.md lists invalid STELLAR_NETWORK values
Changed documented values from
(testnet, pubnet, sandbox)to(testnet, mainnet)to matchparseNetwork()inbackend/src/config/stellar.ts.#1187 - [Backend] indexer_state rename + NOT NULL contract column drift breaks eventIndexer at runtime
Updated
eventIndexer.tsqueries to uselast_ledger(renamed fromlast_indexed_ledger) and providecontractvalue for the NOT NULL column:getLastIndexedLedger(): SELECT/INSERT uselast_ledger+contractparameterupdateLastIndexedLedger(): UPDATE/INSERT uselast_ledger+contractfiltergetContractId()helper to derive contract identifier from tracked contract IDs#1185 - [Testing] jwtAuth.ts RBAC/scope middleware has no unit tests
Added comprehensive unit tests covering:
requireScopes: admin:all bypass, missing scope (403), unauthenticated (401)requireJwtAuthcookie path: valid cookie, malformed/empty cookie, wrong cookie name, URL-encoded values, token revocation checkrequireWalletParamMatchesJwt: mismatched param (403), unauthenticated (401), missing param (400)#1195 - [Testing] No migration up/down or schema integration test
Added
migration.test.tsthat:scoresandindexer_state(includinglast_ledger/contract columns)describeIf) as existingdatabase.test.tsTesting
All related test suites pass:
jwtAuth: 16/16 ✓eventIndexer: 16/16 ✓stellarConfig: 4/4 ✓migration: skipped without DB (conditional)Pre-existing failures (9 test suites) are unrelated to this PR (missing DB, environment config issues).
Closes #1211
Closes #1187
Closes #1185
Closes #1195