mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Move ChainWithBalances::NativeBalance -> Chain::Balance (#990)
* move ChainWithBalances::NativeBalance -> Chain::Balance * dummy commit * Revert "dummy commit" This reverts commit c00642153d260685a91d4fffbc424d225741fceb.
This commit is contained in:
committed by
Bastian Köcher
parent
b4939e2c9f
commit
4a47452c20
@@ -208,7 +208,7 @@ impl<C: Chain> Client<C> {
|
||||
}
|
||||
|
||||
/// Return native tokens balance of the account.
|
||||
pub async fn free_native_balance(&self, account: C::AccountId) -> Result<C::NativeBalance>
|
||||
pub async fn free_native_balance(&self, account: C::AccountId) -> Result<C::Balance>
|
||||
where
|
||||
C: ChainWithBalances,
|
||||
{
|
||||
@@ -217,7 +217,7 @@ impl<C: Chain> Client<C> {
|
||||
.await?
|
||||
.ok_or(Error::AccountDoesNotExist)?;
|
||||
let decoded_account_data =
|
||||
AccountInfo::<C::Index, AccountData<C::NativeBalance>>::decode(&mut &encoded_account_data.0[..])
|
||||
AccountInfo::<C::Index, AccountData<C::Balance>>::decode(&mut &encoded_account_data.0[..])
|
||||
.map_err(Error::ResponseParseFailed)?;
|
||||
Ok(decoded_account_data.data.free)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user