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: block component block not available yet #745

Merged
merged 14 commits into from
Sep 11, 2024

Conversation

kilted-andres
Copy link
Contributor

@kilted-andres kilted-andres commented Sep 9, 2024

During a regression test after ctypehub/pull/743, it was found that the "Registration Block" component was showing a broken link after creating a cType from inside the app. This was because the block was still not available and the link required the block number.

Now:

  • The component will direct to the polkadot.js explorer (without querying a specific block) when block number is undefined.
  • When submitting a cType creation transaction, it will be awaited until it is InBlock.

Other fix:

Handle cTypes without a title.

@kilted-andres kilted-andres changed the title feat: await until cType transaction is in block fix: block component block not available yet Sep 10, 2024
@@ -16,7 +16,7 @@ const { title, id, description, attestationsCreated, tags } =
<li class=`${containerStyles.container} container`>
<h2>
<a href={generatePath(paths.ctypeDetails, id)} class="title">
{title}
{title.length > 0 ? title : '∅'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s unclear to me whether this is still needed, but okay. This could also be spelled simpler by the way.

Suggested change
{title.length > 0 ? title : ''}
{title || ''}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought "" was truthty, but you are right it is falsy, so that's possible.

@kilted-andres kilted-andres merged commit 3f5c56f into main Sep 11, 2024
1 check passed
@kilted-andres kilted-andres deleted the xw/fix_block_component branch September 11, 2024 09:32
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.

2 participants