-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[W3F Grant Milestone 2] ECDSA Custom Signature Pallet Hardware Wallet Support UI implementation #5903
base: master
Are you sure you want to change the base?
Conversation
797e009
to
cf88cf9
Compare
* Adding custom signature module integration for UI [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 * fixed linting and package version * fixed package version and linting * updated package version * package resolution * marked error * fix error message parsing needs testing * add response message check * update package version * update local package * update package version * update package version * refactor signature req method * add null checks * update package ver and copyright year * fix license information
ebdc5e7
to
3a2b508
Compare
Sorry for the messy commit history, I must have been drunk 😓 |
We merge with squash merges, so it doesn’t affect anything. So if you are happy, I am happy :) |
@jacogr if it's not too much, can you help me with this error I'm having? After adding the custom page to tsconfig paths, I'm starting to see type errors related to I'm trying to finalize this PR and wrap things up for review :) Here is the full error log:
|
Will take a peek in the morning EU time. |
Change to Original: "@polkadot/app-council": ["page-council/src"],
"@polkadot/app-council/*": ["page-council/src/*"],
"@polkadot/app-custom-signature/*": ["page-custom-signature/src/*"], New: (Addition of root import) "@polkadot/app-council": ["page-council/src"],
"@polkadot/app-council/*": ["page-council/src/*"],
"@polkadot/app-custom-signature": ["page-custom-signature/src"],
"@polkadot/app-custom-signature/*": ["page-custom-signature/src/*"], |
Co-authored-by: Jaco <[email protected]>
* Bump API (w/ ink! metadata V3 support) * Remove assertion
skip-checks: true
skip-checks: true
* Bump 3rd-party dependencies * i18next bump
skip-checks: true
Thanks @jacogr for the help! Everything is working well! |
O, hell. Now I see it is not in draft anymore and needs a review. And 2 months ago as well. Sorry about that, the draft -> ready status changes always create and issue for me. |
This pull request introduces 1 alert when merging 00e1b6b into 56087a7 - view on LGTM.com new alerts:
|
Feature Summary
Adds
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 ss58 encoded ECDSA account for Substrate. You can use MetaMask for signature requests, which allows users to use their Ethereum accounts from Ledger and Trezor to create transactions and execute runtime calls.
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/Astar/tree/development/dusty/frame/custom-signatures) asEthCall
(https://github.com/PlasmNetwork/Astar/blob/2745af52f114510a1c3d0b7b9ec7f9dd04d83e8b/bin/node/runtime/src/lib.rs#L789)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 the official documentation: https://docs.astar.network/build/metamask-signatures