mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Generic SyncHeader type (#529)
* generic SyncHeader type * add panic condition to method description * extract -> into_inner * checked_sub + expect
This commit is contained in:
committed by
Bastian Köcher
parent
dd7242bc79
commit
441f63a34f
@@ -54,7 +54,7 @@ impl SubstrateHeadersSyncPipeline for MillauHeadersToRialto {
|
||||
) -> Result<Self::SignedTransaction, SubstrateError> {
|
||||
let account_id = self.target_sign.signer.public().as_array_ref().clone().into();
|
||||
let nonce = self.target_client.next_account_index(account_id).await?;
|
||||
let call = BridgeMillauCall::import_signed_header(header.header().clone().into()).into();
|
||||
let call = BridgeMillauCall::import_signed_header(header.header().clone().into_inner()).into();
|
||||
let transaction = Rialto::sign_transaction(&self.target_client, &self.target_sign.signer, nonce, call);
|
||||
Ok(transaction)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ impl SubstrateHeadersSyncPipeline for RialtoHeadersToMillau {
|
||||
) -> Result<Self::SignedTransaction, SubstrateError> {
|
||||
let account_id = self.target_sign.signer.public().as_array_ref().clone().into();
|
||||
let nonce = self.target_client.next_account_index(account_id).await?;
|
||||
let call = BridgeRialtoCall::import_signed_header(header.header().clone().into()).into();
|
||||
let call = BridgeRialtoCall::import_signed_header(header.header().clone().into_inner()).into();
|
||||
let transaction = Millau::sign_transaction(&self.target_client, &self.target_sign.signer, nonce, call);
|
||||
Ok(transaction)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user