mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Improve SignedExtension matching logic and remove SkipCheckIfFeeless bits (#1283)
* First pass making matching on signed exts more general and handlng SkipCheckifFeeless * remove unneeded derives (only exts we can decode into are handled by the user) * No SkipCheckIfFeeless in integration tests either * Cargo fmt * Remove SkipCheckIfFeeless specific logic * clippy * matches to just return bool, not result * remove now-invalid comment * return error from find if .iter() errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use codec::Encode;
|
||||
use subxt::client::OfflineClientT;
|
||||
use subxt::config::{Config, ExtrinsicParams, ExtrinsicParamsEncoder};
|
||||
use subxt::config::{Config, ExtrinsicParams, ExtrinsicParamsEncoder, ExtrinsicParamsError};
|
||||
use subxt_signer::sr25519::dev;
|
||||
|
||||
#[subxt::subxt(
|
||||
@@ -66,14 +66,13 @@ impl CustomExtrinsicParamsBuilder {
|
||||
// Describe how to fetch and then encode the params:
|
||||
impl<T: Config> ExtrinsicParams<T> for CustomExtrinsicParams<T> {
|
||||
type OtherParams = CustomExtrinsicParamsBuilder;
|
||||
type Error = std::convert::Infallible;
|
||||
|
||||
// Gather together all of the params we will need to encode:
|
||||
fn new<Client: OfflineClientT<T>>(
|
||||
_nonce: u64,
|
||||
client: Client,
|
||||
other_params: Self::OtherParams,
|
||||
) -> Result<Self, Self::Error> {
|
||||
) -> Result<Self, ExtrinsicParamsError> {
|
||||
Ok(Self {
|
||||
genesis_hash: client.genesis_hash(),
|
||||
tip: other_params.tip,
|
||||
|
||||
Reference in New Issue
Block a user