Skip to content

Commit 0746c77

Browse files
committed
Cleanup
1 parent 762f6d5 commit 0746c77

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

linera-web/build.bash

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# Execute from linera-protocol directory.
4-
53
set -eu
64

75
cd $(dirname -- "${BASH_SOURCE[0]}")

linera-web/pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
packages:
22
- 'signer'
3-
- 'client'
3+
- 'client'
4+

linera-web/signer/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './in_memory';
2-
export * from './metamask_signer';
2+
export * from './metamask_signer';

linera-web/signer/tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ test('signs message correctly', async () => {
2222
const owner = signer.address().toLowerCase();
2323
const signature = await signer.sign(owner, Buffer.from(cryptoHash, "hex"));
2424
expect(signature).toBe("0xe257048813b851f812ba6e508e972d8bb09504824692b027ca95d31301dbe8c7103a2f35ce9950d031d260f412dcba09c24027288872a67abe261c0a3e55c9121b");
25-
});
25+
});

linera-web/src/signer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ impl Signer for JsSigner {
104104
.map_err(JsSignerError::from)?
105105
.as_string()
106106
.ok_or(JsSignerError::JsConversionError)?;
107-
web_sys::console::log_1(&JsValue::from_str(&js_public_key));
108107
let pk = EvmPublicKey::from_str(&js_public_key)
109108
.map_err(|_| JsSignerError::PublicKeyParseError)?;
110109
Ok(AccountPublicKey::EvmSecp256k1(pk))
@@ -116,8 +115,8 @@ impl Signer for JsSigner {
116115
value: &CryptoHash,
117116
) -> Result<AccountSignature, Self::Error> {
118117
let js_owner = JsValue::from_str(&owner.to_string());
119-
// Pass CryptoHash without serializing b/c that adds new bytes
120-
// to the serialized value which don't want for signing.
118+
// Pass CryptoHash without serializing as that adds bytes
119+
// to the serialized value which we don't want for signing.
121120
let js_cryptohash = value.as_bytes().0.to_vec();
122121
let js_signature = self
123122
.sign(js_owner, js_cryptohash)

0 commit comments

Comments
 (0)