Skip to content

client: Fix some politeia issues.#3518

Open
JoeGruffins wants to merge 1 commit intodecred:masterfrom
JoeGruffins:polcleanup
Open

client: Fix some politeia issues.#3518
JoeGruffins wants to merge 1 commit intodecred:masterfrom
JoeGruffins:polcleanup

Conversation

@JoeGruffins
Copy link
Member

  • Fix XSS risk: remove html.WithUnsafe() from goldmark renderer
  • Fix SignMessage to decode base64 signature from RPC wallet
  • Fix iterateTable swallowing errors (return nil -> return err)
  • Make politeia init non-fatal so wallet still runs without it
  • Add nil guards for c.politeia in all core politeia methods
  • Move table/index setup after version check to avoid DropAll issues
  • Add nil Vote check before dereferencing in CastVotes
  • Fix division by zero when EligibleTickets is 0
  • Fix lastSync stored on error (move from defer to after success)
  • Fix swallowed error in spv AddressAccount
  • Fix copy-paste error in proposalTokenCtx (host -> token)
  • Make ProposalsInProgress failure non-fatal in apiStakeStatus
  • Add bounds check before proposals[0] access
  • Fix IsEqual to compare all meaningful fields
  • Fix CSS selector bugs: missing commas, incorrect nesting
  • Fix typos: politiaSyncing, nTicketAddresess, --text-sucess
  • Fix async/await on loadPage calls in TypeScript
  • Fix null safety for proposalsInProgress in wallets.ts
  • Fix duplicate &status= in proposals pagination link
  • Fix loadProposal query string format in wallets.ts
  • Remove dead voteBitVerify function and unused imports
  • Remove pre-selected active class on Yes vote button
  • Rename versionTxt -> idVersionTxt for naming consistency
  • Scope .card CSS override to proposal pages only
  • Remove stale storm tags and dcrdata references

Address bugs, safety issues, and code quality problems identified
during review of the politeia governance voting integration:

- Fix XSS risk: remove html.WithUnsafe() from goldmark renderer
- Fix SignMessage to decode base64 signature from RPC wallet
- Fix iterateTable swallowing errors (return nil -> return err)
- Make politeia init non-fatal so wallet still runs without it
- Add nil guards for c.politeia in all core politeia methods
- Move table/index setup after version check to avoid DropAll issues
- Add nil Vote check before dereferencing in CastVotes
- Fix division by zero when EligibleTickets is 0
- Fix lastSync stored on error (move from defer to after success)
- Fix swallowed error in spv AddressAccount
- Fix copy-paste error in proposalTokenCtx (host -> token)
- Make ProposalsInProgress failure non-fatal in apiStakeStatus
- Add bounds check before proposals[0] access
- Fix IsEqual to compare all meaningful fields
- Fix CSS selector bugs: missing commas, incorrect nesting
- Fix typos: politiaSyncing, nTicketAddresess, --text-sucess
- Fix async/await on loadPage calls in TypeScript
- Fix null safety for proposalsInProgress in wallets.ts
- Fix duplicate &status= in proposals pagination link
- Fix loadProposal query string format in wallets.ts
- Remove dead voteBitVerify function and unused imports
- Remove pre-selected active class on Yes vote button
- Rename versionTxt -> idVersionTxt for naming consistency
- Scope .card CSS override to proposal pages only
- Remove stale storm tags and dcrdata references
@JoeGruffins JoeGruffins marked this pull request as ready for review February 16, 2026 03:17
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.

1 participant