mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Fix max-size messages at test chains (#2064)
* fix max-size messages submit for test chains * impl review suggestions
This commit is contained in:
committed by
Bastian Köcher
parent
47addd738b
commit
65b2196c6b
@@ -159,7 +159,21 @@ pub enum CustomNetworkId {
|
||||
RialtoParachain,
|
||||
}
|
||||
|
||||
impl TryFrom<bp_runtime::ChainId> for CustomNetworkId {
|
||||
type Error = ();
|
||||
|
||||
fn try_from(chain: bp_runtime::ChainId) -> Result<Self, Self::Error> {
|
||||
Ok(match chain {
|
||||
bp_runtime::MILLAU_CHAIN_ID => Self::Millau,
|
||||
bp_runtime::RIALTO_CHAIN_ID => Self::Rialto,
|
||||
bp_runtime::RIALTO_PARACHAIN_CHAIN_ID => Self::RialtoParachain,
|
||||
_ => return Err(()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl CustomNetworkId {
|
||||
/// Converts self to XCM' network id.
|
||||
pub const fn as_network_id(&self) -> NetworkId {
|
||||
match *self {
|
||||
CustomNetworkId::Millau => NetworkId::Kusama,
|
||||
|
||||
Reference in New Issue
Block a user