DemesneGH commented on code in PR #192: URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/192#discussion_r2104583289
########## projects/web3/eth_wallet/ta/src/main.rs: ########## @@ -83,21 +101,27 @@ fn create_wallet(_input: &proto::CreateWalletInput) -> Result<proto::CreateWalle }) } -fn remove_wallet(input: &proto::RemoveWalletInput) -> Result<proto::RemoveWalletOutput> { +fn remove_wallet( + db_client: &SecureStorageClient, + input: &proto::RemoveWalletInput, +) -> Result<proto::RemoveWalletOutput> { dbg_println!("[+] Removing wallet: {:?}", input.wallet_id); - delete_from_secure_storage(input.wallet_id.as_bytes())?; + db_client.delete_entry::<Wallet>(&input.wallet_id.to_string())?; dbg_println!("[+] Wallet removed"); Ok(proto::RemoveWalletOutput {}) } -fn derive_address(input: &proto::DeriveAddressInput) -> Result<proto::DeriveAddressOutput> { - let secure_object = load_from_secure_storage(input.wallet_id.as_bytes()) +fn derive_address( + db_client: &SecureStorageClient, + input: &proto::DeriveAddressInput, +) -> Result<proto::DeriveAddressOutput> { + let wallet = db_client + .get::<Wallet>(&input.wallet_id.to_string()) Review Comment: Fixed in the latest commit: use ToString instead of Into<String>. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org For additional commands, e-mail: dev-h...@teaclave.apache.org