From c3620d63d920e2b088dfbfd8774e2262675f2556 Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:55:19 +0200 Subject: [PATCH] feat!: don't prepend signature scheme flag before public key (#6) * feat!: Don't prepend signature scheme flag before public key * Cleanup --- rust-app/src/implementation.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rust-app/src/implementation.rs b/rust-app/src/implementation.rs index 7869336..1ce8210 100644 --- a/rust-app/src/implementation.rs +++ b/rust-app/src/implementation.rs @@ -27,11 +27,8 @@ impl Address> for key: &ledger_device_sdk::ecc::ECPublicKey<65, 'E'>, ) -> Result { let key_bytes = ed25519_public_key_bytes(key); - let mut tmp = ArrayVec::::new(); - let _ = tmp.try_push(0); // SIGNATURE_SCHEME_TO_FLAG['ED25519'] - let _ = tmp.try_extend_from_slice(key_bytes); let mut hasher: Blake2b = Hasher::new(); - hasher.update(&tmp); + hasher.update(&key_bytes); let hash: [u8; SUI_ADDRESS_LENGTH] = hasher.finalize(); Ok(SuiPubKeyAddress(key.clone(), hash)) }