mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fix codegen validation when Runtime APIs are stripped (#1000)
* modify code gen * cargo fmt * fix return * move the runtime_apis static * small layout change * tidy up metadata UI testing and test validation function too * fix validation tests to point to metadata * update codegen * fix clippy and tests * tweak a comment * rename validate_codegen => is_codegen_valid_for --------- Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -59,6 +59,13 @@ impl From<subxt_metadata::Metadata> for Metadata {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<frame_metadata::RuntimeMetadataPrefixed> for Metadata {
|
||||
type Error = subxt_metadata::TryFromError;
|
||||
fn try_from(value: frame_metadata::RuntimeMetadataPrefixed) -> Result<Self, Self::Error> {
|
||||
subxt_metadata::Metadata::try_from(value).map(Metadata::from)
|
||||
}
|
||||
}
|
||||
|
||||
impl codec::Decode for Metadata {
|
||||
fn decode<I: codec::Input>(input: &mut I) -> Result<Self, codec::Error> {
|
||||
subxt_metadata::Metadata::decode(input).map(Metadata::new)
|
||||
|
||||
Reference in New Issue
Block a user