forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 1
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 custom signature call page and MetaMask integration #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[note]: this pull request was merged to clean the bloating commits done to this branch * boilerplate work for making a new page * added ethereum provider hooks (wip) * added assert polyfil and eth signature recovery * reset error message * improved address change event handler * added custom signature call (WIP) * changed ecdsa address view component * changed call encoding * added dynamic chain address format * fixed account switch handler * compress recovered public key * added transaction confirmation modal * boilerplate work for making a new page * added ethereum provider hooks (wip) * added assert polyfil and eth signature recovery * reset error message * improved address change event handler * added custom signature call (WIP) * changed ecdsa address view component * changed call encoding * added dynamic chain address format * fixed account switch handler * compress recovered public key * added transaction confirmation modal * updated react component package version * fixed dependencies list
needs testing
hoonsubin
changed the title
Fix/mm error handling
Add custom signature call page and MetaMask integration
Aug 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature Summary
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
ecdsa-sig-trezor.mov
Notable Changes
assert
browser polyfill that is used by theethereumjs-util
packagecustom-signature
page that will be available for chains that implement thecustom-signatures
pallet (https://github.com/PlasmNetwork/Plasm/tree/dusty/frame/custom-signatures) asEthCall
(https://github.com/PlasmNetwork/Plasm/blob/feature/vectorized-custom-signatures/bin/node/runtime/src/lib.rs#L649)Usage
Currently, this page is made with MetaMask in mind. Most browser-injected ethereum wallets that use the
window.ethereum
object and accept thepersonal_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