From 22e2a21825f121b3d9c10e8bfa560e6ffeb81ab1 Mon Sep 17 00:00:00 2001 From: Ryan Lee Date: Thu, 28 Mar 2024 01:41:18 -0400 Subject: [PATCH] fixes --- signer/src/eth.rs | 3 ++- signer/wasm-tests/tests/wasm.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/signer/src/eth.rs b/signer/src/eth.rs index 0ad6d3b8ee..7e6e8d3a08 100644 --- a/signer/src/eth.rs +++ b/signer/src/eth.rs @@ -59,7 +59,7 @@ impl Keypair { mnemonic.to_seed(password.unwrap_or("")), &derivation_path, ) - .unwrap(); + .expect("valid private key"); Keypair::from_seed(private.to_bytes()) } @@ -315,6 +315,7 @@ mod test { #[test] fn check_account_id(keypair in keypair()) { + // https://github.com/ethereumbook/ethereumbook/blob/develop/04keys-addresses.asciidoc#ethereum-addresses let account_id = { let uncompressed = keypair.0.0.public_key().serialize_uncompressed(); let hash = keccak(&uncompressed[1..]).0; diff --git a/signer/wasm-tests/tests/wasm.rs b/signer/wasm-tests/tests/wasm.rs index 53f08ab292..667f20a55c 100644 --- a/signer/wasm-tests/tests/wasm.rs +++ b/signer/wasm-tests/tests/wasm.rs @@ -45,7 +45,7 @@ async fn wasm_ecdsa_signing_works() { #[wasm_bindgen_test] async fn wasm_eth_signing_works() { - let alice = eth::dev::alice(); + let alice = eth::dev::alith(); // There's some non-determinism in the signing, so this ensures that // the rand stuff is configured properly to run ok in wasm.