Skip to content

Commit

Permalink
fix demo URL
Browse files Browse the repository at this point in the history
  • Loading branch information
CedarMist authored and csillag committed Oct 11, 2024
1 parent 7be8f79 commit c74484a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/utils/slug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,9 @@ export function proposalIdToSlug(proposalId:BytesLike) {
}

export function slugToProposalId(slug:string) {
// Special case for demo poll
if( slug === 'demo' ) {
return slug;
}
return hexlify(base32Decode(slug.toLowerCase())).substring(2).padEnd(64, '0');
}

0 comments on commit c74484a

Please sign in to comment.