Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps #7671

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pandres95
Copy link
Contributor

@pandres95 pandres95 commented Feb 22, 2025

This Pull Request fixes the following issues present with PJS derived from #2072

  • Represento Tracks constant as a Vec<(TrackId, TrackInfo)> instead of Vec<Track>, so tracks iteration in PJS apps Governance hook remains as how it was before, and

Screenshot 2025-02-22 at 12 31 28 pm

  • Encapsulates [u8; N] from name field in a StringLike structure that represents its TypeInfo as a &str and encodes as such. This fixes errors present in PJS apps that treat name as a javascript string.

Screenshot 2025-02-22 at 12 31 18 pm

@pandres95 pandres95 marked this pull request as ready for review February 22, 2025 18:03
@pandres95 pandres95 requested a review from a team as a code owner February 22, 2025 18:03
@pandres95 pandres95 force-pushed the fix/represent-tracks-constant-as-a-vec-id-info-tuple branch from 6fe1641 to f7f6920 Compare February 22, 2025 18:26
…y like a string

change(pallet-referenda): create const function that helps construct `StringLike` to reduce changes in tracks definitions

fix: fmt
@pandres95 pandres95 force-pushed the fix/represent-tracks-constant-as-a-vec-id-info-tuple branch from e8538fe to 44b58c7 Compare February 22, 2025 18:42
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