mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Rewrite Inherent data (#1488)
* Implement new inherent data * Fixes compilation on wasm * Fixes after rebase * Switch back to generate inherent stuff by macro * Update after rebase * Apply suggestions from code review Co-Authored-By: bkchr <bkchr@users.noreply.github.com> * Fix compilation after rebase * Address grumbles * Remove `InherentDataProviders` from `Client` * Update wasm files after rebase * Address grumbles * Fixes compilation after latest merge * Last fix
This commit is contained in:
@@ -29,9 +29,9 @@ pub trait BlockBuilderExt {
|
||||
fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), client::error::Error>;
|
||||
}
|
||||
|
||||
impl<'a, A> BlockBuilderExt for client::block_builder::BlockBuilder<'a, runtime::Block, (), A> where
|
||||
impl<'a, A> BlockBuilderExt for client::block_builder::BlockBuilder<'a, runtime::Block, A> where
|
||||
A: ProvideRuntimeApi + client::blockchain::HeaderBackend<runtime::Block> + 'a,
|
||||
A::Api: BlockBuilder<runtime::Block, ()>
|
||||
A::Api: BlockBuilder<runtime::Block>
|
||||
{
|
||||
fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), client::error::Error> {
|
||||
self.push(sign_tx(transfer))
|
||||
@@ -39,6 +39,9 @@ impl<'a, A> BlockBuilderExt for client::block_builder::BlockBuilder<'a, runtime:
|
||||
}
|
||||
|
||||
fn sign_tx(transfer: runtime::Transfer) -> runtime::Extrinsic {
|
||||
let signature = keyring::Keyring::from_raw_public(transfer.from.to_fixed_bytes()).unwrap().sign(&codec::Encode::encode(&transfer)).into();
|
||||
let signature = keyring::Keyring::from_raw_public(transfer.from.to_fixed_bytes())
|
||||
.unwrap()
|
||||
.sign(&codec::Encode::encode(&transfer))
|
||||
.into();
|
||||
runtime::Extrinsic::Transfer(transfer, signature)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user