Skip to content
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

Support private keys of string type #273

Merged
merged 2 commits into from
Sep 20, 2023
Merged

Conversation

Lbqds
Copy link
Member

@Lbqds Lbqds commented Sep 15, 2023

No description provided.

@Lbqds Lbqds requested review from polarker and h0ngcha0 September 15, 2023 11:02
Copy link
Member

@polarker polarker left a comment

Choose a reason for hiding this comment

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

LGTM, one remark

throw new Error('No private key specified')
}
const signers = privateKeys.map((privateKey) => new PrivateKeyWallet({ privateKey }))
const signers = pks.map((privateKey, index) => {
if (isHexString(privateKey) && privateKey.length === 64) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't remember whether privatekey is always 32 characters. Could you generate 100 random wallets and test the length?

@Lbqds Lbqds merged commit 72ae2e0 into master Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants