Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEMPORARY: remove native token cofniguration for staging #332

Draft
wants to merge 1 commit into
base: release-v1.3.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/src/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub fn staging_genesis(
main_chain_scripts: sp_session_validator_management::MainChainScripts::read_from_env()?,
},
native_token_management: NativeTokenManagementConfig {
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
main_chain_scripts: None,
..Default::default()
},
};
Expand Down
2 changes: 1 addition & 1 deletion node/src/template_chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn chain_spec() -> Result<ChainSpec, envy::Error> {
main_chain_scripts: sp_session_validator_management::MainChainScripts::read_from_env()?,
},
native_token_management: NativeTokenManagementConfig {
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
main_chain_scripts: Some(sp_native_token_management::MainChainScripts::read_from_env()?),
..Default::default()
},
};
Expand Down
2 changes: 1 addition & 1 deletion node/src/testnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn testnet_genesis(
main_chain_scripts: sp_session_validator_management::MainChainScripts::read_from_env()?,
},
native_token_management: NativeTokenManagementConfig {
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
main_chain_scripts: Some(sp_native_token_management::MainChainScripts::read_from_env()?),
..Default::default()
},
};
Expand Down
6 changes: 4 additions & 2 deletions pallets/native-token-management/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ pub mod pallet {
#[pallet::genesis_config]
#[derive(frame_support::DefaultNoBound)]
pub struct GenesisConfig<T: Config> {
pub main_chain_scripts: sp_native_token_management::MainChainScripts,
pub main_chain_scripts: Option<sp_native_token_management::MainChainScripts>,
pub _marker: PhantomData<T>,
}

#[pallet::genesis_build]
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
MainChainScriptsConfiguration::<T>::put(self.main_chain_scripts.clone());
if let Some(main_chain_scripts) = self.main_chain_scripts.clone() {
MainChainScriptsConfiguration::<T>::put(main_chain_scripts);
}
}
}

Expand Down
Loading