No need to entangle Signer and nonce now (#702)

* no need to entangle Signr and nonce now

* fmt
This commit is contained in:
James Wilson
2022-10-28 15:15:16 +02:00
committed by GitHub
parent 563afdaded
commit da507fa6d2
2 changed files with 7 additions and 34 deletions
+5 -8
View File
@@ -224,14 +224,11 @@ where
Call: TxPayload,
{
// Get nonce from the node.
let account_nonce = if let Some(nonce) = signer.nonce() {
nonce
} else {
self.client
.rpc()
.system_account_next_index(signer.account_id())
.await?
};
let account_nonce = self
.client
.rpc()
.system_account_next_index(signer.account_id())
.await?;
self.create_signed_with_nonce(call, signer, account_nonce, other_params)
}