-
Notifications
You must be signed in to change notification settings - Fork 487
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
fix prefunded accounts for proper development experience on PolkadotJS Apps #1053
Conversation
#[allow(dead_code)] | ||
type AccountPublic = <Signature as Verify>::Signer; | ||
|
||
/// Generate an account ID from seed. | ||
/// For use with `AccountId32`, `dead_code` if `AccountId20`. | ||
#[allow(dead_code)] | ||
pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId | ||
where | ||
AccountPublic: From<<TPublic::Pair as Pair>::Public>, |
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 remove these dead code?
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.
The template is usually the main reference newcomers use to figure out how to use the Frontier crates.
I didn't want to get rid of the code that could potentially be used when someone wants to use AccountId32
, and that's why I left this get_account_id_from_seed
there.
Maybe the ideal solution would be to have two templates? One showcasing the usage of AccountId20
and the other AccountId32
. Downside is double effort for maintaing two runtimes.
wdyt @sorpaas ?
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.
Yeah but we probably should add some docs explaining this.
…S Apps (polkadot-evm#1053) * add eth prefunded accounts to template * fix Account Lookup * rm unnecessary mut * fix prefunded accounts + sudo * taplo format * clippy * lint hex_literal import
…S Apps (polkadot-evm#1053) * add eth prefunded accounts to template * fix Account Lookup * rm unnecessary mut * fix prefunded accounts + sudo * taplo format * clippy * lint hex_literal import
…S Apps (polkadot-evm#1053) * add eth prefunded accounts to template * fix Account Lookup * rm unnecessary mut * fix prefunded accounts + sudo * taplo format * clippy * lint hex_literal import
After some investigation I realized that my work on #1019 was incomplete.
This PR allows for a proper development experience on PolkadotJS Apps