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

Add SIP-23: JSX for Snap interfaces #136

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Add SIP-23: JSX for Snap interfaces #136

wants to merge 11 commits into from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 22, 2024

This adds a SIP outlining JSX support for Snap interfaces.

Closes #133.

@Mrtenz Mrtenz changed the title Add "JSX for Snap interfaces" proposal Add SIP-23: JSX for Snap interfaces Mar 22, 2024
@Mrtenz Mrtenz marked this pull request as ready for review March 22, 2024 13:30
@Mrtenz Mrtenz requested review from Montoya, ziad-saab and a team as code owners March 22, 2024 13:30
Copy link
Contributor

@GuillaumeRx GuillaumeRx left a comment

Choose a reason for hiding this comment

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

LGTM

GuillaumeRx
GuillaumeRx previously approved these changes Mar 26, 2024
SIPS/sip-23.md Outdated

```typescript
type AddressProps = {
address: `0x${string}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not make this a CAIP address?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is based on the current API, and we have no way to properly show CAIP addresses in the extension.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay, the underlying components expect that type...it's just for the identicons. We should change components in the extension to allow for other account strings. Also I meant the account id portion of the caip address, not the whole string. I was thinking we were limiting it to ethereum because of validation reasons or something.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this change would be the time to swap to CAIP? 🤔

We could support the old format when not using JSX though. But even if we support CAIP addresses the underlying components don't yet, so we will need to validate that they are Ethereum-like addresses.

SIPS/sip-23.md Outdated

```typescript
type AddressProps = {
address: `0x${string}`;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this change would be the time to swap to CAIP? 🤔

We could support the old format when not using JSX though. But even if we support CAIP addresses the underlying components don't yet, so we will need to validate that they are Ethereum-like addresses.

@hmalik88
Copy link
Contributor

Wondering if we should have a SIP that just outlines all the existing JSX components. This gives a place for snap developers to make propositions for new components that they may want to see and also have a source of truth for existing components.

@Mrtenz
Copy link
Member Author

Mrtenz commented Feb 14, 2025

Wondering if we should have a SIP that just outlines all the existing JSX components. This gives a place for snap developers to make propositions for new components that they may want to see and also have a source of truth for existing components.

That was the goal with this SIP originally, but since we added so many new components since writing, it got out of date quite a bit, and I ended up just removing them.

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.

Create JSX SIP
4 participants