Skip to content

[Hardware Wallet Support Grant Milestone 2] ECDSA Custom Signature Pallet UI implementation #4435

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

Closed
wants to merge 1,080 commits into from

Conversation

hoonsubin
Copy link
Contributor

@hoonsubin hoonsubin commented Jan 17, 2021

Feature Summary

Related to this grant milestone

This pull request adds the Custom Signature page under the Account tab.
The Custom Signature page allows the user to submit a transaction that was signed with an Ethereum private key and use it as a native ECDSA account in Substrate. Plus, you are able to use MetaMask for signature requests, which allows users to use their Ethereum address inside Ledger and Trezor to create a transaction.

Preview

Ledger

ecdsa-sig-final.mp4

Trezor

Screen.Recording.2021-08-02.at.12.49.24.PM.mov

IMG_0796

Screen Shot 2021-01-15 at 1 06 30 AM

Notable Changes

Usage

Currently, this page is made with MetaMask in mind. Most browser-injected ethereum wallets that use the window.ethereum object and accept the personal_sign method should be compatible, but please understand that there may be unexpected errors.

You can learn more about the usage from this doc: https://docs.plasmnet.io/build/metamask-signatures

@hoonsubin hoonsubin marked this pull request as draft January 17, 2021 08:14
@hoonsubin hoonsubin marked this pull request as ready for review January 17, 2021 09:27
Copy link
Member

@jacogr jacogr left a comment

Choose a reason for hiding this comment

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

It is great that it works, well done. Having said that, there are a couple of issues I see -

  1. It is not actually integrated with the signer, so we have a completely seperate process
  2. Accounts are completely seperate from the account accounts page

To do it correctly, when the call is available, it needs to allow addition on the Accounts page.

Then when sent, the Signer will detect the account and perform wrapping as required.

An additional concern is the way the extension is integrated, see for instance polkadot-js/extension#566 which the uses the existing extension interface.

@hoonsubin
Copy link
Contributor Author

hoonsubin commented Jan 18, 2021

thank you for your feedback @jacogr.
My original plan was to isolate the MetaMask instance used within the Custom Signature page to prevent any conflicts with other Ethereum extension implementation done by other teams (plus this is a custom-signatures pallet specific feature), but having full integration with the existing account component instead of a separate hook would definitely be consistent and clean for everyone. I'll see what I can do to improve on that if this will affect the grant process.
Thanks again!

@hoonsubin hoonsubin marked this pull request as draft May 18, 2021 08:17
Daelon02 and others added 25 commits August 2, 2021 14:02
* Bump deps

* Use override

* additional override
* OriginTrail parachain changes

* Add OriginTrail Parachain to polkadotjs

* Rename assets

* Resolve lint issues

* Change order

* Update logo mapping and paraId

Co-authored-by: Nikola Todorovic <[email protected]>
* Warn on staking min bond

* Warn on min validator amount
…polkadot-js#5678)

* Added Pinknode endpoints for Polkadot, Kusama, Rococo, Westend

* Added Pinknode endpoints for Acala Mandala, Crust Rocky, Dusty, Nodle
actions-user and others added 24 commits August 2, 2021 14:02
* add provider for karura and moonriver

* Add Elara bifrost kusama provider
* add chainType to metadata in the qr code

* lint
@hoonsubin
Copy link
Contributor Author

whoops. I shouldn't have rebased it. Sorry, this was an amateur mistake on my side. I'll close this PR and open a clean one later!

@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.