Use new AccountInfo struct for "System Account" storage data (#71)

* Add AccountInfo struct for "System Account" data

* Fmt

* Simplify AccountInfo struct constraints
This commit is contained in:
Andrew Jones
2020-02-25 17:18:10 +00:00
committed by GitHub
parent b7565ff435
commit dcc6b91d10
6 changed files with 75 additions and 43 deletions
+2 -2
View File
@@ -311,7 +311,7 @@ impl<T: System + Balances + Sync + Send + 'static, S: 'static> Client<T, S> {
let account_id = S::Signer::from(signer.public()).into_account();
let nonce = match nonce {
Some(nonce) => nonce,
None => self.account(account_id).await?.0,
None => self.account(account_id).await?.nonce,
};
let genesis_hash = self.genesis_hash;
@@ -561,7 +561,7 @@ mod tests {
let result: Result<_, Error> = async_std::task::block_on(async move {
let account = AccountKeyring::Alice.to_account_id();
let client = test_client().await;
let balance = client.account(account.into()).await?.1.free;
let balance = client.account(account.into()).await?.data.free;
Ok(balance)
});