From 880d595cc4ae1924e831d197ae88f59d19cc171c Mon Sep 17 00:00:00 2001 From: Ashutosh Varma Date: Mon, 23 Oct 2023 12:47:44 +0530 Subject: [PATCH] feat: apply code suggestions --- chain-extensions/unified-accounts/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chain-extensions/unified-accounts/src/lib.rs b/chain-extensions/unified-accounts/src/lib.rs index 6d0b3f9c3d..b9a491fe08 100644 --- a/chain-extensions/unified-accounts/src/lib.rs +++ b/chain-extensions/unified-accounts/src/lib.rs @@ -30,7 +30,6 @@ use pallet_contracts::chain_extension::{ ChainExtension, Environment, Ext, InitState, Result as DispatchResult, RetVal, }; use pallet_evm::AddressMapping; -use pallet_unified_accounts::{EvmToNative, NativeToEvm}; use parity_scale_codec::Encode; pub use unified_accounts_chain_extension_types::Command::{self, *}; @@ -65,7 +64,7 @@ where env.charge_weight(base_weight)?; // read the storage item - let mapped = NativeToEvm::::get(account_id.clone()); + let mapped = UA::to_h160(&account_id); let is_mapped = mapped.is_some(); let evm_address = mapped.unwrap_or_else(|| { @@ -90,7 +89,7 @@ where env.charge_weight(base_weight)?; // read the storage item - let mapped = EvmToNative::::get(evm_address.clone()); + let mapped = UA::to_account_id(&evm_address); let is_mapped = mapped.is_some(); let native_address = mapped.unwrap_or_else(|| {