From 1e5b2476acbf51a19d8af2be44aedc22eb7fbeba Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Thu, 20 Apr 2023 12:58:32 +0000 Subject: [PATCH] feat: impl total_suppy --- --- a/pallets/balances-adapter/src/erc.rs +++ b/pallets/balances-adapter/src/erc.rs @@ -58,8 +58,8 @@ fn balance_of(&self, owner: Address) -> Result { // self.consume_store_reads(1)?; let owner = T::CrossAccountId::from_eth(owner); - let a = ::Currency::free_balance(owner.as_sub()); - Ok(a.into()) + let balance = ::Currency::free_balance(owner.as_sub()); + Ok(balance.into()) } fn decimals(&self) -> Result { @@ -76,8 +76,8 @@ fn total_supply(&self) -> Result { // self.consume_store_reads(1)?; - // Ok(>::get(self.id).into()) - todo!() + let total = ::Currency::total_issuance(); + Ok(total.into()) } // #[weight(>::transfer())] -- gitstuff