Fix compliance-node gating, authorization lock-in, launch feed accuracy, and locale a11y sync - #434
Merged
zachyo merged 2 commits intoAug 3, 2026
Conversation
…racy, and locale a11y sync
|
@Majormaxx 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! 🚀 |
Contributor
Author
|
Verification summary: contracts — 114/114 unit tests + 21/21 fuzz tests passing, |
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
getHealth().oldestLedgerinstead of a hardcoded 24h lookback (falling back to the old fixed window ifgetHealthis unsupported), sorts candidates by ledger before truncating to the top 20 so a busy window doesn't return an arbitrary subset, and runs the activity-scoring RPC batches concurrently instead of one at a time.ComplianceNodeInterfacegains acan_issue(to)method that mint/mint_batch call to check only the recipient, with a fallback to the oldercan_trade(to, to)for compliance nodes that don't implement it yet. Previously mint always askedcan_trade(token_contract_address, to), which an allowlist-style node would always reject since the token contract itself is never KYC'd — this blocked all issuance on allowlist-style compliance nodes.set_authorization_required(required)andrenounce_authorization_revocable()so the admin can toggle the authorization-required gate after deploy, and permanently give up revoke power if they want that one-way guarantee. Previously both flags were write-once atinitializewith no way to change them later.LocaleProvidernow syncsdocument.documentElement.lang/dirto the active locale on mount and on every locale change, so screen readers, "translate this page," and hyphenation/font-fallback work correctly for es/fr/zh instead of staying pinned toen.Also fixed (prerequisite, found while verifying the above)
contracts/token/src/lib.rsonmastercurrently fails to compile and fails CI on every recent run (verified viagh run list):clawback()called a nonexistentSelf::_transfer_clawback, and 3 event topic literals exceeded Soroban's 9-charactersymbol_short!limit. Fixed as a hard prerequisite since these changes couldn't otherwise be built or tested. Also reconciledEXPECTED_TOPICSanddocs/events.json/docs/events.mdagainst the actual emitted topics (a pre-existing doc/fixture drift:"auth"was documented but never emitted,accept_admin'sset_admintopic was undocumented) — pure documentation-side fix, no runtime behavior change.The 3 renamed topic literals (
prop_admin→prop_adm,revoke_auth→rvk_auth,update_uri→upd_uri) required matching updates infrontend/lib/stellar.ts(TRACKED_EVENT_TOPICS,TokenActivityType,decodeActivityEvent) andfrontend/hooks/useContractEvents.ts's duplicate event-topic switch, so the frontend's activity feed keeps decoding real contract events correctly.Testing
cargo test -p soroban-token: 114/114 unit tests + 21/21 fuzz tests passing.cargo test --workspace: all passing (token + vesting + doc-tests).cargo fmt --all -- --check: clean except 2 pre-existing, untouched findings (line 607 inapprove, a ~90-line block near line 2615) that predate this branch — left as-is per surgical-diff scope.cargo build -p soroban-token --target wasm32-unknown-unknown --release: clean.python3 scripts/generate_events_doc.py --check: clean.npm run type-check: clean (0 errors).npm run lint: clean (0 errors; pre-existing warnings in untouched files only).npm run test: this sandbox hits an environment-level Jest SIGBUS crash (reproducible on pre-existing, untouched test files too, independent of the changes here) — substituted withtsc --noEmit+eslint+ manual test-logic review against the actual implementation for the 2 new test files (recentTokens.test.ts,LocaleProvider.test.tsx).Test plan
can_trade(nocan_issue) and confirm mint still works via the fallbackcan_issue, confirm mint is gated on the recipient onlyset_authorization_requiredand confirm it takes effect immediately<html lang>/dirupdate and a screen reader announces the correct language