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

fix(cli): Fix peer id generation #1656

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/cli/src/args/generate_keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl GenerateKeypairArgs {
key_pair.bls_private_key.as_bytes(),
i,
)?;
keypairs.push(Keypair::generate(i)?);
keypairs.push(key_pair);
}

println!(
Expand All @@ -64,7 +64,7 @@ pub struct Keypair {
pub net_private_key: Hex,
pub public_key: Hex,
pub address: Address,
pub peer_id: Hex,
pub peer_id: String,
pub bls_private_key: Hex,
pub bls_public_key: Hex,
}
Expand Down Expand Up @@ -94,7 +94,7 @@ impl Keypair {
net_private_key: Hex::encode(&net_seckey),
public_key: Hex::encode(&pubkey),
address: Address::from_pubkey_bytes(pubkey).map_err(Error::Running)?,
peer_id: Hex::encode(secio_keypair.public_key().peer_id().to_base58()),
peer_id: secio_keypair.public_key().peer_id().to_base58(),
bls_private_key: Hex::encode(&bls_seckey),
bls_public_key: Hex::encode(bls_pub_key.to_bytes()),
})
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bootstrap } from "@chainsafe/dappeteer";
import { RECOMMENDED_METAMASK_VERSION } from "@chainsafe/dappeteer/dist/index";
import { bootstrap } from "dappeteer-new";
import { RECOMMENDED_METAMASK_VERSION } from "dappeteer-new/dist/index";

import Config from "../config";
import createTransactionData from "../src/create_test_data/createTestDataManage";
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"license": "MIT",
"dependencies": {
"dappeteer-new": "^5.2.1",
"@chainsafe/dappeteer": "^5.2.0",
"@ethereumjs/common": "^3.1.1",
"@ethereumjs/tx": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/src/web3_clientVersion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ describe("web3_clientVersion", () => {
() => document.getElementById("clientVersion").innerText !== "",
);

await expect(page.$eval("#clientVersion", (e) => e.innerText)).resolves.toBe("MetaMask/v10.31.0");
await expect(page.$eval("#clientVersion", (e) => e.innerText)).resolves.toBe("MetaMask/v11.0.0");
});
});
Loading
Loading