-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SIPS/sip-23.md
Outdated
|
||
```typescript | ||
type AddressProps = { | ||
address: `0x${string}`; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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}`; |
There was a problem hiding this comment.
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.
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. |
This adds a SIP outlining JSX support for Snap interfaces.
Closes #133.